Project

General

Profile

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