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