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

(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl (-36 / +30 lines)
Lines 313-355 Link Here
313
313
314
        <!-- Publisher info and RDA related info from tags 260, 264 -->
314
        <!-- Publisher info and RDA related info from tags 260, 264 -->
315
        <xsl:choose>
315
        <xsl:choose>
316
        <xsl:when test="marc:datafield[@tag=260]">
316
            <xsl:when test="marc:datafield[@tag=264]">    
317
        <span class="results_summary publisher"><span class="label">Publisher: </span>
318
            <xsl:for-each select="marc:datafield[@tag=260]">
319
                <xsl:if test="marc:subfield[@code='a']">
320
                    <xsl:call-template name="subfieldSelect">
321
                        <xsl:with-param name="codes">a</xsl:with-param>
322
                    </xsl:call-template>
323
                </xsl:if>
324
                <xsl:text> </xsl:text>
325
                <xsl:if test="marc:subfield[@code='b']">
326
                <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
327
                    <xsl:call-template name="subfieldSelect">
328
                        <xsl:with-param name="codes">b</xsl:with-param>
329
                    </xsl:call-template>
330
               </a>
331
               </xsl:if>
332
               <xsl:text> </xsl:text>
333
                <xsl:call-template name="chopPunctuation">
334
                  <xsl:with-param name="chopString">
335
                    <xsl:call-template name="subfieldSelect">
336
                        <xsl:with-param name="codes">cg</xsl:with-param>
337
                    </xsl:call-template>
338
                   </xsl:with-param>
339
               </xsl:call-template>
340
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
341
            </xsl:for-each>
342
            <xsl:if test="marc:datafield[@tag=264]">
343
                <xsl:text>; </xsl:text>
344
                <xsl:call-template name="showRDAtag264"/>
317
                <xsl:call-template name="showRDAtag264"/>
345
            </xsl:if>
318
            </xsl:when>
346
        </span>
319
            <xsl:when test="marc:datafield[@tag=260]">
347
        </xsl:when>
320
                <span class="results_summary publisher"><span class="label">Publisher: </span>
348
        <xsl:when test="marc:datafield[@tag=264]">
321
                    <xsl:for-each select="marc:datafield[@tag=260]">
349
            <span class="results_summary">
322
                        <xsl:if test="marc:subfield[@code='a']">
350
                <xsl:call-template name="showRDAtag264"/>
323
                            <xsl:call-template name="subfieldSelect">
351
            </span>
324
                                <xsl:with-param name="codes">a</xsl:with-param>
352
        </xsl:when>
325
                            </xsl:call-template>
326
                        </xsl:if>
327
                        <xsl:text> </xsl:text>
328
                        <xsl:if test="marc:subfield[@code='b']">
329
                        <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
330
                            <xsl:call-template name="subfieldSelect">
331
                                <xsl:with-param name="codes">b</xsl:with-param>
332
                            </xsl:call-template>
333
                       </a>
334
                       </xsl:if>
335
                       <xsl:text> </xsl:text>
336
                        <xsl:call-template name="chopPunctuation">
337
                          <xsl:with-param name="chopString">
338
                            <xsl:call-template name="subfieldSelect">
339
                                <xsl:with-param name="codes">cg</xsl:with-param>
340
                            </xsl:call-template>
341
                           </xsl:with-param>
342
                       </xsl:call-template>
343
                            <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
344
                    </xsl:for-each>
345
                </span>
346
            </xsl:when>
353
        </xsl:choose>
347
        </xsl:choose>
354
348
355
        <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
349
        <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl (-34 / +28 lines)
Lines 774-814 Link Here
774
774
775
    <!-- Publisher info and RDA related info from tags 260, 264 -->
775
    <!-- Publisher info and RDA related info from tags 260, 264 -->
776
    <xsl:choose>
776
    <xsl:choose>
777
    <xsl:when test="marc:datafield[@tag=260]">
777
        <xsl:when test="marc:datafield[@tag=264]">    
778
        <span class="results_summary publisher"><span class="label">Publisher: </span>
779
            <xsl:for-each select="marc:datafield[@tag=260]">
780
                <xsl:if test="marc:subfield[@code='a']">
781
                    <xsl:call-template name="subfieldSelect">
782
                        <xsl:with-param name="codes">a</xsl:with-param>
783
                    </xsl:call-template>
784
                </xsl:if>
785
                <xsl:text> </xsl:text>
786
                <xsl:if test="marc:subfield[@code='b']">
787
                    <xsl:call-template name="subfieldSelect">
788
                        <xsl:with-param name="codes">b</xsl:with-param>
789
                    </xsl:call-template>
790
                </xsl:if>
791
                <xsl:text> </xsl:text>
792
                <xsl:call-template name="chopPunctuation">
793
                  <xsl:with-param name="chopString">
794
                    <xsl:call-template name="subfieldSelect">
795
                        <xsl:with-param name="codes">cg</xsl:with-param>
796
                    </xsl:call-template>
797
                   </xsl:with-param>
798
                </xsl:call-template>
799
                <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
800
            </xsl:for-each>
801
            <xsl:if test="marc:datafield[@tag=264]">
802
                <xsl:text>; </xsl:text>
803
                <xsl:call-template name="showRDAtag264"/>
804
            </xsl:if>
805
        </span>
806
    </xsl:when>
807
    <xsl:when test="marc:datafield[@tag=264]">
808
        <span class="results_summary">
809
            <xsl:call-template name="showRDAtag264"/>
778
            <xsl:call-template name="showRDAtag264"/>
810
        </span>
779
        </xsl:when>
811
    </xsl:when>
780
        <xsl:when test="marc:datafield[@tag=260]">
781
            <span class="results_summary publisher"><span class="label">Publisher: </span>
782
                <xsl:for-each select="marc:datafield[@tag=260]">
783
                    <xsl:if test="marc:subfield[@code='a']">
784
                        <xsl:call-template name="subfieldSelect">
785
                            <xsl:with-param name="codes">a</xsl:with-param>
786
                        </xsl:call-template>
787
                    </xsl:if>
788
                    <xsl:text> </xsl:text>
789
                    <xsl:if test="marc:subfield[@code='b']">
790
                        <xsl:call-template name="subfieldSelect">
791
                            <xsl:with-param name="codes">b</xsl:with-param>
792
                        </xsl:call-template>
793
                    </xsl:if>
794
                    <xsl:text> </xsl:text>
795
                    <xsl:call-template name="chopPunctuation">
796
                      <xsl:with-param name="chopString">
797
                        <xsl:call-template name="subfieldSelect">
798
                            <xsl:with-param name="codes">cg</xsl:with-param>
799
                        </xsl:call-template>
800
                       </xsl:with-param>
801
                    </xsl:call-template>
802
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
803
                </xsl:for-each>
804
            </span>
805
        </xsl:when>
812
    </xsl:choose>
806
    </xsl:choose>
813
807
814
    <!-- Dissertation note -->
808
    <!-- Dissertation note -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl (-45 / +34 lines)
Lines 1-6 Link Here
1
<?xml version='1.0'?>
1
<?xml version='1.0'?>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
3
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
4
	<xsl:template name="datafield">
4
	<xsl:template name="datafield">
5
		<xsl:param name="tag"/>
5
		<xsl:param name="tag"/>
6
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
6
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
Lines 217-276 Link Here
217
         Publisher-latest or Publisher or 'Other'-latest or 'Other'
217
         Publisher-latest or Publisher or 'Other'-latest or 'Other'
218
         The preferred tag is saved in the fav variable and passed to a
218
         The preferred tag is saved in the fav variable and passed to a
219
         helper named-template -->
219
         helper named-template -->
220
    <!-- Amended  to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record)  -->    
220
        <xsl:choose>
221
        <xsl:choose>
221
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3 and @ind2=1]">
222
            <!-- ind1==3 means latest change -->
223
            <!-- ind2==1 means Publisher -->
224
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3 and @ind2=1][1]"/>
225
              <xsl:call-template name="showRDAtag264helper">
226
                <xsl:with-param name="field" select="$fav"/>
227
              </xsl:call-template>
228
            </xsl:when>
229
230
            <xsl:when test="marc:datafield[@tag=264 and @ind2=1]">
231
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind2=1][last()]"/>
232
              <xsl:call-template name="showRDAtag264helper">
233
                <xsl:with-param name="field" select="$fav"/>
234
              </xsl:call-template>
235
            </xsl:when>
236
237
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
222
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
238
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3][1]"/>
223
                <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]">
239
              <xsl:call-template name="showRDAtag264helper">
224
                    <xsl:call-template name="showRDAtag264helper">
240
                <xsl:with-param name="field" select="$fav"/>
225
                        <xsl:with-param name="field" select="."/>
241
              </xsl:call-template>
226
                    </xsl:call-template>            
227
                </xsl:for-each>
242
            </xsl:when>
228
            </xsl:when>
243
244
            <xsl:otherwise>
229
            <xsl:otherwise>
245
              <xsl:variable name="fav" select="marc:datafield[@tag=264][last()]"/>
230
                <xsl:for-each select="marc:datafield[@tag=264]">
246
              <xsl:call-template name="showRDAtag264helper">
231
                    <xsl:call-template name="showRDAtag264helper">
247
                <xsl:with-param name="field" select="$fav"/>
232
                        <xsl:with-param name="field" select="."/>
248
              </xsl:call-template>
233
                    </xsl:call-template>    
234
                </xsl:for-each>
249
            </xsl:otherwise>
235
            </xsl:otherwise>
250
        </xsl:choose>
236
        </xsl:choose>
251
    </xsl:template>
237
    </xsl:template>
252
    <xsl:template name="showRDAtag264helper">
238
    <xsl:template name="showRDAtag264helper">
253
        <xsl:param name="field"/>
239
        <xsl:param name="field"/>
254
        <xsl:variable name="ind2" select="$field/@ind2"/>
240
        <xsl:variable name="ind2" select="$field/@ind2"/>
255
        <xsl:choose>
241
        <span class="results_summary">
256
            <xsl:when test="$ind2='0'">
242
            <xsl:choose>
257
                <span class="label">Producer: </span>
243
                <xsl:when test="$ind2='0'">
258
            </xsl:when>
244
                    <span class="label">Producer: </span>
259
            <xsl:when test="$ind2='1'">
245
                </xsl:when>
260
                <span class="label">Publisher: </span>
246
                <xsl:when test="$ind2='1'">
261
            </xsl:when>
247
                    <span class="label">Publisher: </span>
262
            <xsl:when test="$ind2='2'">
248
                </xsl:when>
263
                <span class="label">Distributor: </span>
249
                <xsl:when test="$ind2='2'">
264
            </xsl:when>
250
                    <span class="label">Distributor: </span>
265
            <xsl:when test="$ind2='3'">
251
                </xsl:when>
266
                <span class="label">Manufacturer: </span>
252
                <xsl:when test="$ind2='3'">
267
            </xsl:when>
253
                    <span class="label">Manufacturer: </span>
268
        </xsl:choose>
254
                </xsl:when>
269
        <xsl:value-of select="$field/marc:subfield[@code='a']"/>
255
                <xsl:when test="$ind2='4'">
270
        <xsl:text> </xsl:text>
256
                    <span class="label">Copyright Date: </span>
271
        <xsl:value-of select="$field/marc:subfield[@code='b']"/>
257
                </xsl:when>
272
        <xsl:text> </xsl:text>
258
            </xsl:choose>
273
        <xsl:value-of select="$field/marc:subfield[@code='c']"/>
259
            <xsl:call-template name="subfieldSelect">
260
                <xsl:with-param name="codes">abc</xsl:with-param>
261
            </xsl:call-template>
262
        </span>
274
    </xsl:template>
263
    </xsl:template>
275
264
276
</xsl:stylesheet>
265
</xsl:stylesheet>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl (-44 / +38 lines)
Lines 335-385 Link Here
335
335
336
        <!-- Publisher info and RDA related info from tags 260, 264 -->
336
        <!-- Publisher info and RDA related info from tags 260, 264 -->
337
        <xsl:choose>
337
        <xsl:choose>
338
        <xsl:when test="marc:datafield[@tag=260]">
338
            <xsl:when test="marc:datafield[@tag=264]">
339
        <span class="results_summary publisher"><span class="label">Publisher: </span>
340
            <xsl:for-each select="marc:datafield[@tag=260]">
341
                <span property="publisher" typeof="Organization">
342
                <xsl:if test="marc:subfield[@code='a']">
343
                    <span property="location">
344
                    <xsl:call-template name="subfieldSelect">
345
                        <xsl:with-param name="codes">a</xsl:with-param>
346
                    </xsl:call-template>
347
                    </span>
348
                </xsl:if>
349
                <xsl:text> </xsl:text>
350
                <xsl:if test="marc:subfield[@code='b']">
351
                <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
352
                    <xsl:call-template name="subfieldSelect">
353
                        <xsl:with-param name="codes">b</xsl:with-param>
354
                    </xsl:call-template>
355
                </a></span>
356
                </xsl:if>
357
                </span>
358
                <xsl:text> </xsl:text>
359
                <xsl:if test="marc:subfield[@code='c' or @code='g']">
360
                <span property="datePublished">
361
                    <xsl:call-template name="chopPunctuation">
362
                      <xsl:with-param name="chopString">
363
                        <xsl:call-template name="subfieldSelect">
364
                            <xsl:with-param name="codes">cg</xsl:with-param>
365
                        </xsl:call-template>
366
                       </xsl:with-param>
367
                   </xsl:call-template>
368
                </span>
369
                </xsl:if>
370
                <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
371
            </xsl:for-each>
372
            <xsl:if test="marc:datafield[@tag=264]">
373
                <xsl:text>; </xsl:text>
374
                <xsl:call-template name="showRDAtag264"/>
375
            </xsl:if>
376
        </span>
377
        </xsl:when>
378
        <xsl:when test="marc:datafield[@tag=264]">
379
            <span class="results_summary">
380
                <xsl:call-template name="showRDAtag264"/>
339
                <xsl:call-template name="showRDAtag264"/>
381
            </span>
340
            </xsl:when>
382
        </xsl:when>
341
            <xsl:when test="marc:datafield[@tag=260]">
342
             <span class="results_summary publisher"><span class="label">Publisher: </span>
343
                 <xsl:for-each select="marc:datafield[@tag=260]">
344
                     <span property="publisher" typeof="Organization">
345
                     <xsl:if test="marc:subfield[@code='a']">
346
                         <span property="location">
347
                         <xsl:call-template name="subfieldSelect">
348
                             <xsl:with-param name="codes">a</xsl:with-param>
349
                         </xsl:call-template>
350
                         </span>
351
                     </xsl:if>
352
                     <xsl:text> </xsl:text>
353
                     <xsl:if test="marc:subfield[@code='b']">
354
                     <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
355
                         <xsl:call-template name="subfieldSelect">
356
                             <xsl:with-param name="codes">b</xsl:with-param>
357
                         </xsl:call-template>
358
                     </a></span>
359
                     </xsl:if>
360
                     </span>
361
                     <xsl:text> </xsl:text>
362
                     <xsl:if test="marc:subfield[@code='c' or @code='g']">
363
                     <span property="datePublished">
364
                         <xsl:call-template name="chopPunctuation">
365
                           <xsl:with-param name="chopString">
366
                             <xsl:call-template name="subfieldSelect">
367
                                 <xsl:with-param name="codes">cg</xsl:with-param>
368
                             </xsl:call-template>
369
                            </xsl:with-param>
370
                        </xsl:call-template>
371
                     </span>
372
                     </xsl:if>
373
                     <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
374
                 </xsl:for-each>
375
             </span>
376
            </xsl:when>
383
        </xsl:choose>
377
        </xsl:choose>
384
378
385
        <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
379
        <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl (-30 / +28 lines)
Lines 924-962 Link Here
924
924
925
    <!-- Publisher info and RDA related info from tags 260, 264 -->
925
    <!-- Publisher info and RDA related info from tags 260, 264 -->
926
    <xsl:choose>
926
    <xsl:choose>
927
        <xsl:when test="marc:datafield[@tag=264]">
928
            <xsl:call-template name="showRDAtag264"/>
929
        </xsl:when>
927
        <xsl:when test="marc:datafield[@tag=260]">
930
        <xsl:when test="marc:datafield[@tag=260]">
928
        <span class="results_summary publisher"><span class="label">Publisher: </span>
931
            <span class="results_summary publisher"><span class="label">Publisher: </span>
929
            <xsl:for-each select="marc:datafield[@tag=260]">
932
                <xsl:for-each select="marc:datafield[@tag=260]">
930
                <xsl:if test="marc:subfield[@code='a']">
933
                    <xsl:if test="marc:subfield[@code='a']">
931
                    <xsl:call-template name="subfieldSelect">
934
                        <xsl:call-template name="subfieldSelect">
932
                        <xsl:with-param name="codes">a</xsl:with-param>
935
                            <xsl:with-param name="codes">a</xsl:with-param>
933
                    </xsl:call-template>
936
                        </xsl:call-template>
934
                </xsl:if>
937
                    </xsl:if>
935
                <xsl:text> </xsl:text>
938
                    <xsl:text> </xsl:text>
936
                <xsl:if test="marc:subfield[@code='b']">
939
                    <xsl:if test="marc:subfield[@code='b']">
937
                    <xsl:call-template name="subfieldSelect">
940
                        <xsl:call-template name="subfieldSelect">
938
                        <xsl:with-param name="codes">b</xsl:with-param>
941
                            <xsl:with-param name="codes">b</xsl:with-param>
942
                        </xsl:call-template>
943
                    </xsl:if>
944
                    <xsl:text> </xsl:text>
945
                    <xsl:call-template name="chopPunctuation">
946
                      <xsl:with-param name="chopString">
947
                        <xsl:call-template name="subfieldSelect">
948
                            <xsl:with-param name="codes">cg</xsl:with-param>
949
                        </xsl:call-template>
950
                       </xsl:with-param>
939
                    </xsl:call-template>
951
                    </xsl:call-template>
952
                    <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
953
                </xsl:for-each>
954
                <xsl:if test="marc:datafield[@tag=264]">
955
                    <xsl:text>; </xsl:text>
956
                    <xsl:call-template name="showRDAtag264"/>
940
                </xsl:if>
957
                </xsl:if>
941
                <xsl:text> </xsl:text>
942
                <xsl:call-template name="chopPunctuation">
943
                  <xsl:with-param name="chopString">
944
                    <xsl:call-template name="subfieldSelect">
945
                        <xsl:with-param name="codes">cg</xsl:with-param>
946
                    </xsl:call-template>
947
                   </xsl:with-param>
948
                </xsl:call-template>
949
                <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
950
            </xsl:for-each>
951
            <xsl:if test="marc:datafield[@tag=264]">
952
                <xsl:text>; </xsl:text>
953
                <xsl:call-template name="showRDAtag264"/>
954
            </xsl:if>
955
        </span>
956
        </xsl:when>
957
        <xsl:when test="marc:datafield[@tag=264]">
958
            <span class="results_summary">
959
                <xsl:call-template name="showRDAtag264"/>
960
            </span>
958
            </span>
961
        </xsl:when>
959
        </xsl:when>
962
    </xsl:choose>
960
    </xsl:choose>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl (-48 / +35 lines)
Lines 1-6 Link Here
1
<?xml version='1.0'?>
1
<?xml version='1.0'?>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
2
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
3
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
<xsl:stylesheet version="1.0" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="marc">
4
	<xsl:template name="datafield">
4
	<xsl:template name="datafield">
5
		<xsl:param name="tag"/>
5
		<xsl:param name="tag"/>
6
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
6
		<xsl:param name="ind1"><xsl:text> </xsl:text></xsl:param>
Lines 209-276 Link Here
209
    </xsl:template>
209
    </xsl:template>
210
210
211
    <xsl:template name="showRDAtag264">
211
    <xsl:template name="showRDAtag264">
212
    <!-- Function showRDAtag264 shows selected information from tag 264
212
        <!-- Function showRDAtag264 shows selected information from tag 264
213
         on the Publisher line (used by OPAC Detail and Results)
213
         on the Publisher line (used by OPAC Detail and Results)
214
         Depending on how many tags you have, we will pick by preference
214
         Depending on how many tags you have, we will pick by preference
215
         Publisher-latest or Publisher or 'Other'-latest or 'Other'
215
         Publisher-latest or Publisher or 'Other'-latest or 'Other'
216
         The preferred tag is saved in the fav variable and passed to a
216
         The preferred tag is saved in the fav variable and passed to a
217
         helper named-template -->
217
         helper named-template -->
218
        <!-- Amended  to show all 264 fields (filtered by ind1=3 if ind1=3 is present in the record)  -->    
218
        <xsl:choose>
219
        <xsl:choose>
219
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3 and @ind2=1]">
220
            <!-- ind1==3 means latest change -->
221
            <!-- ind2==1 means Publisher -->
222
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3 and @ind2=1][1]"/>
223
              <xsl:call-template name="showRDAtag264helper">
224
                <xsl:with-param name="field" select="$fav"/>
225
              </xsl:call-template>
226
            </xsl:when>
227
228
            <xsl:when test="marc:datafield[@tag=264 and @ind2=1]">
229
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind2=1][last()]"/>
230
              <xsl:call-template name="showRDAtag264helper">
231
                <xsl:with-param name="field" select="$fav"/>
232
              </xsl:call-template>
233
            </xsl:when>
234
235
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
220
            <xsl:when test="marc:datafield[@tag=264 and @ind1=3]">
236
              <xsl:variable name="fav" select="marc:datafield[@tag=264 and @ind1=3][1]"/>
221
                <xsl:for-each select="marc:datafield[@tag=264 and @ind1=3]">
237
              <xsl:call-template name="showRDAtag264helper">
222
                    <xsl:call-template name="showRDAtag264helper">
238
                <xsl:with-param name="field" select="$fav"/>
223
                        <xsl:with-param name="field" select="."/>
239
              </xsl:call-template>
224
                    </xsl:call-template>            
225
                </xsl:for-each>
240
            </xsl:when>
226
            </xsl:when>
241
242
            <xsl:otherwise>
227
            <xsl:otherwise>
243
              <xsl:variable name="fav" select="marc:datafield[@tag=264][last()]"/>
228
                <xsl:for-each select="marc:datafield[@tag=264]">
244
              <xsl:call-template name="showRDAtag264helper">
229
                    <xsl:call-template name="showRDAtag264helper">
245
                <xsl:with-param name="field" select="$fav"/>
230
                        <xsl:with-param name="field" select="."/>
246
              </xsl:call-template>
231
                    </xsl:call-template>    
232
                </xsl:for-each>
247
            </xsl:otherwise>
233
            </xsl:otherwise>
248
        </xsl:choose>
234
        </xsl:choose>
249
    </xsl:template>
235
    </xsl:template>
250
    <xsl:template name="showRDAtag264helper">
236
    <xsl:template name="showRDAtag264helper">
251
        <xsl:param name="field"/>
237
        <xsl:param name="field"/>
252
        <xsl:variable name="ind2" select="$field/@ind2"/>
238
        <xsl:variable name="ind2" select="$field/@ind2"/>
253
        <xsl:choose>
239
        <span class="results_summary">
254
            <xsl:when test="$ind2='0'">
240
            <xsl:choose>
255
                <span class="label">Producer: </span>
241
                <xsl:when test="$ind2='0'">
256
            </xsl:when>
242
                    <span class="label">Producer: </span>
257
            <xsl:when test="$ind2='1'">
243
                </xsl:when>
258
                <span class="label">Publisher: </span>
244
                <xsl:when test="$ind2='1'">
259
            </xsl:when>
245
                    <span class="label">Publisher: </span>
260
            <xsl:when test="$ind2='2'">
246
                </xsl:when>
261
                <span class="label">Distributor: </span>
247
                <xsl:when test="$ind2='2'">
262
            </xsl:when>
248
                    <span class="label">Distributor: </span>
263
            <xsl:when test="$ind2='3'">
249
                </xsl:when>
264
                <span class="label">Manufacturer: </span>
250
                <xsl:when test="$ind2='3'">
265
            </xsl:when>
251
                    <span class="label">Manufacturer: </span>
266
        </xsl:choose>
252
                </xsl:when>
267
        <xsl:value-of select="$field/marc:subfield[@code='a']"/>
253
                <xsl:when test="$ind2='4'">
268
        <xsl:text> </xsl:text>
254
                    <span class="label">Copyright Date: </span>
269
        <xsl:value-of select="$field/marc:subfield[@code='b']"/>
255
                </xsl:when>
270
        <xsl:text> </xsl:text>
256
            </xsl:choose>
271
        <xsl:value-of select="$field/marc:subfield[@code='c']"/>
257
            <xsl:call-template name="subfieldSelect">
258
                <xsl:with-param name="codes">abc</xsl:with-param>
259
            </xsl:call-template>
260
        </span>
272
    </xsl:template>
261
    </xsl:template>
273
274
</xsl:stylesheet>
262
</xsl:stylesheet>
275
263
276
<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
264
<!-- Stylus Studio meta-information - (c)1998-2002 eXcelon Corp.
277
- 

Return to bug 14734