View | Details | Raw Unified | Return to bug 13382
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-19 / +179 lines)
Lines 3-8 Link Here
3
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
3
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
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/02/06 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][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'])]">
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()&gt;1"/>
1067
          <xsl:when test="position()&gt;1"/>
951
          <xsl:when test="@tag&lt;700">Author(s): </xsl:when>
1068
          <xsl:when test="@tag&lt;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>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-27 / +193 lines)
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 "&#160;" >]>
4
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
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)&gt;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()&gt;1"/>
1147
                <xsl:when test="@tag&lt;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
- 

Return to bug 13382