Revision 1702
Added by Jing Tao about 21 years ago
eml-resource-2.0.0.xsl~ | ||
---|---|---|
30 | 30 |
* suitable for rendering with modern web browsers. |
31 | 31 |
--> |
32 | 32 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
33 |
<xsl:import href="eml-party-2.0.0.xsl"/> |
|
33 |
<!--<xsl:import href="eml-party-2.0.0.xsl"/>
|
|
34 | 34 |
<xsl:import href="eml-distribution-2.0.0.xsl"/> |
35 |
<xsl:import href="eml-coverage-2.0.0.xsl"/>--> |
|
35 | 36 |
<xsl:output method="html" encoding="iso-8859-1"/> |
36 | 37 |
|
37 | 38 |
<!-- This module is for resouce and it is self-contained (it is table)--> |
38 | 39 |
<xsl:template name="resource"> |
39 | 40 |
<xsl:param name="resfirstColStyle"/> |
40 | 41 |
<xsl:param name="ressubHeaderStyle"/> |
41 |
<table class="tabledefault" width="100%"> |
|
42 |
<xsl:param name="creator">Data Set Owner(s):</xsl:param> |
|
43 |
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%"> |
|
42 | 44 |
<xsl:for-each select="alternateIdentifier"> |
43 | 45 |
<xsl:call-template name="resourcealternateIdentifier"> |
44 | 46 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
... | ... | |
58 | 60 |
</xsl:call-template> |
59 | 61 |
</xsl:for-each> |
60 | 62 |
|
63 |
<xsl:for-each select="pubDate"> |
|
64 |
<xsl:call-template name="resourcepubDate" > |
|
65 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
|
66 |
</xsl:call-template> |
|
67 |
</xsl:for-each> |
|
68 |
|
|
69 |
<xsl:for-each select="language"> |
|
70 |
<xsl:call-template name="resourcelanguage" > |
|
71 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
|
72 |
</xsl:call-template> |
|
73 |
</xsl:for-each> |
|
74 |
|
|
75 |
<xsl:for-each select="series"> |
|
76 |
<xsl:call-template name="resourceseries" > |
|
77 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
|
78 |
</xsl:call-template> |
|
79 |
</xsl:for-each> |
|
80 |
|
|
61 | 81 |
<xsl:if test="creator"> |
62 | 82 |
<tr><td class="{$ressubHeaderStyle}" colspan="2"> |
63 |
<xsl:text>Data Set Owner(s):</xsl:text>
|
|
83 |
<xsl:value-of select="$creator"/>
|
|
64 | 84 |
</td></tr> |
65 | 85 |
</xsl:if> |
66 | 86 |
<xsl:for-each select="creator"> |
... | ... | |
90 | 110 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
91 | 111 |
</xsl:call-template> |
92 | 112 |
</xsl:for-each> |
93 |
|
|
94 |
<xsl:for-each select="pubDate"> |
|
95 |
<xsl:call-template name="resourcepubDate" > |
|
96 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
|
97 |
</xsl:call-template> |
|
98 |
</xsl:for-each> |
|
99 |
|
|
100 |
<xsl:for-each select="language"> |
|
101 |
<xsl:call-template name="resourcelanguage" > |
|
102 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
|
103 |
</xsl:call-template> |
|
104 |
</xsl:for-each> |
|
105 |
|
|
106 |
<xsl:for-each select="series"> |
|
107 |
<xsl:call-template name="resourceseries" > |
|
108 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
|
109 |
</xsl:call-template> |
|
110 |
</xsl:for-each> |
|
111 |
|
|
113 |
|
|
112 | 114 |
<xsl:for-each select="abstract"> |
113 | 115 |
<xsl:call-template name="resourceabstract" > |
114 | 116 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
... | ... | |
144 | 146 |
<xsl:call-template name="resourcedistribution"> |
145 | 147 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
146 | 148 |
<xsl:with-param name="ressubHeaderStyle" select="$ressubHeaderStyle"/> |
149 |
<xsl:with-param name="index" select="position()"/> |
|
147 | 150 |
</xsl:call-template> |
148 | 151 |
</xsl:for-each> |
149 | 152 |
</table> |
153 |
|
|
154 |
<xsl:for-each select="coverage"> |
|
155 |
<xsl:call-template name="resourcecoverage"> |
|
156 |
<xsl:with-param name="resfirstColStyle" select="$resfirstColStyle"/> |
|
157 |
<xsl:with-param name="ressubHeaderStyle" select="$ressubHeaderStyle"/> |
|
158 |
</xsl:call-template> |
|
159 |
</xsl:for-each> |
|
160 |
|
|
150 | 161 |
</xsl:template> |
151 | 162 |
|
152 | 163 |
<xsl:template name="resourcealternateIdentifier" > |
... | ... | |
202 | 213 |
<xsl:with-param name="partyfirstColStyle" select="$resfirstColStyle"/> |
203 | 214 |
</xsl:call-template> |
204 | 215 |
</td></tr> |
205 |
<tr><td width="{$firstColWidth}" class="{$resfirstColStyle}"> </td> |
|
206 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> </td></tr> |
|
207 |
</xsl:template> |
|
216 |
</xsl:template> |
|
208 | 217 |
|
209 | 218 |
<!--<xsl:template match="metadataProvider[1]" mode="resource"> |
210 | 219 |
<xsl:param name="ressubHeaderStyle"/> |
... | ... | |
227 | 236 |
<xsl:with-param name="partyfirstColStyle" select="$resfirstColStyle"/> |
228 | 237 |
</xsl:call-template> |
229 | 238 |
</td></tr> |
230 |
<tr><td width="{$firstColWidth}" class="{$resfirstColStyle}"> </td> |
|
231 |
<td width="{$secondColWidth}" class="{$secondColStyle}">  |
|
232 |
</td></tr> |
|
233 | 239 |
</xsl:template> |
234 | 240 |
|
235 | 241 |
|
... | ... | |
249 | 255 |
</td></tr> |
250 | 256 |
</xsl:template>--> |
251 | 257 |
|
252 |
<xsl:template name="resourceassociateParty"> |
|
258 |
<xsl:template name="resourceassociatedParty">
|
|
253 | 259 |
<xsl:param name="resfirstColStyle"/> |
254 | 260 |
<tr><td colspan="2"> |
255 | 261 |
<xsl:call-template name="party"> |
256 | 262 |
<xsl:with-param name="partyfirstColStyle" select="$resfirstColStyle"/> |
257 | 263 |
</xsl:call-template> |
258 | 264 |
</td></tr> |
259 |
<tr><td width="{$firstColWidth}" class="{$resfirstColStyle}"> </td> |
|
260 |
<td width="{$secondColWidth}" class="{$secondColStyle}">  |
|
261 |
</td></tr> |
|
262 | 265 |
</xsl:template> |
263 | 266 |
|
264 | 267 |
|
... | ... | |
298 | 301 |
<tr><td class="{$ressubHeaderStyle}" colspan="2"> |
299 | 302 |
<xsl:text>Abstract:</xsl:text> |
300 | 303 |
</td></tr> |
301 |
<tr><td colspan="2" width="100%"> |
|
302 |
<xsl:call-template name="text"> |
|
303 |
<xsl:with-param name="textfirstColStyle" select="$resfirstColStyle"/> |
|
304 |
</xsl:call-template> |
|
305 |
</td></tr> |
|
306 | 304 |
<tr><td width="{$firstColWidth}" class="{$resfirstColStyle}"> </td> |
307 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> </td></tr> |
|
305 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
306 |
<xsl:call-template name="text"> |
|
307 |
<xsl:with-param name="textfirstColStyle" select="$resfirstColStyle"/> |
|
308 |
</xsl:call-template> |
|
309 |
</td> |
|
310 |
</tr> |
|
308 | 311 |
</xsl:template> |
309 | 312 |
|
310 | 313 |
|
... | ... | |
357 | 360 |
<tr><td class="{$ressubHeaderStyle}" colspan="2"> |
358 | 361 |
<xsl:text>Additional Information:</xsl:text> |
359 | 362 |
</td></tr> |
360 |
<tr><td colspan="2" width="100%"> |
|
361 |
<xsl:call-template name="text"> |
|
362 |
<xsl:with-param name="textfirstColStyle" select="$resfirstColStyle"/> |
|
363 |
</xsl:call-template> |
|
364 |
</td></tr> |
|
363 |
<tr><td width="{$firstColWidth}" class="{$resfirstColStyle}"> </td> |
|
364 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
365 |
<xsl:call-template name="text"> |
|
366 |
<xsl:with-param name="textfirstColStyle" select="$resfirstColStyle"/> |
|
367 |
</xsl:call-template> |
|
368 |
</td> |
|
369 |
</tr> |
|
365 | 370 |
</xsl:template> |
366 | 371 |
|
367 | 372 |
|
... | ... | |
371 | 376 |
<tr><td class="{$ressubHeaderStyle}" colspan="2"> |
372 | 377 |
<xsl:text>License and Usage Rights:</xsl:text> |
373 | 378 |
</td></tr> |
374 |
<tr><td colspan="2" width="100%"> |
|
375 |
<xsl:call-template name="text"> |
|
376 |
<xsl:with-param name="textfirstColStyle" select="$resfirstColStyle"/> |
|
377 |
</xsl:call-template> |
|
378 |
</td></tr> |
|
379 |
<tr><td width="{$firstColWidth}" class="{$resfirstColStyle}"> </td> |
|
380 |
<td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
381 |
<xsl:call-template name="text"> |
|
382 |
<xsl:with-param name="textfirstColStyle" select="$resfirstColStyle"/> |
|
383 |
</xsl:call-template> |
|
384 |
</td> |
|
385 |
</tr> |
|
379 | 386 |
</xsl:template> |
380 | 387 |
|
381 | 388 |
<xsl:template name="resourcedistribution"> |
382 | 389 |
<xsl:param name="ressubHeaderStyle"/> |
383 | 390 |
<xsl:param name="resfirstColStyle"/> |
391 |
<xsl:param name="index"/> |
|
384 | 392 |
<tr><td colspan="2" width="100%"> |
385 | 393 |
<xsl:call-template name="distribution"> |
386 | 394 |
<xsl:with-param name="disfirstColStyle" select="$resfirstColStyle"/> |
387 | 395 |
<xsl:with-param name="dissubHeaderStyle" select="$ressubHeaderStyle"/> |
396 |
<xsl:with-param name="level">toplevel</xsl:with-param> |
|
397 |
<xsl:with-param name="distributionindex" select="$index"/> |
|
388 | 398 |
</xsl:call-template> |
389 | 399 |
</td></tr> |
390 | 400 |
</xsl:template> |
391 |
|
|
392 |
|
|
393 |
<xsl:template match="triple"/> |
|
394 |
<xsl:template match="triple[1]" mode="resource"> |
|
395 |
<tr><td class="{$subHeaderStyle}" colspan="2"> |
|
396 |
<xsl:text>Related Metadata and Data Files:</xsl:text></td></tr> |
|
397 |
<xsl:call-template name="renderTriple"> |
|
398 |
<xsl:with-param name="indentation" select="1"></xsl:with-param> |
|
399 |
</xsl:call-template> |
|
400 |
|
|
401 |
|
|
402 |
<xsl:template name="resourcecoverage"> |
|
403 |
<xsl:param name="ressubHeaderStyle"/> |
|
404 |
<xsl:param name="resfirstColStyle"/> |
|
405 |
<tr><td colspan="2" width="100%"> |
|
406 |
<xsl:call-template name="coverage"> |
|
407 |
</xsl:call-template> |
|
408 |
</td></tr> |
|
401 | 409 |
</xsl:template> |
402 | 410 |
|
403 |
<xsl:template match="triple" mode="resource"> |
|
404 |
<xsl:if test="(./subject)!=(./object)"> |
|
405 |
<!-- render only for subsequent data files --> |
|
406 |
<xsl:if test="starts-with(./relationship,'isDataFileFor')"> |
|
407 |
<xsl:call-template name="renderTriple"> |
|
408 |
<xsl:with-param name="indentation" select="1"></xsl:with-param> |
|
409 |
</xsl:call-template> |
|
410 |
</xsl:if> |
|
411 |
<xsl:if test="starts-with(./relationship,'provides eml-project information')"> |
|
412 |
<xsl:call-template name="renderTriple"> |
|
413 |
<xsl:with-param name="indentation" select="1"></xsl:with-param> |
|
414 |
</xsl:call-template> |
|
415 |
</xsl:if> |
|
416 | 411 |
|
417 |
</xsl:if> |
|
418 |
</xsl:template> |
|
419 |
|
|
420 |
<!--xsl:template name="renderTriple"> |
|
421 |
<tr><td width="{$firstColWidth}" class="{$firstColStyle}"> |
|
422 |
<xsl:text> </xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
423 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute><xsl:value-of select="./subject"/></a> |
|
424 |
<xsl:text>   </xsl:text> |
|
425 |
<xsl:value-of select="./relationship"/> |
|
426 |
<xsl:text>   </xsl:text> |
|
427 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./object"/></xsl:attribute><xsl:value-of select="./object"/></a> |
|
428 |
</td></tr> |
|
429 |
</xsl:template--> |
|
430 |
|
|
431 |
<xsl:template name="renderTriple"> |
|
432 |
<xsl:param name="indentation">1</xsl:param> |
|
433 |
<tr></tr><tr> <td></td> |
|
434 |
<td width="{$secondColWidth}" class="{$secondColStyle}" padding-left="{$indentation}em"> |
|
435 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
436 |
<xsl:if test="$indentation=2"> |
|
437 |
     • |
|
438 |
</xsl:if> |
|
439 |
<xsl:if test="$indentation=3"> |
|
440 |
          • |
|
441 |
</xsl:if> |
|
442 |
<xsl:if test="starts-with(./relationship,'isDataFileFor')"> |
|
443 |
<xsl:text>Data file for this document</xsl:text> |
|
444 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
445 |
<xsl:for-each select="../triple"> |
|
446 |
<xsl:if test="(./object)=$subj"> |
|
447 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
448 |
    |
|
449 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
450 |
(Access Rules)</a> |
|
451 |
</xsl:if> |
|
452 |
</xsl:if> |
|
453 |
</xsl:for-each> |
|
454 |
<xsl:for-each select="../triple"> |
|
455 |
<xsl:if test="(./object)=$subj"> |
|
456 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
457 |
<xsl:call-template name="renderTriple"> |
|
458 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
459 |
</xsl:with-param> |
|
460 |
</xsl:call-template> |
|
461 |
</xsl:if> |
|
462 |
</xsl:if> |
|
463 |
</xsl:for-each> |
|
464 |
</xsl:if> |
|
465 |
|
|
466 |
<xsl:if test="starts-with(./relationship,'provides table-entity information')"> |
|
467 |
<xsl:text>Information about the data file</xsl:text> |
|
468 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
469 |
<xsl:for-each select="../triple"> |
|
470 |
<xsl:if test="(./object)=$subj"> |
|
471 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
472 |
    |
|
473 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
474 |
(Access Rules)</a> |
|
475 |
</xsl:if> |
|
476 |
</xsl:if> |
|
477 |
</xsl:for-each> |
|
478 |
<xsl:for-each select="../triple"> |
|
479 |
<xsl:if test="(./object)=$subj"> |
|
480 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
481 |
<xsl:call-template name="renderTriple"> |
|
482 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
483 |
</xsl:with-param> |
|
484 |
</xsl:call-template> |
|
485 |
</xsl:if> |
|
486 |
</xsl:if> |
|
487 |
</xsl:for-each> |
|
488 |
</xsl:if> |
|
489 |
|
|
490 |
<xsl:if test="starts-with(./relationship,'provides eml-attribute information')"> |
|
491 |
<xsl:text>Definition of each column in the data file</xsl:text> |
|
492 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
493 |
<xsl:for-each select="../triple"> |
|
494 |
<xsl:if test="(./object)=$subj"> |
|
495 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
496 |
    |
|
497 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
498 |
(Access Rules)</a> |
|
499 |
</xsl:if> |
|
500 |
</xsl:if> |
|
501 |
</xsl:for-each> |
|
502 |
<xsl:for-each select="../triple"> |
|
503 |
<xsl:if test="(./object)=$subj"> |
|
504 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
505 |
<xsl:call-template name="renderTriple"> |
|
506 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
507 |
</xsl:with-param> |
|
508 |
</xsl:call-template> |
|
509 |
</xsl:if> |
|
510 |
</xsl:if> |
|
511 |
</xsl:for-each> |
|
512 |
</xsl:if> |
|
513 |
<xsl:if test="starts-with(./relationship,'provides eml-physical information')"> |
|
514 |
<xsl:text>Physical data file layout information</xsl:text> |
|
515 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
516 |
<xsl:for-each select="../triple"> |
|
517 |
<xsl:if test="(./object)=$subj"> |
|
518 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
519 |
    |
|
520 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
521 |
(Access Rules)</a> |
|
522 |
</xsl:if> |
|
523 |
</xsl:if> |
|
524 |
</xsl:for-each> |
|
525 |
<xsl:for-each select="../triple"> |
|
526 |
<xsl:if test="(./object)=$subj"> |
|
527 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
528 |
<xsl:call-template name="renderTriple"> |
|
529 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
530 |
</xsl:with-param> |
|
531 |
</xsl:call-template> |
|
532 |
</xsl:if> |
|
533 |
</xsl:if> |
|
534 |
</xsl:for-each> |
|
535 |
</xsl:if> |
|
536 |
<xsl:if test="starts-with(./relationship,'provides eml-project information')"> |
|
537 |
<xsl:text>Project information</xsl:text> |
|
538 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
539 |
<xsl:for-each select="../triple"> |
|
540 |
<xsl:if test="(./object)=$subj"> |
|
541 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
542 |
    |
|
543 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
544 |
(Access Rules)</a> |
|
545 |
</xsl:if> |
|
546 |
</xsl:if> |
|
547 |
</xsl:for-each> |
|
548 |
<xsl:for-each select="../triple"> |
|
549 |
<xsl:if test="(./object)=$subj"> |
|
550 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
551 |
<xsl:call-template name="renderTriple"> |
|
552 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
553 |
</xsl:with-param> |
|
554 |
</xsl:call-template> |
|
555 |
</xsl:if> |
|
556 |
</xsl:if> |
|
557 |
</xsl:for-each> |
|
558 |
</xsl:if> |
|
559 |
</a> |
|
560 |
</td></tr> |
|
561 |
</xsl:template> |
|
562 |
|
|
563 | 412 |
</xsl:stylesheet> |
Also available in: Unified diff
Revise some templates and in build file, when we compile, it would include harvest.