|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
3 |
<xsl:output indent="yes" method="html"/>
|
|
4 |
<xsl:param name="docid"/>
|
|
5 |
<xsl:param name="sessionid"/>
|
|
6 |
<xsl:param name="qformat"/>
|
|
7 |
<xsl:param name="publicRead"/>
|
|
8 |
<xsl:param name="message"/>
|
|
9 |
<xsl:param name="readonly">true</xsl:param>
|
|
10 |
|
|
11 |
<xsl:template name="metadata">
|
|
12 |
<body>
|
|
13 |
<div class="centerContentBorder">
|
|
14 |
<div class="templatecontentareaclass">
|
|
15 |
<xsl:apply-templates select="metadata/idinfo"/>
|
|
16 |
<xsl:apply-templates
|
|
17 |
select="metadata/distinfo/resdesc[text()=$docid]/ancestor::distinfo"/>
|
|
18 |
</div>
|
|
19 |
</div>
|
|
20 |
</body>
|
|
21 |
</xsl:template>
|
|
22 |
|
|
23 |
<xsl:template match="idinfo">
|
|
24 |
<table border="0" cellspacing="10">
|
|
25 |
<tr>
|
|
26 |
<td colspan="2" align="center">
|
|
27 |
<xsl:value-of select="$message"/>
|
|
28 |
</td>
|
|
29 |
</tr>
|
|
30 |
<tr>
|
|
31 |
<td colspan="2" align="center">
|
|
32 |
<h2>FGDC Identification Information</h2>
|
|
33 |
</td>
|
|
34 |
</tr>
|
|
35 |
<xsl:apply-templates select="citation"/>
|
|
36 |
<xsl:apply-templates select="descript"/>
|
|
37 |
<xsl:apply-templates select="spdom"/>
|
|
38 |
<xsl:apply-templates select="keywords"/>
|
|
39 |
</table>
|
|
40 |
</xsl:template>
|
|
41 |
|
|
42 |
<xsl:template match="citation">
|
|
43 |
<xsl:apply-templates select="citeinfo"/>
|
|
44 |
</xsl:template>
|
|
45 |
|
|
46 |
<xsl:template match="citeinfo">
|
|
47 |
<tr>
|
|
48 |
<td colspan="2" class="tablehead">Citation Information</td>
|
|
49 |
</tr>
|
|
50 |
|
|
51 |
<tr>
|
|
52 |
<xsl:apply-templates select="title"/>
|
|
53 |
</tr>
|
|
54 |
<tr>
|
|
55 |
<xsl:apply-templates select="origin"/>
|
|
56 |
</tr>
|
|
57 |
<tr>
|
|
58 |
<xsl:apply-templates select="pubdate"/>
|
|
59 |
</tr>
|
|
60 |
<tr>
|
|
61 |
<xsl:apply-templates select="edition"/>
|
|
62 |
</tr>
|
|
63 |
<tr>
|
|
64 |
<xsl:apply-templates select="geoform"/>
|
|
65 |
</tr>
|
|
66 |
<tr>
|
|
67 |
<xsl:apply-templates select="pubinfo"/>
|
|
68 |
</tr>
|
|
69 |
<tr>
|
|
70 |
<xsl:apply-templates select="othercit"/>
|
|
71 |
</tr>
|
|
72 |
</xsl:template>
|
|
73 |
|
|
74 |
<xsl:template match="descript">
|
|
75 |
<tr>
|
|
76 |
<td colspan="2" class="tablehead">
|
|
77 |
Description
|
|
78 |
</td>
|
|
79 |
</tr>
|
|
80 |
<tr>
|
|
81 |
<xsl:apply-templates select="abstract"/>
|
|
82 |
</tr>
|
|
83 |
<tr>
|
|
84 |
<xsl:apply-templates select="purpose"/>
|
|
85 |
</tr>
|
|
86 |
</xsl:template>
|
|
87 |
|
|
88 |
<xsl:template match="spdom">
|
|
89 |
<tr>
|
|
90 |
<xsl:apply-templates select="bounding"/>
|
|
91 |
</tr>
|
|
92 |
</xsl:template>
|
|
93 |
|
|
94 |
<xsl:template match="keywords">
|
|
95 |
<tr>
|
|
96 |
<xsl:apply-templates select="theme"/>
|
|
97 |
</tr>
|
|
98 |
<tr>
|
|
99 |
<xsl:apply-templates select="place"/>
|
|
100 |
</tr>
|
|
101 |
</xsl:template>
|
|
102 |
|
|
103 |
<xsl:template match="theme">
|
|
104 |
<td class="highlight" valign="top">Theme Keywords</td>
|
|
105 |
<td class="secondCol">
|
|
106 |
<xsl:apply-templates select="themekey[position()!=last()]">
|
|
107 |
<xsl:with-param name="lastPlace">f</xsl:with-param>
|
|
108 |
</xsl:apply-templates>
|
|
109 |
<xsl:apply-templates select="themekey[position()=last()]">
|
|
110 |
<xsl:with-param name="lastPlace">t</xsl:with-param>
|
|
111 |
</xsl:apply-templates>
|
|
112 |
</td>
|
|
113 |
</xsl:template>
|
|
114 |
|
|
115 |
<xsl:template match="place">
|
|
116 |
<td class="highlight" valign="top">Place Keywords</td>
|
|
117 |
<td class="secondCol">
|
|
118 |
<xsl:apply-templates select="placekey[position()!=last()]">
|
|
119 |
<xsl:with-param name="lastPlace">f</xsl:with-param>
|
|
120 |
</xsl:apply-templates>
|
|
121 |
<xsl:apply-templates select="placekey[position()=last()]">
|
|
122 |
<xsl:with-param name="lastPlace">t</xsl:with-param>
|
|
123 |
</xsl:apply-templates>
|
|
124 |
</td>
|
|
125 |
</xsl:template>
|
|
126 |
|
|
127 |
<xsl:template match="themekey">
|
|
128 |
<xsl:param name="lastPlace"/>
|
|
129 |
<xsl:value-of select="."/>
|
|
130 |
<xsl:if test="$lastPlace = 'f'">, </xsl:if>
|
|
131 |
</xsl:template>
|
|
132 |
|
|
133 |
<xsl:template match="placekey">
|
|
134 |
<xsl:param name="lastPlace"/>
|
|
135 |
<xsl:value-of select="."/>
|
|
136 |
<xsl:if test="$lastPlace = 'f'">, </xsl:if>
|
|
137 |
</xsl:template>
|
|
138 |
|
|
139 |
<xsl:template match="bounding">
|
|
140 |
<td class="highlight" valign="top">Bounding Coordinates</td>
|
|
141 |
<td class="secondCol">
|
|
142 |
<table>
|
|
143 |
<tr>
|
|
144 |
<td class="highlight" align="right">West</td>
|
|
145 |
<td class="secondCol">
|
|
146 |
<xsl:value-of select="westbc"/>
|
|
147 |
</td>
|
|
148 |
<td class="highlight" align="right">East</td>
|
|
149 |
<td class="secondCol">
|
|
150 |
<xsl:value-of select="eastbc"/>
|
|
151 |
</td>
|
|
152 |
</tr>
|
|
153 |
<tr>
|
|
154 |
<td class="highlight" align="right">North</td>
|
|
155 |
<td class="secondCol">
|
|
156 |
<xsl:value-of select="northbc"/>
|
|
157 |
</td>
|
|
158 |
<td class="highlight" align="right">South</td>
|
|
159 |
<td class="secondCol">
|
|
160 |
<xsl:value-of select="southbc"/>
|
|
161 |
</td>
|
|
162 |
</tr>
|
|
163 |
</table>
|
|
164 |
</td>
|
|
165 |
</xsl:template>
|
|
166 |
|
|
167 |
<xsl:template match="abstract">
|
|
168 |
<td class="highlight" valign="top">Abstract</td>
|
|
169 |
<td class="secondCol">
|
|
170 |
<xsl:value-of select="."/>
|
|
171 |
</td>
|
|
172 |
</xsl:template>
|
|
173 |
|
|
174 |
<xsl:template match="purpose">
|
|
175 |
<td class="highlight" valign="top">Purpose</td>
|
|
176 |
<td class="secondCol">
|
|
177 |
<xsl:value-of select="."/>
|
|
178 |
</td>
|
|
179 |
</xsl:template>
|
|
180 |
|
|
181 |
<xsl:template match="title">
|
|
182 |
<td class="highlight">Title</td>
|
|
183 |
<td class="secondCol">
|
|
184 |
<xsl:value-of select="."/>
|
|
185 |
</td>
|
|
186 |
</xsl:template>
|
|
187 |
|
|
188 |
<xsl:template match="origin">
|
|
189 |
<td class="highlight">Originator </td>
|
|
190 |
<td class="secondCol">
|
|
191 |
<xsl:value-of select="."/>
|
|
192 |
</td>
|
|
193 |
</xsl:template>
|
|
194 |
|
|
195 |
<xsl:template match="pubdate">
|
|
196 |
<td class="highlight">Publication Date</td>
|
|
197 |
<td class="secondCol">
|
|
198 |
<xsl:call-template name="long_date">
|
|
199 |
<xsl:with-param name="date">
|
|
200 |
<xsl:value-of select="."/>
|
|
201 |
</xsl:with-param>
|
|
202 |
</xsl:call-template>
|
|
203 |
</td>
|
|
204 |
</xsl:template>
|
|
205 |
|
|
206 |
<xsl:template match="edition">
|
|
207 |
<td class="highlight">Edition</td>
|
|
208 |
<td class="secondCol">
|
|
209 |
<xsl:value-of select="."/>
|
|
210 |
</td>
|
|
211 |
</xsl:template>
|
|
212 |
|
|
213 |
<xsl:template match="geoform">
|
|
214 |
<td class="highlight" valign="top">Geospatial Data Presentation Form</td>
|
|
215 |
<td class="secondCol">
|
|
216 |
<xsl:value-of select="."/>
|
|
217 |
</td>
|
|
218 |
</xsl:template>
|
|
219 |
|
|
220 |
<xsl:template match="othercit">
|
|
221 |
<td class="highlight" valign="top">Other Citation Details</td>
|
|
222 |
<td class="secondCol">
|
|
223 |
<xsl:value-of select="."/>
|
|
224 |
</td>
|
|
225 |
</xsl:template>
|
|
226 |
|
|
227 |
<xsl:template match="pubinfo">
|
|
228 |
<td class="highlight" valign="top">Publication Information </td>
|
|
229 |
<td class="secondCol">
|
|
230 |
<table>
|
|
231 |
<tr>
|
|
232 |
<xsl:apply-templates select="pubplace"/>
|
|
233 |
</tr>
|
|
234 |
<tr>
|
|
235 |
<xsl:apply-templates select="publish"/>
|
|
236 |
</tr>
|
|
237 |
</table>
|
|
238 |
</td>
|
|
239 |
</xsl:template>
|
|
240 |
|
|
241 |
<xsl:template match="pubplace">
|
|
242 |
<td class="highlight">Publication Place</td>
|
|
243 |
<td class="secondCol">
|
|
244 |
<xsl:value-of select="."/>
|
|
245 |
</td>
|
|
246 |
</xsl:template>
|
|
247 |
|
|
248 |
<xsl:template match="publish">
|
|
249 |
<td class="highlight">Publisher</td>
|
|
250 |
<td class="secondCol">
|
|
251 |
<xsl:value-of select="."/>
|
|
252 |
</td>
|
|
253 |
</xsl:template>
|
|
254 |
|
|
255 |
<xsl:template match="distinfo">
|
|
256 |
<table width="100%" border="0" cellspacing="10">
|
|
257 |
<tr>
|
|
258 |
<td colspan="5" align="center">
|
|
259 |
<h2>Data Package Information</h2>
|
|
260 |
</td>
|
|
261 |
</tr>
|
|
262 |
<tr>
|
|
263 |
<td class="tablehead">
|
|
264 |
File type
|
|
265 |
</td>
|
|
266 |
<td class="tablehead" colspan="2">
|
|
267 |
File name (Doc Id)
|
|
268 |
</td>
|
|
269 |
<xsl:if test="$readonly = 'false'">
|
|
270 |
<td align="left" colspan="2" class="tablehead">
|
|
271 |
Actions...
|
|
272 |
</td>
|
|
273 |
</xsl:if>
|
|
274 |
</tr>
|
|
275 |
<tr>
|
|
276 |
<xsl:apply-templates select="resdesc"/>
|
|
277 |
</tr>
|
|
278 |
<xsl:apply-templates select="stdorder/digform/digtopt/onlinopt/computer/networka"/>
|
|
279 |
</table>
|
|
280 |
</xsl:template>
|
|
281 |
|
|
282 |
<xsl:template match="resdesc">
|
|
283 |
<td class="highlight" align="left" valign="top">Metadata</td>
|
|
284 |
<td class="secondCol" align="left" valign="top">
|
|
285 |
<xsl:value-of select="../custom"/> (<xsl:value-of select="."/>)
|
|
286 |
|
|
287 |
<!-- update -->
|
|
288 |
<xsl:if test="$readonly = 'false'">
|
|
289 |
<br/>
|
|
290 |
<br/>
|
|
291 |
<form method="post" action="./style/common/ClientViewHelper.jspx"
|
|
292 |
enctype="multipart/form-data">
|
|
293 |
<input name="action" value="Update Metadata" type="hidden"/>
|
|
294 |
<input name="docid" type="hidden" value="{.}"/>
|
|
295 |
<input name="qformat" type="hidden" value="{$qformat}"/>
|
|
296 |
<input name="metadataDocId" type="hidden" value="{$docid}"/>
|
|
297 |
<input name="updateFile" type="file"/>
|
|
298 |
<input name="submit" value="Update" type="submit"/>
|
|
299 |
</form>
|
|
300 |
</xsl:if>
|
|
301 |
|
|
302 |
</td>
|
|
303 |
<!-- download -->
|
|
304 |
<td class="secondCol" valign="bottom">
|
|
305 |
<form method="get" action="./style/common/ClientViewHelper.jspx">
|
|
306 |
<input name="action" value="Download" type="submit"/>
|
|
307 |
<input name="docid" type="hidden" value="{.}"/>
|
|
308 |
<input name="qformat" type="hidden" value="{$qformat}"/>
|
|
309 |
<input name="metadataDocId" type="hidden" value="{$docid}"/>
|
|
310 |
</form>
|
|
311 |
</td>
|
|
312 |
|
|
313 |
<xsl:if test="$readonly = 'false'">
|
|
314 |
<!-- delete -->
|
|
315 |
<td class="secondCol" valign="bottom">
|
|
316 |
<form method="get" action="./style/common/ClientViewHelper.jspx"
|
|
317 |
enctype="text/html">
|
|
318 |
<input name="action" value="Delete" type="submit"/>
|
|
319 |
<input name="docid" type="hidden" value="{.}"/>
|
|
320 |
<input name="qformat" type="hidden" value="{$qformat}"/>
|
|
321 |
<input name="metadataDocId" type="hidden" value="{$docid}"/>
|
|
322 |
</form>
|
|
323 |
</td>
|
|
324 |
<!-- set access -->
|
|
325 |
<td class="secondCol" valign="bottom">
|
|
326 |
<form method="get" action="./style/common/ClientViewHelper.jspx">
|
|
327 |
<input name="action" value="Set Access" type="submit"/>
|
|
328 |
<xsl:choose>
|
|
329 |
<xsl:when test="$publicRead = 'true'">
|
|
330 |
<input name="publicAccess" type="checkbox" checked=''/> Public read
|
|
331 |
</xsl:when>
|
|
332 |
<xsl:otherwise>
|
|
333 |
<input name="publicAccess" type="checkbox"/> Public read
|
|
334 |
</xsl:otherwise>
|
|
335 |
</xsl:choose>
|
|
336 |
<input name="docid" type="hidden" value="{.}"/>
|
|
337 |
<input name="qformat" type="hidden" value="{$qformat}"/>
|
|
338 |
<input name="metadataDocId" type="hidden" value="{$docid}"/>
|
|
339 |
<input name="contentStandard" type="hidden" value="FGDC"/>
|
|
340 |
</form>
|
|
341 |
</td>
|
|
342 |
</xsl:if>
|
|
343 |
</xsl:template>
|
|
344 |
|
|
345 |
<xsl:template match="networka">
|
|
346 |
<tr>
|
|
347 |
<xsl:apply-templates select="networkr"/>
|
|
348 |
</tr>
|
|
349 |
</xsl:template>
|
|
350 |
|
|
351 |
<xsl:template match="networkr">
|
|
352 |
<xsl:if test="not(./ancestor::digform/digtinfo/formcont = '')">
|
|
353 |
<td class="highlight" align="left" valign="top">Data</td>
|
|
354 |
<td class="secondCol" align="left" valign="top">
|
|
355 |
<xsl:value-of select="./ancestor::digform/digtinfo/formcont"/> (<xsl:value-of select="."/>)
|
|
356 |
<!-- update -->
|
|
357 |
<xsl:if test="$readonly = 'false'">
|
|
358 |
<br/>
|
|
359 |
<br/>
|
|
360 |
<form method="post" action="./style/common/ClientViewHelper.jspx"
|
|
361 |
enctype="multipart/form-data">
|
|
362 |
<input name="action" value="Update Data" type="hidden"/>
|
|
363 |
<input name="docid" type="hidden" value="{.}"/>
|
|
364 |
<input name="qformat" type="hidden" value="{$qformat}"/>
|
|
365 |
<input name="metadataDocId" type="hidden" value="{$docid}"/>
|
|
366 |
<input name="updateFile" type="file"/>
|
|
367 |
<input name="submit" value="Update" type="submit"/>
|
|
368 |
</form>
|
|
369 |
</xsl:if>
|
|
370 |
</td>
|
|
371 |
<!-- download -->
|
|
372 |
<td class="secondCol" valign="bottom">
|
|
373 |
<form method="get" action="./style/common/ClientViewHelper.jspx" enctype="application/octet-stream">
|
|
374 |
<input name="action" value="Download" type="submit"/>
|
|
375 |
<input name="docid" type="hidden" value="{.}"/>
|
|
376 |
<input name="qformat" type="hidden" value="{$qformat}"/>
|
|
377 |
<input name="metadataDocId" type="hidden" value="{$docid}"/>
|
|
378 |
</form>
|
|
379 |
</td>
|
|
380 |
<xsl:if test="$readonly = 'false'">
|
|
381 |
<!-- delete -->
|
|
382 |
<td class="secondCol" valign="bottom">
|
|
383 |
<form method="get" action="./style/common/ClientViewHelper.jspx"
|
|
384 |
enctype="text/html">
|
|
385 |
<input name="action" value="Delete" type="submit"/>
|
|
386 |
<input name="docid" type="hidden" value="{.}"/>
|
|
387 |
<input name="qformat" type="hidden" value="{$qformat}"/>
|
|
388 |
<input name="metadataDocId" type="hidden" value="{$docid}"/>
|
|
389 |
</form>
|
|
390 |
</td>
|
|
391 |
<!-- set access -->
|
|
392 |
<td class="secondCol" valign="bottom"></td>
|
|
393 |
|
|
394 |
</xsl:if>
|
|
395 |
</xsl:if>
|
|
396 |
</xsl:template>
|
|
397 |
|
|
398 |
<xsl:template name="long_date">
|
|
399 |
<xsl:param name="date"/>
|
|
400 |
<!-- Day -->
|
|
401 |
<xsl:value-of select="number(substring($date, 7, 2))"/>
|
|
402 |
<xsl:text> </xsl:text>
|
|
403 |
<!-- Month -->
|
|
404 |
<xsl:variable name="month" select="number(substring($date, 5, 2))"/>
|
|
405 |
<xsl:choose>
|
|
406 |
<xsl:when test="$month=1">January</xsl:when>
|
|
407 |
<xsl:when test="$month=2">February</xsl:when>
|
|
408 |
<xsl:when test="$month=3">March</xsl:when>
|
|
409 |
<xsl:when test="$month=4">April</xsl:when>
|
|
410 |
<xsl:when test="$month=5">May</xsl:when>
|
|
411 |
<xsl:when test="$month=6">June</xsl:when>
|
|
412 |
<xsl:when test="$month=7">July</xsl:when>
|
|
413 |
<xsl:when test="$month=8">August</xsl:when>
|
|
414 |
<xsl:when test="$month=9">September</xsl:when>
|
|
415 |
<xsl:when test="$month=10">October</xsl:when>
|
|
416 |
<xsl:when test="$month=11">November</xsl:when>
|
|
417 |
<xsl:when test="$month=12">December</xsl:when>
|
|
418 |
<xsl:otherwise>INVALID MONTH</xsl:otherwise>
|
|
419 |
</xsl:choose>
|
|
420 |
<xsl:text> </xsl:text>
|
|
421 |
<!-- Year -->
|
|
422 |
<xsl:value-of select="substring($date, 1, 4)"/>
|
|
423 |
</xsl:template>
|
|
424 |
|
|
425 |
</xsl:stylesheet>
|
0 |
426 |
|
add support for FGDC doctype display