|
Lines 1-5
Link Here
|
| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
2 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
|
|
3 |
<!-- Edited: Bug 13382 [ENH] XSLT enhancements sponsored by bywater solutions 2015/02/06 WS wsalesky@gmail.com --> |
| 3 |
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> |
4 |
<!DOCTYPE stylesheet [<!ENTITY nbsp " " >]> |
| 4 |
<xsl:stylesheet version="1.0" |
5 |
<xsl:stylesheet version="1.0" |
| 5 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
6 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
|
Lines 158-175
Link Here
|
| 158 |
</xsl:call-template> |
159 |
</xsl:call-template> |
| 159 |
</h5> |
160 |
</h5> |
| 160 |
</xsl:if> |
161 |
</xsl:if> |
| 161 |
<xsl:choose> |
162 |
|
| 162 |
<xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]"> |
163 |
<!--#13382 Added Author Statement to seperate Authors and Contributors --> |
| 163 |
<h5 class="author">by |
164 |
<xsl:call-template name="showAuthor"> |
| 164 |
<xsl:call-template name="showAuthor"> |
165 |
<xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/> |
| 165 |
<xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111 or @tag=700 or @tag=710 or @tag=711]"/> |
166 |
<xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> |
| 166 |
<xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> |
167 |
<xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/> |
| 167 |
<xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/> |
168 |
<xsl:with-param name="theme" select="$theme"/> |
| 168 |
<xsl:with-param name="theme" select="$theme"/> |
169 |
</xsl:call-template> |
| 169 |
</xsl:call-template> |
170 |
<xsl:call-template name="showAuthor"> |
| 170 |
</h5> |
171 |
<!-- #13382 suppress 700$i and 7xx/@ind2=2 --> |
| 171 |
</xsl:when> |
172 |
<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']])]"/> |
| 172 |
</xsl:choose> |
173 |
<xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/> |
|
|
174 |
<xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/> |
| 175 |
<xsl:with-param name="theme" select="$theme"/> |
| 176 |
</xsl:call-template> |
| 173 |
|
177 |
|
| 174 |
<xsl:if test="$DisplayOPACiconsXSLT!='0'"> |
178 |
<xsl:if test="$DisplayOPACiconsXSLT!='0'"> |
| 175 |
<xsl:if test="$materialTypeCode!=''"> |
179 |
<xsl:if test="$materialTypeCode!=''"> |
|
Lines 572-577
Link Here
|
| 572 |
</span> |
576 |
</span> |
| 573 |
</xsl:if> |
577 |
</xsl:if> |
| 574 |
|
578 |
|
|
|
579 |
|
| 580 |
<!-- #13382 Added Related works 700$i --> |
| 581 |
<xsl:if test="marc:datafield[@tag=700][marc:subfield[@code='i']]"> |
| 582 |
<span class="results_summary related_works"><span class="label">Related Works: </span> |
| 583 |
<xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='i']]"> |
| 584 |
<xsl:variable name="str"> |
| 585 |
<xsl:call-template name="subfieldSelect"> |
| 586 |
<xsl:with-param name="codes">abcdfghiklmorstux</xsl:with-param> |
| 587 |
</xsl:call-template> |
| 588 |
</xsl:variable> |
| 589 |
<xsl:call-template name="chopPunctuation"> |
| 590 |
<xsl:with-param name="chopString"> |
| 591 |
<xsl:value-of select="substring($str,1,string-length($str)-1)"/> |
| 592 |
</xsl:with-param> |
| 593 |
</xsl:call-template> |
| 594 |
<!-- add relator code too between brackets--> |
| 595 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
| 596 |
<span class="relatorcode"> |
| 597 |
<xsl:text> [</xsl:text> |
| 598 |
<xsl:choose> |
| 599 |
<xsl:when test="marc:subfield[@code='e']"> |
| 600 |
<xsl:call-template name="chopPunctuation"> |
| 601 |
<xsl:with-param name="chopString"> |
| 602 |
<xsl:call-template name="subfieldSelect"> |
| 603 |
<xsl:with-param name="codes">e</xsl:with-param> |
| 604 |
</xsl:call-template> |
| 605 |
</xsl:with-param> |
| 606 |
<xsl:with-param name="punctuation"> |
| 607 |
<xsl:text>:,;/. </xsl:text> |
| 608 |
</xsl:with-param> |
| 609 |
</xsl:call-template> |
| 610 |
</xsl:when> |
| 611 |
<xsl:otherwise> |
| 612 |
<xsl:call-template name="chopPunctuation"> |
| 613 |
<xsl:with-param name="chopString"> |
| 614 |
<xsl:call-template name="subfieldSelect"> |
| 615 |
<xsl:with-param name="codes">4</xsl:with-param> |
| 616 |
</xsl:call-template> |
| 617 |
</xsl:with-param> |
| 618 |
<xsl:with-param name="punctuation"> |
| 619 |
<xsl:text>:,;/. </xsl:text> |
| 620 |
</xsl:with-param> |
| 621 |
</xsl:call-template> |
| 622 |
</xsl:otherwise> |
| 623 |
</xsl:choose> |
| 624 |
<xsl:text>]</xsl:text> |
| 625 |
</span> |
| 626 |
</xsl:if> |
| 627 |
<xsl:choose> |
| 628 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text> -- </xsl:text></xsl:otherwise> |
| 629 |
</xsl:choose> |
| 630 |
</xsl:for-each> |
| 631 |
</span> |
| 632 |
</xsl:if> |
| 633 |
|
| 634 |
<!-- #13382 Added Contained Works 7xx@ind2=2 --> |
| 635 |
<xsl:if test="marc:datafield[@tag=700][@ind2=2][not(marc:subfield[@code='i'])] or marc:datafield[@tag=710][@ind2=2][not(marc:subfield[@code='i'])] or marc:datafield[@tag=711][@ind2=2][not(marc:subfield[@code='i'])]"> |
| 636 |
<span class="results_summary contained_works"><span class="label">Contained Works: </span> |
| 637 |
<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'])]"> |
| 638 |
<xsl:variable name="str"> |
| 639 |
<xsl:call-template name="subfieldSelect"> |
| 640 |
<xsl:with-param name="codes">abcdfghiklmorstux</xsl:with-param> |
| 641 |
</xsl:call-template> |
| 642 |
</xsl:variable> |
| 643 |
<xsl:call-template name="chopPunctuation"> |
| 644 |
<xsl:with-param name="chopString"> |
| 645 |
<xsl:value-of select="substring($str,1,string-length($str)-1)"/> |
| 646 |
</xsl:with-param> |
| 647 |
</xsl:call-template> |
| 648 |
<!-- add relator code too between brackets--> |
| 649 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
| 650 |
<span class="relatorcode"> |
| 651 |
<xsl:text> [</xsl:text> |
| 652 |
<xsl:choose> |
| 653 |
<xsl:when test="marc:subfield[@code='e']"> |
| 654 |
<xsl:call-template name="chopPunctuation"> |
| 655 |
<xsl:with-param name="chopString"> |
| 656 |
<xsl:call-template name="subfieldSelect"> |
| 657 |
<xsl:with-param name="codes">e</xsl:with-param> |
| 658 |
</xsl:call-template> |
| 659 |
</xsl:with-param> |
| 660 |
<xsl:with-param name="punctuation"> |
| 661 |
<xsl:text>:,;/. </xsl:text> |
| 662 |
</xsl:with-param> |
| 663 |
</xsl:call-template> |
| 664 |
</xsl:when> |
| 665 |
<xsl:otherwise> |
| 666 |
<xsl:call-template name="chopPunctuation"> |
| 667 |
<xsl:with-param name="chopString"> |
| 668 |
<xsl:call-template name="subfieldSelect"> |
| 669 |
<xsl:with-param name="codes">4</xsl:with-param> |
| 670 |
</xsl:call-template> |
| 671 |
</xsl:with-param> |
| 672 |
<xsl:with-param name="punctuation"> |
| 673 |
<xsl:text>:,;/. </xsl:text> |
| 674 |
</xsl:with-param> |
| 675 |
</xsl:call-template> |
| 676 |
</xsl:otherwise> |
| 677 |
</xsl:choose> |
| 678 |
<xsl:text>]</xsl:text> |
| 679 |
</span> |
| 680 |
</xsl:if> |
| 681 |
<xsl:choose> |
| 682 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise> |
| 683 |
</xsl:choose> |
| 684 |
</xsl:for-each> |
| 685 |
</span> |
| 686 |
</xsl:if> |
| 687 |
|
| 575 |
<xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> |
688 |
<xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> |
| 576 |
<span class="results_summary subjects"><span class="label">Subject(s): </span> |
689 |
<span class="results_summary subjects"><span class="label">Subject(s): </span> |
| 577 |
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> |
690 |
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> |
|
Lines 1025-1032
Link Here
|
| 1025 |
<xsl:param name="UseAuthoritiesForTracings" /> |
1138 |
<xsl:param name="UseAuthoritiesForTracings" /> |
| 1026 |
<xsl:param name="materialTypeLabel" /> |
1139 |
<xsl:param name="materialTypeLabel" /> |
| 1027 |
<xsl:param name="theme" /> |
1140 |
<xsl:param name="theme" /> |
|
|
1141 |
<xsl:if test="count($authorfield)>0"> |
| 1142 |
<!--#13382 Changed Additional author to contributor --> |
| 1143 |
<h5> |
| 1028 |
<xsl:for-each select="$authorfield"> |
1144 |
<xsl:for-each select="$authorfield"> |
| 1029 |
<xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose> |
1145 |
<xsl:choose> |
|
|
1146 |
<xsl:when test="position()>1"/> |
| 1147 |
<xsl:when test="@tag<700">by </xsl:when> |
| 1148 |
<!--#13382 Changed Additional author to contributor --> |
| 1149 |
<xsl:otherwise>Contributor(s): </xsl:otherwise> |
| 1150 |
</xsl:choose> |
| 1030 |
<xsl:choose> |
1151 |
<xsl:choose> |
| 1031 |
<xsl:when test="not(@tag=111 or @tag=711)" /> |
1152 |
<xsl:when test="not(@tag=111 or @tag=711)" /> |
| 1032 |
<xsl:when test="marc:subfield[@code='n']"> |
1153 |
<xsl:when test="marc:subfield[@code='n']"> |
|
Lines 1067-1087
Link Here
|
| 1067 |
</xsl:choose> |
1188 |
</xsl:choose> |
| 1068 |
<span property="name"> |
1189 |
<span property="name"> |
| 1069 |
<xsl:choose> |
1190 |
<xsl:choose> |
| 1070 |
<xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when> |
1191 |
<xsl:when test="@tag=100"><xsl:call-template name="nameABCQ"/></xsl:when> |
| 1071 |
<xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> |
1192 |
<xsl:when test="@tag=110"><xsl:call-template name="nameABCDN"/></xsl:when> |
| 1072 |
<xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> |
1193 |
<xsl:when test="@tag=111"><xsl:call-template name="nameACDEQ"/></xsl:when> |
|
|
1194 |
<!-- #13382 excludes 700$i and ind2=2, displayed as Related Works --> |
| 1195 |
<!--#13382 Added all relevant subfields 4, e, are handled separately --> |
| 1196 |
<xsl:when test="@tag=700 or @tag=710 or @tag=711"> |
| 1197 |
<xsl:variable name="str"> |
| 1198 |
<xsl:call-template name="subfieldSelect"> |
| 1199 |
<xsl:with-param name="codes">abcdfghiklmnoprstux</xsl:with-param> |
| 1200 |
</xsl:call-template> |
| 1201 |
</xsl:variable> |
| 1202 |
<xsl:call-template name="chopPunctuation"> |
| 1203 |
<xsl:with-param name="chopString"> |
| 1204 |
<xsl:value-of select="$str"/> |
| 1205 |
</xsl:with-param> |
| 1206 |
<xsl:with-param name="punctuation"> |
| 1207 |
<xsl:text>:,;/. </xsl:text> |
| 1208 |
</xsl:with-param> |
| 1209 |
</xsl:call-template> |
| 1210 |
</xsl:when> |
| 1073 |
</xsl:choose> |
1211 |
</xsl:choose> |
| 1074 |
</span></span></span> |
1212 |
</span></span></span> |
| 1075 |
<!-- add relator code too between brackets--> |
1213 |
<!-- #13382 If both $e and $4 are present only display $e --> |
| 1076 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
1214 |
<xsl:if test="marc:subfield[@code='4' or @code='e']"> |
| 1077 |
<span class="relatorcode"> |
1215 |
<xsl:if test="not(@tag=111 or @tag=711)"> |
| 1078 |
<xsl:text> [</xsl:text> |
1216 |
<span class="relatorcode"> |
| 1079 |
<xsl:choose> |
1217 |
<xsl:text> [</xsl:text> |
| 1080 |
<xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when> |
1218 |
<xsl:choose> |
| 1081 |
<xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise> |
1219 |
<xsl:when test="marc:subfield[@code='e']"> |
| 1082 |
</xsl:choose> |
1220 |
<xsl:call-template name="chopPunctuation"> |
| 1083 |
<xsl:text>]</xsl:text> |
1221 |
<xsl:with-param name="chopString"> |
| 1084 |
</span> |
1222 |
<xsl:call-template name="subfieldSelect"> |
|
|
1223 |
<xsl:with-param name="codes">e</xsl:with-param> |
| 1224 |
</xsl:call-template> |
| 1225 |
</xsl:with-param> |
| 1226 |
<xsl:with-param name="punctuation"> |
| 1227 |
<xsl:text>:,;/. </xsl:text> |
| 1228 |
</xsl:with-param> |
| 1229 |
</xsl:call-template> |
| 1230 |
</xsl:when> |
| 1231 |
<xsl:otherwise> |
| 1232 |
<xsl:call-template name="chopPunctuation"> |
| 1233 |
<xsl:with-param name="chopString"> |
| 1234 |
<xsl:call-template name="subfieldSelect"> |
| 1235 |
<xsl:with-param name="codes">4</xsl:with-param> |
| 1236 |
</xsl:call-template> |
| 1237 |
</xsl:with-param> |
| 1238 |
<xsl:with-param name="punctuation"> |
| 1239 |
<xsl:text>:,;/. </xsl:text> |
| 1240 |
</xsl:with-param> |
| 1241 |
</xsl:call-template> |
| 1242 |
</xsl:otherwise> |
| 1243 |
</xsl:choose> |
| 1244 |
<xsl:text>]</xsl:text> |
| 1245 |
</span> |
| 1246 |
</xsl:if> |
| 1085 |
</xsl:if> |
1247 |
</xsl:if> |
| 1086 |
</a> |
1248 |
</a> |
| 1087 |
<xsl:if test="marc:subfield[@code=9]"> |
1249 |
<xsl:if test="marc:subfield[@code=9]"> |
|
Lines 1095-1102
Link Here
|
| 1095 |
</xsl:element> |
1257 |
</xsl:element> |
| 1096 |
</a> |
1258 |
</a> |
| 1097 |
</xsl:if> |
1259 |
</xsl:if> |
|
|
1260 |
<!--#13382 Changed separator to | --> |
| 1261 |
<xsl:choose> |
| 1262 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise> |
| 1263 |
</xsl:choose> |
| 1098 |
</xsl:for-each> |
1264 |
</xsl:for-each> |
| 1099 |
<xsl:text>.</xsl:text> |
1265 |
</h5> |
|
|
1266 |
</xsl:if> |
| 1100 |
</xsl:template> |
1267 |
</xsl:template> |
| 1101 |
|
1268 |
|
| 1102 |
<xsl:template name="nameABCQ"> |
1269 |
<xsl:template name="nameABCQ"> |
| 1103 |
- |
|
|