1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* '$RCSfile$'
|
4
|
* Authors: Matt Jones
|
5
|
* Copyright: 2000 Regents of the University of California and the
|
6
|
* National Center for Ecological Analysis and Synthesis
|
7
|
* For Details: http://www.nceas.ucsb.edu/
|
8
|
*
|
9
|
* '$Author: tao $'
|
10
|
* '$Date: 2003-06-26 18:29:36 -0700 (Thu, 26 Jun 2003) $'
|
11
|
* '$Revision: 1696 $'
|
12
|
*
|
13
|
* This program is free software; you can redistribute it and/or modify
|
14
|
* it under the terms of the GNU General Public License as published by
|
15
|
* the Free Software Foundation; either version 2 of the License, or
|
16
|
* (at your option) any later version.
|
17
|
*
|
18
|
* This program is distributed in the hope that it will be useful,
|
19
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
* GNU General Public License for more details.
|
22
|
*
|
23
|
* You should have received a copy of the GNU General Public License
|
24
|
* along with this program; if not, write to the Free Software
|
25
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26
|
*
|
27
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
28
|
* convert an XML file that is valid with respect to the eml-dataset.dtd
|
29
|
* module of the Ecological Metadata Language (EML) into an HTML format
|
30
|
* suitable for rendering with modern web browsers.
|
31
|
-->
|
32
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
33
|
<xsl:import href="eml-access-2.0.0.xsl"/>
|
34
|
<xsl:import href="eml-additionalmetadata-2.0.0.xsl"/>
|
35
|
<xsl:import href="eml-attribute-2.0.0.xsl"/>
|
36
|
<xsl:import href="eml-attribute-enumeratedDomain-2.0.0.xsl"/>
|
37
|
<xsl:import href="eml-constraint-2.0.0.xsl"/>
|
38
|
<xsl:import href="eml-coverage-2.0.0.xsl"/>
|
39
|
<xsl:import href="eml-dataset-2.0.0.xsl"/>
|
40
|
<xsl:import href="eml-datatable-2.0.0.xsl"/>
|
41
|
<xsl:import href="eml-distribution-2.0.0.xsl"/>
|
42
|
<xsl:import href="eml-entity-2.0.0.xsl"/>
|
43
|
<xsl:import href="eml-identifier-2.0.0.xsl"/>
|
44
|
<xsl:import href="eml-literature-2.0.0.xsl"/>
|
45
|
<xsl:import href="eml-method-2.0.0.xsl"/>
|
46
|
<xsl:import href="eml-otherentity-2.0.0.xsl"/>
|
47
|
<xsl:import href="eml-party-2.0.0.xsl"/>
|
48
|
<xsl:import href="eml-physical-2.0.0.xsl"/>
|
49
|
<xsl:import href="eml-project-2.0.0.xsl"/>
|
50
|
<xsl:import href="eml-protocol-2.0.0.xsl"/>
|
51
|
<xsl:import href="eml-resource-2.0.0.xsl"/>
|
52
|
<xsl:import href="eml-settings-2.0.0.xsl"/>
|
53
|
<xsl:import href="eml-software-2.0.0.xsl"/>
|
54
|
<xsl:import href="eml-spatialraster-2.0.0.xsl"/>
|
55
|
<xsl:import href="eml-spatialvector-2.0.0.xsl"/>
|
56
|
<xsl:import href="eml-storedprocedure-2.0.0.xsl"/>
|
57
|
<xsl:import href="eml-text-2.0.0.xsl"/>
|
58
|
<xsl:import href="eml-view-2.0.0.xsl"/>
|
59
|
|
60
|
<xsl:output method="html" encoding="iso-8859-1"/>
|
61
|
<!-- global variables to store id node set in case to be referenced-->
|
62
|
<xsl:variable name="ids" select="//*[@id!='']"/>
|
63
|
|
64
|
<xsl:template match="/">
|
65
|
<html>
|
66
|
<head>
|
67
|
<link rel="stylesheet" type="text/css"
|
68
|
href="{$stylePath}/{$qformat}.css" />
|
69
|
</head>
|
70
|
<body>
|
71
|
<table xsl:use-attribute-sets="cellspacing" width="100%" >
|
72
|
<tr>
|
73
|
<td rowspan="2"><img src="@web-base-url@/images/KNBLogo.gif"/></td>
|
74
|
<td colspan="7"><div class="title">Biocomplexity Data Search</div>
|
75
|
</td>
|
76
|
</tr>
|
77
|
<tr>
|
78
|
<td><a href="@web-base-url@" class="toollink"> KNB </a></td>
|
79
|
<td><a href="@web-base-url@/data.html" class="toollink">
|
80
|
Data </a></td>
|
81
|
<td><a href="@web-base-url@/people.html" class="toollink">
|
82
|
People </a></td>
|
83
|
<td><a href="@web-base-url@/informatics" class="toollink">
|
84
|
Informatics </a></td>
|
85
|
<td><a href="@web-base-url@/biodiversity" class="toollink">
|
86
|
Biodiversity </a></td>
|
87
|
<td><a href="@web-base-url@/education" class="toollink">
|
88
|
Education </a></td>
|
89
|
<td><a href="@web-base-url@/software" class="toollink">
|
90
|
Software </a></td>
|
91
|
</tr>
|
92
|
<tr>
|
93
|
<td align="right" valign="top" colspan="7">
|
94
|
<form action="@html-path@/servlet/metacat" method="POST">
|
95
|
Data Search: <input type="text" name="anyfield" size="10" />
|
96
|
<input type="hidden" name="action" value="query" />
|
97
|
<input type="hidden" name="qformat" value="knb" />
|
98
|
<input type="hidden" name="operator" value="UNION" />
|
99
|
|
100
|
<input type="hidden" name="returnfield"
|
101
|
value="creator/individualName/surName" />
|
102
|
<input type="hidden" name="returnfield"
|
103
|
value="creator/organizationName" />
|
104
|
<input type="hidden" name="returnfield"
|
105
|
value="originator/individualName/surName" />
|
106
|
<input type="hidden" name="returnfield"
|
107
|
value="originator/individualName/givenName" />
|
108
|
<input type="hidden" name="returnfield"
|
109
|
value="originator/organizationName" />
|
110
|
<input type="hidden" name="returnfield"
|
111
|
value="title" />
|
112
|
<input type="hidden" name="returnfield"
|
113
|
value="keyword" />
|
114
|
<input type="hidden" name="returndoctype"
|
115
|
value="eml://ecoinformatics.org/eml-2.0.0" />
|
116
|
<input type="hidden" name="returndoctype"
|
117
|
value="-//NCEAS//eml-dataset-2.0//EN" />
|
118
|
<input type="hidden" name="returndoctype"
|
119
|
value="-//NCEAS//resource//EN" />
|
120
|
<input type="hidden" name="returndoctype"
|
121
|
value="-//NCEAS//eml-dataset//EN" />
|
122
|
<input type="hidden" name="returndoctype"
|
123
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
|
124
|
<input type="hidden" name="returndoctype"
|
125
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
|
126
|
</form>
|
127
|
</td>
|
128
|
</tr>
|
129
|
</table>
|
130
|
<xsl:apply-templates select="*[local-name()='eml']"/>
|
131
|
</body>
|
132
|
</html>
|
133
|
</xsl:template>
|
134
|
|
135
|
<xsl:template match="*[local-name()='eml']">
|
136
|
<xsl:for-each select="dataset">
|
137
|
<xsl:call-template name="emldataset"/>
|
138
|
</xsl:for-each>
|
139
|
<xsl:for-each select="citation">
|
140
|
<xsl:call-template name="emlcitation"/>
|
141
|
</xsl:for-each>
|
142
|
<xsl:for-each select="software">
|
143
|
<xsl:call-template name="emlsoftware"/>
|
144
|
</xsl:for-each>
|
145
|
<xsl:for-each select="protocol">
|
146
|
<xsl:call-template name="emlprotocol"/>
|
147
|
</xsl:for-each>
|
148
|
<!-- Additinal metadata-->
|
149
|
<xsl:choose>
|
150
|
<xsl:when test="$displaymodule='additionalmetadata'">
|
151
|
<xsl:for-each select="additionalMetadata">
|
152
|
<xsl:if test="$additionalmetadataindex=position()">
|
153
|
<xsl:call-template name="additionalmetadata"/>
|
154
|
</xsl:if>
|
155
|
</xsl:for-each>
|
156
|
</xsl:when>
|
157
|
<xsl:otherwise>
|
158
|
<xsl:if test="$displaymodule='dataset'">
|
159
|
<xsl:for-each select="additionalMetadata">
|
160
|
<xsl:call-template name="additionalmetadataURL">
|
161
|
<xsl:with-param name="index" select="position()"/>
|
162
|
</xsl:call-template>
|
163
|
</xsl:for-each>
|
164
|
</xsl:if>
|
165
|
</xsl:otherwise>
|
166
|
</xsl:choose>
|
167
|
<!-- xml format-->
|
168
|
<xsl:if test="$displaymodule='dataset'">
|
169
|
<xsl:call-template name="xml"/>
|
170
|
</xsl:if>
|
171
|
</xsl:template>
|
172
|
|
173
|
<!--********************************************************
|
174
|
dataset part
|
175
|
********************************************************-->
|
176
|
|
177
|
<xsl:template name="emldataset">
|
178
|
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
|
179
|
<xsl:if test="$displaymodule='dataset'">
|
180
|
<xsl:call-template name="datasetpart"/>
|
181
|
</xsl:if>
|
182
|
<xsl:if test="$displaymodule='entity'">
|
183
|
<xsl:call-template name="entitypart"/>
|
184
|
</xsl:if>
|
185
|
<xsl:if test="$displaymodule='attribute'">
|
186
|
<xsl:call-template name="attributepart"/>
|
187
|
</xsl:if>
|
188
|
<xsl:if test="$displaymodule='attributedomain'">
|
189
|
<xsl:call-template name="datasetattributedomain"/>
|
190
|
</xsl:if>
|
191
|
<xsl:if test="$displaymodule='attributecoverage'">
|
192
|
<xsl:call-template name="datasetattributecoverage"/>
|
193
|
</xsl:if>
|
194
|
<xsl:if test="$displaymodule='attributemethod'">
|
195
|
<xsl:call-template name="datasetattributemethod"/>
|
196
|
</xsl:if>
|
197
|
<xsl:if test="$displaymodule='inlinedata'">
|
198
|
<xsl:call-template name="datasetinlinedata"/>
|
199
|
</xsl:if>
|
200
|
</table>
|
201
|
</xsl:template>
|
202
|
|
203
|
<!--*************** Data set part *************-->
|
204
|
<xsl:template name="datasetpart">
|
205
|
<tr><td colspan="2" width="100%">
|
206
|
<right>
|
207
|
<h3>Data Set Description</h3>
|
208
|
</right>
|
209
|
</td></tr>
|
210
|
<xsl:call-template name="identifier">
|
211
|
<xsl:with-param name="packageID" select="../@packageId"/>
|
212
|
<xsl:with-param name="system" select="../@system"/>
|
213
|
</xsl:call-template>
|
214
|
<tr>
|
215
|
<td colspan="2" width="100%">
|
216
|
<xsl:apply-templates select="." mode="dataset"/>
|
217
|
</td>
|
218
|
</tr>
|
219
|
</xsl:template>
|
220
|
|
221
|
<!--************ Entity part *****************-->
|
222
|
<xsl:template name="entitypart">
|
223
|
<xsl:choose>
|
224
|
<xsl:when test="references!=''">
|
225
|
<xsl:variable name="ref_id" select="references"/>
|
226
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
227
|
<xsl:for-each select="$references">
|
228
|
<xsl:call-template name="entitypartcommon"/>
|
229
|
</xsl:for-each>
|
230
|
</xsl:when>
|
231
|
<xsl:otherwise>
|
232
|
<xsl:call-template name="entitypartcommon"/>
|
233
|
</xsl:otherwise>
|
234
|
</xsl:choose>
|
235
|
</xsl:template>
|
236
|
|
237
|
|
238
|
<xsl:template name="entitypartcommon">
|
239
|
<tr><td colspan="2" width="100%" >
|
240
|
<right>
|
241
|
<h3>Entity Description</h3>
|
242
|
</right>
|
243
|
</td></tr>
|
244
|
<xsl:call-template name="identifier">
|
245
|
<xsl:with-param name="packageID" select="../@packageId"/>
|
246
|
<xsl:with-param name="system" select="../@system"/>
|
247
|
</xsl:call-template>
|
248
|
<tr>
|
249
|
<td width="100%" colspan="2">
|
250
|
<!-- find the subtree to process -->
|
251
|
<xsl:call-template name="chooseentity"/>
|
252
|
</td>
|
253
|
</tr>
|
254
|
</xsl:template>
|
255
|
|
256
|
<!--************ Attribute part *****************-->
|
257
|
<xsl:template name="attributepart">
|
258
|
<tr><td width="100%">
|
259
|
<right>
|
260
|
<h3>Attributes Description</h3>
|
261
|
</right>
|
262
|
</td></tr>
|
263
|
<tr>
|
264
|
<td width="100%">
|
265
|
<!-- find the subtree to process -->
|
266
|
<xsl:if test="$entitytype='dataTable'">
|
267
|
<xsl:for-each select="dataTable">
|
268
|
<xsl:if test="position()=$entityindex">
|
269
|
<xsl:for-each select="attributeList">
|
270
|
<xsl:call-template name="attributelist">
|
271
|
<xsl:with-param name="docid" select="$docid"/>
|
272
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
273
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
274
|
</xsl:call-template>
|
275
|
</xsl:for-each>
|
276
|
</xsl:if>
|
277
|
</xsl:for-each>
|
278
|
</xsl:if>
|
279
|
</td>
|
280
|
</tr>
|
281
|
</xsl:template>
|
282
|
|
283
|
<!--************************Attribute Domain************************-->
|
284
|
<xsl:template name="datasetattributedomain">
|
285
|
<tr><td>
|
286
|
<right>
|
287
|
<h3>Attributes Domain</h3>
|
288
|
</right>
|
289
|
</td></tr>
|
290
|
<tr>
|
291
|
<td width="100%">
|
292
|
<!-- find the subtree to process -->
|
293
|
<xsl:call-template name="chooseentity"/>
|
294
|
</td>
|
295
|
</tr>
|
296
|
</xsl:template>
|
297
|
|
298
|
|
299
|
<!--************************Attribute Method************************-->
|
300
|
<xsl:template name="datasetattributemethod">
|
301
|
<tr><td>
|
302
|
<right>
|
303
|
<h3>Attributes Method</h3>
|
304
|
</right>
|
305
|
</td></tr>
|
306
|
<tr>
|
307
|
<td width="100%">
|
308
|
<!-- find the subtree to process -->
|
309
|
<xsl:call-template name="chooseentity"/>
|
310
|
</td>
|
311
|
</tr>
|
312
|
</xsl:template>
|
313
|
|
314
|
|
315
|
<!--************************Attribute Coverage************************-->
|
316
|
<xsl:template name="datasetattributecoverage">
|
317
|
<tr><td>
|
318
|
<right>
|
319
|
<h3>Attributes Coverage</h3>
|
320
|
</right>
|
321
|
</td></tr>
|
322
|
<tr>
|
323
|
<td width="100%">
|
324
|
<!-- find the subtree to process -->
|
325
|
<xsl:call-template name="chooseentity"/>
|
326
|
</td>
|
327
|
</tr>
|
328
|
</xsl:template>
|
329
|
|
330
|
|
331
|
<xsl:template name="chooseentity">
|
332
|
<xsl:if test="$entitytype='dataTable'">
|
333
|
<xsl:for-each select="dataTable">
|
334
|
<xsl:if test="position()=$entityindex">
|
335
|
<xsl:choose>
|
336
|
<xsl:when test="references!=''">
|
337
|
<xsl:variable name="ref_id" select="references"/>
|
338
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
339
|
<xsl:for-each select="$references">
|
340
|
<xsl:choose>
|
341
|
<xsl:when test="$displaymodule='entity'">
|
342
|
<xsl:call-template name="dataTable">
|
343
|
<xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
|
344
|
<xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>
|
345
|
<xsl:with-param name="docid" select="$docid"/>
|
346
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
347
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
348
|
</xsl:call-template>
|
349
|
</xsl:when>
|
350
|
<xsl:otherwise>
|
351
|
<xsl:call-template name="chooseattributelist"/>
|
352
|
</xsl:otherwise>
|
353
|
</xsl:choose>
|
354
|
</xsl:for-each>
|
355
|
</xsl:when>
|
356
|
<xsl:otherwise>
|
357
|
<xsl:choose>
|
358
|
<xsl:when test="$displaymodule='entity'">
|
359
|
<xsl:call-template name="dataTable">
|
360
|
<xsl:with-param name="datatablefirstColStyle" select="$firstColStyle"/>
|
361
|
<xsl:with-param name="datatablesubHeaderStyle" select="$subHeaderStyle"/>
|
362
|
<xsl:with-param name="docid" select="$docid"/>
|
363
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
364
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
365
|
</xsl:call-template>
|
366
|
</xsl:when>
|
367
|
<xsl:otherwise>
|
368
|
<xsl:call-template name="chooseattributelist"/>
|
369
|
</xsl:otherwise>
|
370
|
</xsl:choose>
|
371
|
</xsl:otherwise>
|
372
|
</xsl:choose>
|
373
|
</xsl:if>
|
374
|
</xsl:for-each>
|
375
|
</xsl:if>
|
376
|
<xsl:if test="$entitytype='spatialRaster'">
|
377
|
<xsl:for-each select="spatialRaster">
|
378
|
<xsl:if test="position()=$entityindex">
|
379
|
<xsl:choose>
|
380
|
<xsl:when test="references!=''">
|
381
|
<xsl:variable name="ref_id" select="references"/>
|
382
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
383
|
<xsl:for-each select="$references">
|
384
|
<xsl:choose>
|
385
|
<xsl:when test="$displaymodule='entity'">
|
386
|
<xsl:call-template name="spatialRaster">
|
387
|
<xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
|
388
|
<xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>
|
389
|
<xsl:with-param name="docid" select="$docid"/>
|
390
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
391
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
392
|
</xsl:call-template>
|
393
|
</xsl:when>
|
394
|
<xsl:otherwise>
|
395
|
<xsl:call-template name="chooseattributelist"/>
|
396
|
</xsl:otherwise>
|
397
|
</xsl:choose>
|
398
|
</xsl:for-each>
|
399
|
</xsl:when>
|
400
|
<xsl:otherwise>
|
401
|
<xsl:choose>
|
402
|
<xsl:when test="$displaymodule='entity'">
|
403
|
<xsl:call-template name="spatialRaster">
|
404
|
<xsl:with-param name="spatialrasterfirstColStyle" select="$firstColStyle"/>
|
405
|
<xsl:with-param name="spatialrastersubHeaderStyle" select="$subHeaderStyle"/>
|
406
|
<xsl:with-param name="docid" select="$docid"/>
|
407
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
408
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
409
|
</xsl:call-template>
|
410
|
</xsl:when>
|
411
|
<xsl:otherwise>
|
412
|
<xsl:call-template name="chooseattributelist"/>
|
413
|
</xsl:otherwise>
|
414
|
</xsl:choose>
|
415
|
</xsl:otherwise>
|
416
|
</xsl:choose>
|
417
|
</xsl:if>
|
418
|
</xsl:for-each>
|
419
|
</xsl:if>
|
420
|
<xsl:if test="$entitytype='spatialVector'">
|
421
|
<xsl:for-each select="spatialVector">
|
422
|
<xsl:if test="position()=$entityindex">
|
423
|
<xsl:choose>
|
424
|
<xsl:when test="references!=''">
|
425
|
<xsl:variable name="ref_id" select="references"/>
|
426
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
427
|
<xsl:for-each select="$references">
|
428
|
<xsl:choose>
|
429
|
<xsl:when test="$displaymodule='entity'">
|
430
|
<xsl:call-template name="spatialVector">
|
431
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
|
432
|
<xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>
|
433
|
<xsl:with-param name="docid" select="$docid"/>
|
434
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
435
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
436
|
</xsl:call-template>
|
437
|
</xsl:when>
|
438
|
<xsl:otherwise>
|
439
|
<xsl:call-template name="chooseattributelist"/>
|
440
|
</xsl:otherwise>
|
441
|
</xsl:choose>
|
442
|
</xsl:for-each>
|
443
|
</xsl:when>
|
444
|
<xsl:otherwise>
|
445
|
<xsl:choose>
|
446
|
<xsl:when test="$displaymodule='entity'">
|
447
|
<xsl:call-template name="spatialVector">
|
448
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$firstColStyle"/>
|
449
|
<xsl:with-param name="spatialvectorsubHeaderStyle" select="$subHeaderStyle"/>
|
450
|
<xsl:with-param name="docid" select="$docid"/>
|
451
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
452
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
453
|
</xsl:call-template>
|
454
|
</xsl:when>
|
455
|
<xsl:otherwise>
|
456
|
<xsl:call-template name="chooseattributelist"/>
|
457
|
</xsl:otherwise>
|
458
|
</xsl:choose>
|
459
|
</xsl:otherwise>
|
460
|
</xsl:choose>
|
461
|
</xsl:if>
|
462
|
</xsl:for-each>
|
463
|
</xsl:if>
|
464
|
<xsl:if test="$entitytype='storedProcedure'">
|
465
|
<xsl:for-each select="storedProcedure">
|
466
|
<xsl:if test="position()=$entityindex">
|
467
|
<xsl:choose>
|
468
|
<xsl:when test="references!=''">
|
469
|
<xsl:variable name="ref_id" select="references"/>
|
470
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
471
|
<xsl:for-each select="$references">
|
472
|
<xsl:choose>
|
473
|
<xsl:when test="$displaymodule='entity'">
|
474
|
<xsl:call-template name="storedProcedure">
|
475
|
<xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
|
476
|
<xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>
|
477
|
<xsl:with-param name="docid" select="$docid"/>
|
478
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
479
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
480
|
</xsl:call-template>
|
481
|
</xsl:when>
|
482
|
<xsl:otherwise>
|
483
|
<xsl:call-template name="chooseattributelist"/>
|
484
|
</xsl:otherwise>
|
485
|
</xsl:choose>
|
486
|
</xsl:for-each>
|
487
|
</xsl:when>
|
488
|
<xsl:otherwise>
|
489
|
<xsl:choose>
|
490
|
<xsl:when test="$displaymodule='entity'">
|
491
|
<xsl:call-template name="storedProcedure">
|
492
|
<xsl:with-param name="storedprocedurefirstColStyle" select="$firstColStyle"/>
|
493
|
<xsl:with-param name="storedproceduresubHeaderStyle" select="$subHeaderStyle"/>
|
494
|
<xsl:with-param name="docid" select="$docid"/>
|
495
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
496
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
497
|
</xsl:call-template>
|
498
|
</xsl:when>
|
499
|
<xsl:otherwise>
|
500
|
<xsl:call-template name="chooseattributelist"/>
|
501
|
</xsl:otherwise>
|
502
|
</xsl:choose>
|
503
|
</xsl:otherwise>
|
504
|
</xsl:choose>
|
505
|
</xsl:if>
|
506
|
</xsl:for-each>
|
507
|
</xsl:if>
|
508
|
<xsl:if test="$entitytype='view'">
|
509
|
<xsl:for-each select="view">
|
510
|
<xsl:if test="position()=$entityindex">
|
511
|
<xsl:choose>
|
512
|
<xsl:when test="references!=''">
|
513
|
<xsl:variable name="ref_id" select="references"/>
|
514
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
515
|
<xsl:for-each select="$references">
|
516
|
<xsl:choose>
|
517
|
<xsl:when test="$displaymodule='entity'">
|
518
|
<xsl:call-template name="view">
|
519
|
<xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
|
520
|
<xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>
|
521
|
<xsl:with-param name="docid" select="$docid"/>
|
522
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
523
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
524
|
</xsl:call-template>
|
525
|
</xsl:when>
|
526
|
<xsl:otherwise>
|
527
|
<xsl:call-template name="chooseattributelist"/>
|
528
|
</xsl:otherwise>
|
529
|
</xsl:choose>
|
530
|
</xsl:for-each>
|
531
|
</xsl:when>
|
532
|
<xsl:otherwise>
|
533
|
<xsl:choose>
|
534
|
<xsl:when test="$displaymodule='entity'">
|
535
|
<xsl:call-template name="view">
|
536
|
<xsl:with-param name="viewfirstColStyle" select="$firstColStyle"/>
|
537
|
<xsl:with-param name="viewsubHeaderStyle" select="$subHeaderStyle"/>
|
538
|
<xsl:with-param name="docid" select="$docid"/>
|
539
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
540
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
541
|
</xsl:call-template>
|
542
|
</xsl:when>
|
543
|
<xsl:otherwise>
|
544
|
<xsl:call-template name="chooseattributelist"/>
|
545
|
</xsl:otherwise>
|
546
|
</xsl:choose>
|
547
|
</xsl:otherwise>
|
548
|
</xsl:choose>
|
549
|
</xsl:if>
|
550
|
</xsl:for-each>
|
551
|
</xsl:if>
|
552
|
<xsl:if test="$entitytype='otherEntity'">
|
553
|
<xsl:for-each select="otherEntity">
|
554
|
<xsl:if test="position()=$entityindex">
|
555
|
<xsl:choose>
|
556
|
<xsl:when test="references!=''">
|
557
|
<xsl:variable name="ref_id" select="references"/>
|
558
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
559
|
<xsl:for-each select="$references">
|
560
|
<xsl:choose>
|
561
|
<xsl:when test="$displaymodule='entity'">
|
562
|
<xsl:call-template name="otherEntity">
|
563
|
<xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
|
564
|
<xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>
|
565
|
<xsl:with-param name="docid" select="$docid"/>
|
566
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
567
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
568
|
</xsl:call-template>
|
569
|
</xsl:when>
|
570
|
<xsl:otherwise>
|
571
|
<xsl:call-template name="chooseattributelist"/>
|
572
|
</xsl:otherwise>
|
573
|
</xsl:choose>
|
574
|
</xsl:for-each>
|
575
|
</xsl:when>
|
576
|
<xsl:otherwise>
|
577
|
<xsl:choose>
|
578
|
<xsl:when test="$displaymodule='entity'">
|
579
|
<xsl:call-template name="otherEntity">
|
580
|
<xsl:with-param name="otherentityfirstColStyle" select="$firstColStyle"/>
|
581
|
<xsl:with-param name="otherentitysubHeaderStyle" select="$subHeaderStyle"/>
|
582
|
<xsl:with-param name="docid" select="$docid"/>
|
583
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
584
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
585
|
</xsl:call-template>
|
586
|
</xsl:when>
|
587
|
<xsl:otherwise>
|
588
|
<xsl:call-template name="chooseattributelist"/>
|
589
|
</xsl:otherwise>
|
590
|
</xsl:choose>
|
591
|
</xsl:otherwise>
|
592
|
</xsl:choose>
|
593
|
</xsl:if>
|
594
|
</xsl:for-each>
|
595
|
</xsl:if>
|
596
|
</xsl:template>
|
597
|
|
598
|
<xsl:template name="chooseattributelist">
|
599
|
<xsl:for-each select="attributeList">
|
600
|
<xsl:choose>
|
601
|
<xsl:when test="references!=''">
|
602
|
<xsl:variable name="ref_id" select="references"/>
|
603
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
604
|
<xsl:for-each select="$references">
|
605
|
<xsl:call-template name="chooseattribute"/>
|
606
|
</xsl:for-each>
|
607
|
</xsl:when>
|
608
|
<xsl:otherwise>
|
609
|
<xsl:call-template name="chooseattribute"/>
|
610
|
</xsl:otherwise>
|
611
|
</xsl:choose>
|
612
|
</xsl:for-each>
|
613
|
</xsl:template>
|
614
|
|
615
|
<xsl:template name="chooseattribute">
|
616
|
<xsl:for-each select="attribute">
|
617
|
<xsl:if test="position()=$attributeindex">
|
618
|
<xsl:if test="$displaymodule='attributedomain'">
|
619
|
<xsl:for-each select="measurementScale/*/*">
|
620
|
<xsl:call-template name="nonNumericDomain">
|
621
|
<xsl:with-param name="nondomainfirstColStyle" select="$firstColStyle"/>
|
622
|
</xsl:call-template>
|
623
|
</xsl:for-each>
|
624
|
</xsl:if>
|
625
|
<xsl:if test="$displaymodule='attributecoverage'">
|
626
|
<xsl:for-each select="coverage">
|
627
|
<xsl:call-template name="coverage">
|
628
|
</xsl:call-template>
|
629
|
</xsl:for-each>
|
630
|
</xsl:if>
|
631
|
<xsl:if test="$displaymodule='attributemethod'">
|
632
|
<xsl:for-each select="method">
|
633
|
<xsl:call-template name="method">
|
634
|
<xsl:with-param name="methodfirstColStyle" select="$firstColStyle"/>
|
635
|
<xsl:with-param name="methodsubHeaderStyle" select="$firstColStyle"/>
|
636
|
</xsl:call-template>
|
637
|
</xsl:for-each>
|
638
|
</xsl:if>
|
639
|
</xsl:if>
|
640
|
</xsl:for-each>
|
641
|
</xsl:template>
|
642
|
|
643
|
|
644
|
|
645
|
<!--*************************Distribution Inline Data*****************-->
|
646
|
<xsl:template name="datasetinlinedata">
|
647
|
<tr><td>
|
648
|
<right>
|
649
|
<h3>Inline Data</h3>
|
650
|
</right>
|
651
|
</td></tr>
|
652
|
<tr>
|
653
|
<td width="100%">
|
654
|
<xsl:if test="$distributionlevel='toplevel'">
|
655
|
<xsl:for-each select="distribution">
|
656
|
<xsl:if test="position=$distributionindex">
|
657
|
<xsl:choose>
|
658
|
<xsl:when test="references!=''">
|
659
|
<xsl:variable name="ref_id1" select="references"/>
|
660
|
<xsl:variable name="references1" select="$ids[@id=$ref_id1]" />
|
661
|
<xsl:for-each select="$references1">
|
662
|
<xsl:for-each select="inline">
|
663
|
<xsl:value-of select="."/>
|
664
|
</xsl:for-each>
|
665
|
</xsl:for-each>
|
666
|
</xsl:when>
|
667
|
<xsl:otherwise>
|
668
|
<xsl:for-each select="inline">
|
669
|
<xsl:value-of select="."/>
|
670
|
</xsl:for-each>
|
671
|
</xsl:otherwise>
|
672
|
</xsl:choose>
|
673
|
</xsl:if>
|
674
|
</xsl:for-each>
|
675
|
</xsl:if>
|
676
|
<xsl:if test="$distributionlevel='entitylevel'">
|
677
|
<xsl:if test="$entitytype='dataTable'">
|
678
|
<xsl:for-each select="dataTable">
|
679
|
<xsl:if test="position()=$entityindex">
|
680
|
<xsl:choose>
|
681
|
<xsl:when test="references!=''">
|
682
|
<xsl:variable name="ref_id2" select="references"/>
|
683
|
<xsl:variable name="references2" select="$ids[@id=$ref_id2]" />
|
684
|
<xsl:for-each select="$references2">
|
685
|
<xsl:call-template name="choosephysical"/>
|
686
|
</xsl:for-each>
|
687
|
</xsl:when>
|
688
|
<xsl:otherwise>
|
689
|
<xsl:call-template name="choosephysical"/>
|
690
|
</xsl:otherwise>
|
691
|
</xsl:choose>
|
692
|
</xsl:if>
|
693
|
</xsl:for-each>
|
694
|
</xsl:if>
|
695
|
</xsl:if>
|
696
|
</td>
|
697
|
</tr>
|
698
|
</xsl:template>
|
699
|
|
700
|
<xsl:template name="choosephysical">
|
701
|
<xsl:for-each select="physical">
|
702
|
<xsl:if test="position()=$physicalindex">
|
703
|
<xsl:choose>
|
704
|
<xsl:when test="references!=''">
|
705
|
<xsl:variable name="ref_id" select="references"/>
|
706
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
707
|
<xsl:for-each select="$references">
|
708
|
<xsl:call-template name="choosedistribution"/>
|
709
|
</xsl:for-each>
|
710
|
</xsl:when>
|
711
|
<xsl:otherwise>
|
712
|
<xsl:call-template name="choosedistribution"/>
|
713
|
</xsl:otherwise>
|
714
|
</xsl:choose>
|
715
|
</xsl:if>
|
716
|
</xsl:for-each>
|
717
|
</xsl:template>
|
718
|
|
719
|
<xsl:template name="choosedistribution">
|
720
|
<xsl:for-each select="distribution">
|
721
|
<xsl:if test="$distributionindex=position()">
|
722
|
<xsl:choose>
|
723
|
<xsl:when test="references!=''">
|
724
|
<xsl:variable name="ref_id" select="references"/>
|
725
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
726
|
<xsl:for-each select="$references">
|
727
|
<xsl:for-each select="inline">
|
728
|
<xsl:value-of select="."/>
|
729
|
</xsl:for-each>
|
730
|
</xsl:for-each>
|
731
|
</xsl:when>
|
732
|
<xsl:otherwise>
|
733
|
<xsl:for-each select="inline">
|
734
|
<xsl:value-of select="."/>
|
735
|
</xsl:for-each>
|
736
|
</xsl:otherwise>
|
737
|
</xsl:choose>
|
738
|
</xsl:if>
|
739
|
</xsl:for-each>
|
740
|
</xsl:template>
|
741
|
|
742
|
|
743
|
<!--********************************************************
|
744
|
Citation part
|
745
|
********************************************************-->
|
746
|
<xsl:template name="emlcitation">
|
747
|
|
748
|
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
|
749
|
<tr>
|
750
|
<td width="100%" colspan="2">
|
751
|
<right>
|
752
|
<h3>Citation Description</h3>
|
753
|
</right>
|
754
|
</td>
|
755
|
</tr>
|
756
|
<xsl:call-template name="identifier">
|
757
|
<xsl:with-param name="packageID" select="../@packageId"/>
|
758
|
<xsl:with-param name="system" select="../@system"/>
|
759
|
</xsl:call-template>
|
760
|
<tr>
|
761
|
<td width="100%" colspan="2">
|
762
|
<xsl:call-template name="citation">
|
763
|
<xsl:with-param name="citationfirstColStyle" select="$firstColStyle"/>
|
764
|
<xsl:with-param name="citationsubHeaderStyle" select="$subHeaderStyle"/>
|
765
|
</xsl:call-template>
|
766
|
</td>
|
767
|
</tr>
|
768
|
</table>
|
769
|
</xsl:template>
|
770
|
|
771
|
|
772
|
|
773
|
<!--********************************************************
|
774
|
Software part
|
775
|
********************************************************-->
|
776
|
|
777
|
<xsl:template name="emlsoftware">
|
778
|
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
|
779
|
<tr>
|
780
|
<td width="100%" colspan="2">
|
781
|
<right>
|
782
|
<h3>Software Description</h3>
|
783
|
</right>
|
784
|
</td>
|
785
|
</tr>
|
786
|
<xsl:call-template name="identifier">
|
787
|
<xsl:with-param name="packageID" select="../@packageId"/>
|
788
|
<xsl:with-param name="system" select="../@system"/>
|
789
|
</xsl:call-template>
|
790
|
<tr>
|
791
|
<td width="100%" colspan="2">
|
792
|
<xsl:call-template name="software">
|
793
|
<xsl:with-param name="softwarefirstColStyle" select="$firstColStyle"/>
|
794
|
<xsl:with-param name="softwaresubHeaderStyle" select="$subHeaderStyle"/>
|
795
|
</xsl:call-template>
|
796
|
</td>
|
797
|
</tr>
|
798
|
</table>
|
799
|
</xsl:template>
|
800
|
|
801
|
|
802
|
<!--********************************************************
|
803
|
Protocal part
|
804
|
********************************************************-->
|
805
|
|
806
|
<xsl:template name="emlprotocol">
|
807
|
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
|
808
|
<tr>
|
809
|
<td width="100%" colspan="2">
|
810
|
<right>
|
811
|
<h3>Protocal Description</h3>
|
812
|
</right>
|
813
|
</td>
|
814
|
</tr>
|
815
|
<xsl:call-template name="identifier">
|
816
|
<xsl:with-param name="packageID" select="../@packageId"/>
|
817
|
<xsl:with-param name="system" select="../@system"/>
|
818
|
</xsl:call-template>
|
819
|
<tr>
|
820
|
<td width="100%" colspan="2">
|
821
|
<xsl:call-template name="protocol">
|
822
|
<xsl:with-param name="protocolfirstColStyle" select="$firstColStyle"/>
|
823
|
<xsl:with-param name="protocolsubHeaderStyle" select="$subHeaderStyle"/>
|
824
|
</xsl:call-template>
|
825
|
</td>
|
826
|
</tr>
|
827
|
</table>
|
828
|
</xsl:template>
|
829
|
|
830
|
<!--********************************************************
|
831
|
additionalmetadata part
|
832
|
********************************************************-->
|
833
|
<xsl:template name="additionalmetadataURL">
|
834
|
<xsl:param name="index"/>
|
835
|
<table xsl:use-attribute-sets="cellspacing" class="default" width="100%">
|
836
|
<tr><td width="100%" class="{$subHeaderStyle}">
|
837
|
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI"/><xsl:value-of select="$docid"/>&displaymodule=additionalmetadata&additionalmetadataindex=<xsl:value-of select="$index"/></xsl:attribute>
|
838
|
<b>Additional Metadata</b></a>
|
839
|
</td>
|
840
|
</tr>
|
841
|
</table>
|
842
|
</xsl:template>
|
843
|
<!--********************************************************
|
844
|
download xml part
|
845
|
********************************************************-->
|
846
|
<xsl:template name="xml">
|
847
|
<xsl:param name="index"/>
|
848
|
<table xsl:use-attribute-sets="cellspacing" class="default" width="100%">
|
849
|
<tr><td width="100%" class="{$subHeaderStyle}">
|
850
|
<a><xsl:attribute name="href"><xsl:value-of select="$xmlURI"/><xsl:value-of select="$docid"/></xsl:attribute>
|
851
|
<b>Original XML File</b></a>
|
852
|
</td>
|
853
|
</tr>
|
854
|
</table>
|
855
|
</xsl:template>
|
856
|
</xsl:stylesheet>
|