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