Lines 3-8
Link Here
|
3 |
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> |
3 |
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> |
4 |
|
4 |
|
5 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
5 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
|
|
6 |
<!-- Edited: Bug 13382 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com --> |
6 |
<xsl:stylesheet version="1.0" |
7 |
<xsl:stylesheet version="1.0" |
7 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
8 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
8 |
xmlns:items="http://www.koha-community.org/items" |
9 |
xmlns:items="http://www.koha-community.org/items" |
Lines 140-148
Link Here
|
140 |
</xsl:if> |
141 |
</xsl:if> |
141 |
|
142 |
|
142 |
<!-- Author Statement --> |
143 |
<!-- Author Statement --> |
143 |
<xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> |
144 |
<!-- #13382 suppress 700$i and 7xx/@ind2=2 --> |
144 |
<xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template> |
145 |
<xsl:call-template name="showAuthor"> |
145 |
|
146 |
<xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/> |
|
|
147 |
<xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> |
148 |
</xsl:call-template> |
149 |
<xsl:call-template name="showAuthor"> |
150 |
<!-- #13382 suppress 700$i and 7xx/@ind2=2 --> |
151 |
<xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711][not(@ind2=2)][not(marc:subfield[@code='i'][parent::marc:datafield[@tag='700']])]"/> |
152 |
<xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> |
153 |
</xsl:call-template> |
154 |
|
146 |
<xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''"> |
155 |
<xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''"> |
147 |
<span class="results_summary type"><span class="label">Material type: </span> |
156 |
<span class="results_summary type"><span class="label">Material type: </span> |
148 |
<xsl:element name="img"><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element> |
157 |
<xsl:element name="img"><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element> |
Lines 524-530
Link Here
|
524 |
</xsl:for-each> |
533 |
</xsl:for-each> |
525 |
</span> |
534 |
</span> |
526 |
</xsl:if> |
535 |
</xsl:if> |
527 |
|
536 |
|
|
|
537 |
<!-- #13382 Added Related works 700$i --> |
538 |
<xsl:if test="marc:datafield[@tag=700][marc:subfield[@code='i']]"> |
539 |
<span class="results_summary related_works"><span class="label">Related Works: </span> |
540 |
<xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='i']]"> |
541 |
<xsl:variable name="str"> |
542 |
<xsl:call-template name="subfieldSelect"> |
543 |
<xsl:with-param name="codes">abcdfghiklmorstux</xsl:with-param> |
544 |
</xsl:call-template> |
545 |
</xsl:variable> |
546 |
<xsl:call-template name="chopPunctuation"> |
547 |
<xsl:with-param name="chopString"> |
548 |
<xsl:value-of select="substring($str,1,string-length($str)-1)"/> |
549 |
</xsl:with-param> |
550 |
</xsl:call-template> |
551 |
<!-- add relator code too between brackets--> |
552 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
553 |
<span class="relatorcode"> |
554 |
<xsl:text> [</xsl:text> |
555 |
<xsl:choose> |
556 |
<xsl:when test="marc:subfield[@code='e']"> |
557 |
<xsl:call-template name="chopPunctuation"> |
558 |
<xsl:with-param name="chopString"> |
559 |
<xsl:call-template name="subfieldSelect"> |
560 |
<xsl:with-param name="codes">e</xsl:with-param> |
561 |
</xsl:call-template> |
562 |
</xsl:with-param> |
563 |
<xsl:with-param name="punctuation"> |
564 |
<xsl:text>:,;/. </xsl:text> |
565 |
</xsl:with-param> |
566 |
</xsl:call-template> |
567 |
</xsl:when> |
568 |
<xsl:otherwise> |
569 |
<xsl:call-template name="chopPunctuation"> |
570 |
<xsl:with-param name="chopString"> |
571 |
<xsl:call-template name="subfieldSelect"> |
572 |
<xsl:with-param name="codes">4</xsl:with-param> |
573 |
</xsl:call-template> |
574 |
</xsl:with-param> |
575 |
<xsl:with-param name="punctuation"> |
576 |
<xsl:text>:,;/. </xsl:text> |
577 |
</xsl:with-param> |
578 |
</xsl:call-template> |
579 |
</xsl:otherwise> |
580 |
</xsl:choose> |
581 |
<xsl:text>]</xsl:text> |
582 |
</span> |
583 |
</xsl:if> |
584 |
<xsl:choose> |
585 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text> -- </xsl:text></xsl:otherwise> |
586 |
</xsl:choose> |
587 |
</xsl:for-each> |
588 |
</span> |
589 |
</xsl:if> |
590 |
|
591 |
<!-- #13382 Added Contained Works 7xx@ind2=2 --> |
592 |
<xsl:if test="marc:datafield[@tag=700][@ind2=2] or marc:datafield[@tag=710][@ind2=2] or marc:datafield[@tag=711][@ind2=2]"> |
593 |
<span class="results_summary contained_works"><span class="label">Contained Works: </span> |
594 |
<xsl:for-each select="marc:datafield[@tag=700][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=710][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=711][@ind2=2][not(marc:subfield[@code='i'])]"> |
595 |
<xsl:variable name="str"> |
596 |
<xsl:call-template name="subfieldSelect"> |
597 |
<xsl:with-param name="codes">abcdfghiklmorstux</xsl:with-param> |
598 |
</xsl:call-template> |
599 |
</xsl:variable> |
600 |
<xsl:call-template name="chopPunctuation"> |
601 |
<xsl:with-param name="chopString"> |
602 |
<xsl:value-of select="substring($str,1,string-length($str)-1)"/> |
603 |
</xsl:with-param> |
604 |
</xsl:call-template> |
605 |
<!-- add relator code too between brackets--> |
606 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
607 |
<span class="relatorcode"> |
608 |
<xsl:text> [</xsl:text> |
609 |
<xsl:choose> |
610 |
<xsl:when test="marc:subfield[@code='e']"> |
611 |
<xsl:call-template name="chopPunctuation"> |
612 |
<xsl:with-param name="chopString"> |
613 |
<xsl:call-template name="subfieldSelect"> |
614 |
<xsl:with-param name="codes">e</xsl:with-param> |
615 |
</xsl:call-template> |
616 |
</xsl:with-param> |
617 |
<xsl:with-param name="punctuation"> |
618 |
<xsl:text>:,;/. </xsl:text> |
619 |
</xsl:with-param> |
620 |
</xsl:call-template> |
621 |
</xsl:when> |
622 |
<xsl:otherwise> |
623 |
<xsl:call-template name="chopPunctuation"> |
624 |
<xsl:with-param name="chopString"> |
625 |
<xsl:call-template name="subfieldSelect"> |
626 |
<xsl:with-param name="codes">4</xsl:with-param> |
627 |
</xsl:call-template> |
628 |
</xsl:with-param> |
629 |
<xsl:with-param name="punctuation"> |
630 |
<xsl:text>:,;/. </xsl:text> |
631 |
</xsl:with-param> |
632 |
</xsl:call-template> |
633 |
</xsl:otherwise> |
634 |
</xsl:choose> |
635 |
<xsl:text>]</xsl:text> |
636 |
</span> |
637 |
</xsl:if> |
638 |
<xsl:choose> |
639 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise> |
640 |
</xsl:choose> |
641 |
</xsl:for-each> |
642 |
</span> |
643 |
</xsl:if> |
644 |
|
528 |
<xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> |
645 |
<xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> |
529 |
<span class="results_summary subjects"><span class="label">Subject(s): </span> |
646 |
<span class="results_summary subjects"><span class="label">Subject(s): </span> |
530 |
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> |
647 |
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> |
Lines 949-955
Link Here
|
949 |
<xsl:choose> |
1066 |
<xsl:choose> |
950 |
<xsl:when test="position()>1"/> |
1067 |
<xsl:when test="position()>1"/> |
951 |
<xsl:when test="@tag<700">Author(s): </xsl:when> |
1068 |
<xsl:when test="@tag<700">Author(s): </xsl:when> |
952 |
<xsl:otherwise>Additional author(s): </xsl:otherwise> |
1069 |
<!--#13382 Changed Additional author to contributor --> |
|
|
1070 |
<xsl:otherwise>Contributor(s): </xsl:otherwise> |
953 |
</xsl:choose> |
1071 |
</xsl:choose> |
954 |
<a> |
1072 |
<a> |
955 |
<xsl:choose> |
1073 |
<xsl:choose> |
Lines 961-984
Link Here
|
961 |
</xsl:otherwise> |
1079 |
</xsl:otherwise> |
962 |
</xsl:choose> |
1080 |
</xsl:choose> |
963 |
<xsl:choose> |
1081 |
<xsl:choose> |
964 |
<xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when> |
1082 |
<xsl:when test="@tag=100"><xsl:call-template name="nameABCQ"/></xsl:when> |
965 |
<xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> |
1083 |
<xsl:when test="@tag=110"><xsl:call-template name="nameABCDN"/></xsl:when> |
966 |
<xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> |
1084 |
<xsl:when test="@tag=111"><xsl:call-template name="nameACDEQ"/></xsl:when> |
|
|
1085 |
<!-- #13382 excludes 700$i and ind2=2, displayed as Related Works --> |
1086 |
<!--#13382 Added all relevant subfields 4, e, are handled separately --> |
1087 |
<xsl:when test="@tag=700 or @tag=710 or @tag=711"> |
1088 |
<xsl:variable name="str"> |
1089 |
<xsl:call-template name="subfieldSelect"> |
1090 |
<xsl:with-param name="codes">abcdfghiklmnoprstux</xsl:with-param> |
1091 |
</xsl:call-template> |
1092 |
</xsl:variable> |
1093 |
<xsl:call-template name="chopPunctuation"> |
1094 |
<xsl:with-param name="chopString"> |
1095 |
<xsl:value-of select="$str"/> |
1096 |
</xsl:with-param> |
1097 |
<xsl:with-param name="punctuation"> |
1098 |
<xsl:text>:,;/. </xsl:text> |
1099 |
</xsl:with-param> |
1100 |
</xsl:call-template> |
1101 |
</xsl:when> |
967 |
</xsl:choose> |
1102 |
</xsl:choose> |
968 |
<!-- add relator code too between brackets--> |
1103 |
<!-- add relator code too between brackets--> |
969 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
1104 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
970 |
<span class="relatorcode"> |
1105 |
<xsl:if test="not(@tag=111 or @tag=711)"> |
971 |
<xsl:text> [</xsl:text> |
1106 |
<span class="relatorcode"> |
972 |
<xsl:choose> |
1107 |
<xsl:text> [</xsl:text> |
973 |
<xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when> |
1108 |
<!-- #13382 If both $e and $4 are present only display $e --> |
974 |
<xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise> |
1109 |
<xsl:choose> |
975 |
</xsl:choose> |
1110 |
<xsl:when test="marc:subfield[@code='e']"> |
976 |
<xsl:text>]</xsl:text> |
1111 |
<xsl:call-template name="chopPunctuation"> |
977 |
</span> |
1112 |
<xsl:with-param name="chopString"> |
978 |
</xsl:if> |
1113 |
<xsl:call-template name="subfieldSelect"> |
|
|
1114 |
<xsl:with-param name="codes">e</xsl:with-param> |
1115 |
</xsl:call-template> |
1116 |
</xsl:with-param> |
1117 |
<xsl:with-param name="punctuation"> |
1118 |
<xsl:text>:,;/. </xsl:text> |
1119 |
</xsl:with-param> |
1120 |
</xsl:call-template> |
1121 |
</xsl:when> |
1122 |
<xsl:otherwise> |
1123 |
<xsl:call-template name="chopPunctuation"> |
1124 |
<xsl:with-param name="chopString"> |
1125 |
<xsl:call-template name="subfieldSelect"> |
1126 |
<xsl:with-param name="codes">4</xsl:with-param> |
1127 |
</xsl:call-template> |
1128 |
</xsl:with-param> |
1129 |
<xsl:with-param name="punctuation"> |
1130 |
<xsl:text>:,;/. </xsl:text> |
1131 |
</xsl:with-param> |
1132 |
</xsl:call-template> |
1133 |
</xsl:otherwise> |
1134 |
</xsl:choose> |
1135 |
<xsl:text>]</xsl:text> |
1136 |
</span> |
1137 |
</xsl:if> |
1138 |
</xsl:if> |
979 |
</a> |
1139 |
</a> |
980 |
<xsl:choose> |
1140 |
<xsl:choose> |
981 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise> |
1141 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise> |
982 |
</xsl:choose> |
1142 |
</xsl:choose> |
983 |
</xsl:for-each> |
1143 |
</xsl:for-each> |
984 |
</h5> |
1144 |
</h5> |