Revision 1679
Added by Jing Tao about 21 years ago
eml-resource-2.0.0.xsl | ||
---|---|---|
409 | 409 |
</xsl:template> |
410 | 410 |
|
411 | 411 |
|
412 |
<xsl:template match="triple"/> |
|
413 |
<xsl:template match="triple[1]" mode="resource"> |
|
414 |
<tr><td class="{$subHeaderStyle}" colspan="2"> |
|
415 |
<xsl:text>Related Metadata and Data Files:</xsl:text></td></tr> |
|
416 |
<xsl:call-template name="renderTriple"> |
|
417 |
<xsl:with-param name="indentation" select="1"></xsl:with-param> |
|
418 |
</xsl:call-template> |
|
419 |
|
|
420 |
</xsl:template> |
|
421 |
|
|
422 |
<xsl:template match="triple" mode="resource"> |
|
423 |
<xsl:if test="(./subject)!=(./object)"> |
|
424 |
<!-- render only for subsequent data files --> |
|
425 |
<xsl:if test="starts-with(./relationship,'isDataFileFor')"> |
|
426 |
<xsl:call-template name="renderTriple"> |
|
427 |
<xsl:with-param name="indentation" select="1"></xsl:with-param> |
|
428 |
</xsl:call-template> |
|
429 |
</xsl:if> |
|
430 |
<xsl:if test="starts-with(./relationship,'provides eml-project information')"> |
|
431 |
<xsl:call-template name="renderTriple"> |
|
432 |
<xsl:with-param name="indentation" select="1"></xsl:with-param> |
|
433 |
</xsl:call-template> |
|
434 |
</xsl:if> |
|
435 |
|
|
436 |
</xsl:if> |
|
437 |
</xsl:template> |
|
438 |
|
|
439 |
<!--xsl:template name="renderTriple"> |
|
440 |
<tr><td width="{$firstColWidth}" class="{$firstColStyle}"> |
|
441 |
<xsl:text> </xsl:text></td><td width="{$secondColWidth}" class="{$secondColStyle}"> |
|
442 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute><xsl:value-of select="./subject"/></a> |
|
443 |
<xsl:text>   </xsl:text> |
|
444 |
<xsl:value-of select="./relationship"/> |
|
445 |
<xsl:text>   </xsl:text> |
|
446 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./object"/></xsl:attribute><xsl:value-of select="./object"/></a> |
|
447 |
</td></tr> |
|
448 |
</xsl:template--> |
|
449 |
|
|
450 |
<xsl:template name="renderTriple"> |
|
451 |
<xsl:param name="indentation">1</xsl:param> |
|
452 |
<tr></tr><tr> <td></td> |
|
453 |
<td width="{$secondColWidth}" class="{$secondColStyle}" padding-left="{$indentation}em"> |
|
454 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
455 |
<xsl:if test="$indentation=2"> |
|
456 |
     • |
|
457 |
</xsl:if> |
|
458 |
<xsl:if test="$indentation=3"> |
|
459 |
          • |
|
460 |
</xsl:if> |
|
461 |
<xsl:if test="starts-with(./relationship,'isDataFileFor')"> |
|
462 |
<xsl:text>Data file for this document</xsl:text> |
|
463 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
464 |
<xsl:for-each select="../triple"> |
|
465 |
<xsl:if test="(./object)=$subj"> |
|
466 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
467 |
    |
|
468 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
469 |
(Access Rules)</a> |
|
470 |
</xsl:if> |
|
471 |
</xsl:if> |
|
472 |
</xsl:for-each> |
|
473 |
<xsl:for-each select="../triple"> |
|
474 |
<xsl:if test="(./object)=$subj"> |
|
475 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
476 |
<xsl:call-template name="renderTriple"> |
|
477 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
478 |
</xsl:with-param> |
|
479 |
</xsl:call-template> |
|
480 |
</xsl:if> |
|
481 |
</xsl:if> |
|
482 |
</xsl:for-each> |
|
483 |
</xsl:if> |
|
484 |
|
|
485 |
<xsl:if test="starts-with(./relationship,'provides table-entity information')"> |
|
486 |
<xsl:text>Information about the data file</xsl:text> |
|
487 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
488 |
<xsl:for-each select="../triple"> |
|
489 |
<xsl:if test="(./object)=$subj"> |
|
490 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
491 |
    |
|
492 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
493 |
(Access Rules)</a> |
|
494 |
</xsl:if> |
|
495 |
</xsl:if> |
|
496 |
</xsl:for-each> |
|
497 |
<xsl:for-each select="../triple"> |
|
498 |
<xsl:if test="(./object)=$subj"> |
|
499 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
500 |
<xsl:call-template name="renderTriple"> |
|
501 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
502 |
</xsl:with-param> |
|
503 |
</xsl:call-template> |
|
504 |
</xsl:if> |
|
505 |
</xsl:if> |
|
506 |
</xsl:for-each> |
|
507 |
</xsl:if> |
|
508 |
|
|
509 |
<xsl:if test="starts-with(./relationship,'provides eml-attribute information')"> |
|
510 |
<xsl:text>Definition of each column in the data file</xsl:text> |
|
511 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
512 |
<xsl:for-each select="../triple"> |
|
513 |
<xsl:if test="(./object)=$subj"> |
|
514 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
515 |
    |
|
516 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
517 |
(Access Rules)</a> |
|
518 |
</xsl:if> |
|
519 |
</xsl:if> |
|
520 |
</xsl:for-each> |
|
521 |
<xsl:for-each select="../triple"> |
|
522 |
<xsl:if test="(./object)=$subj"> |
|
523 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
524 |
<xsl:call-template name="renderTriple"> |
|
525 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
526 |
</xsl:with-param> |
|
527 |
</xsl:call-template> |
|
528 |
</xsl:if> |
|
529 |
</xsl:if> |
|
530 |
</xsl:for-each> |
|
531 |
</xsl:if> |
|
532 |
<xsl:if test="starts-with(./relationship,'provides eml-physical information')"> |
|
533 |
<xsl:text>Physical data file layout information</xsl:text> |
|
534 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
535 |
<xsl:for-each select="../triple"> |
|
536 |
<xsl:if test="(./object)=$subj"> |
|
537 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
538 |
    |
|
539 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
540 |
(Access Rules)</a> |
|
541 |
</xsl:if> |
|
542 |
</xsl:if> |
|
543 |
</xsl:for-each> |
|
544 |
<xsl:for-each select="../triple"> |
|
545 |
<xsl:if test="(./object)=$subj"> |
|
546 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
547 |
<xsl:call-template name="renderTriple"> |
|
548 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
549 |
</xsl:with-param> |
|
550 |
</xsl:call-template> |
|
551 |
</xsl:if> |
|
552 |
</xsl:if> |
|
553 |
</xsl:for-each> |
|
554 |
</xsl:if> |
|
555 |
<xsl:if test="starts-with(./relationship,'provides eml-project information')"> |
|
556 |
<xsl:text>Project information</xsl:text> |
|
557 |
<xsl:variable name="subj"> <xsl:value-of select="./subject"/> </xsl:variable> |
|
558 |
<xsl:for-each select="../triple"> |
|
559 |
<xsl:if test="(./object)=$subj"> |
|
560 |
<xsl:if test="starts-with(./relationship,'provides access control')"> |
|
561 |
    |
|
562 |
<a><xsl:attribute name="href"><xsl:value-of select="$tripleURI" /><xsl:value-of select="./subject"/></xsl:attribute> |
|
563 |
(Access Rules)</a> |
|
564 |
</xsl:if> |
|
565 |
</xsl:if> |
|
566 |
</xsl:for-each> |
|
567 |
<xsl:for-each select="../triple"> |
|
568 |
<xsl:if test="(./object)=$subj"> |
|
569 |
<xsl:if test="not(starts-with(./relationship,'provides access control'))"> |
|
570 |
<xsl:call-template name="renderTriple"> |
|
571 |
<xsl:with-param name="indentation" select="($indentation + 1)"> |
|
572 |
</xsl:with-param> |
|
573 |
</xsl:call-template> |
|
574 |
</xsl:if> |
|
575 |
</xsl:if> |
|
576 |
</xsl:for-each> |
|
577 |
</xsl:if> |
|
578 |
</a> |
|
579 |
</td></tr> |
|
580 |
</xsl:template> |
|
581 |
|
|
582 | 412 |
</xsl:stylesheet> |
Also available in: Unified diff
Fixed bugs.