1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
4 <xsl:stylesheet version="1.0"
5 xmlns:marc="http://www.loc.gov/MARC21/slim"
6 xmlns:items="http://www.koha-community.org/items"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 exclude-result-prefixes="marc items">
9 <xsl:import href="MARC21slimUtils.xsl"/>
10 <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
11 <xsl:template match="/">
12 <xsl:apply-templates/>
15 <xsl:template match="marc:record">
17 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
18 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
20 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
21 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
22 <xsl:variable name="OPACurlOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACurlOpenInNewWindow']"/>
23 <xsl:variable name="urlLinkText" select="marc:sysprefs/marc:syspref[@name='urlLinkText']"/>
24 <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
26 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
27 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
28 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
29 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
30 <xsl:variable name="leader" select="marc:leader"/>
31 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
32 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
33 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
34 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
35 <xsl:variable name="materialTypeCode">
37 <xsl:when test="$leader19='a'">ST</xsl:when>
38 <xsl:when test="$leader6='a'">
40 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
41 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
42 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
45 <xsl:when test="$leader6='t'">BK</xsl:when>
46 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
47 <xsl:when test="$leader6='m'">CF</xsl:when>
48 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
49 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
50 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
51 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
54 <xsl:variable name="materialTypeLabel">
56 <xsl:when test="$leader19='a'">Set</xsl:when>
57 <xsl:when test="$leader6='a'">
59 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
60 <xsl:when test="$leader7='i' or $leader7='s'">
62 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
63 <xsl:otherwise>Series</xsl:otherwise>
66 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
69 <xsl:when test="$leader6='t'">Book</xsl:when>
70 <xsl:when test="$leader6='o'">Kit</xsl:when>
71 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
72 <xsl:when test="$leader6='m'">Computer File</xsl:when>
73 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
74 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual Material</xsl:when>
75 <xsl:when test="$leader6='j'">Music</xsl:when>
76 <xsl:when test="$leader6='i'">Sound</xsl:when>
77 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
81 <!-- Title Statement -->
82 <!-- Alternate Graphic Representation (MARC 880) -->
83 <xsl:if test="$display880">
85 <xsl:call-template name="m880Select">
86 <xsl:with-param name="basetags">245</xsl:with-param>
87 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
92 <xsl:if test="marc:datafield[@tag=245]">
94 <xsl:for-each select="marc:datafield[@tag=245]">
95 <xsl:call-template name="subfieldSelect">
96 <xsl:with-param name="codes">a</xsl:with-param>
98 <xsl:if test="marc:subfield[@code='b']">
99 <xsl:text> </xsl:text>
100 <xsl:call-template name="subfieldSelect">
101 <xsl:with-param name="codes">b</xsl:with-param>
104 <xsl:if test="marc:subfield[@code='h']">
105 <xsl:text> </xsl:text>
106 <xsl:call-template name="subfieldSelect">
107 <xsl:with-param name="codes">h</xsl:with-param>
110 <xsl:text> </xsl:text>
111 <xsl:call-template name="subfieldSelect">
112 <xsl:with-param name="codes">fgknps</xsl:with-param>
118 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
119 <xsl:if test="$display880">
121 <xsl:call-template name="m880Select">
122 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
123 <xsl:with-param name="codes">abc</xsl:with-param>
124 <xsl:with-param name="index">au</xsl:with-param>
125 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
131 <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]">
132 <h5 class="author">by
133 <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
136 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
137 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
140 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
143 <xsl:call-template name="nameABCDQ"/></a>
145 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
148 <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
151 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
152 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
155 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
158 <xsl:call-template name="nameABCDN"/></a>
159 <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
162 <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
164 <xsl:when test="marc:subfield[@code='n']">
165 <xsl:text> </xsl:text>
166 <xsl:call-template name="subfieldSelect">
167 <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template>
168 <xsl:text> </xsl:text>
173 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
174 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
177 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
180 <xsl:call-template name="nameACDEQ"/></a>
181 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
188 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
189 <xsl:if test="$materialTypeCode!=''">
190 <span class="results_summary"><span class="label">Type: </span>
191 <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element>
192 <xsl:value-of select="$materialTypeLabel"/>
197 <!--Series: Alternate Graphic Representation (MARC 880) -->
198 <xsl:if test="$display880">
199 <xsl:call-template name="m880Select">
200 <xsl:with-param name="basetags">440,490</xsl:with-param>
201 <xsl:with-param name="codes">av</xsl:with-param>
202 <xsl:with-param name="class">results_summary</xsl:with-param>
203 <xsl:with-param name="label">Series: </xsl:with-param>
204 <xsl:with-param name="index">se</xsl:with-param>
209 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
210 <span class="results_summary"><span class="label">Series: </span>
212 <xsl:for-each select="marc:datafield[@tag=440]">
213 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
214 <xsl:call-template name="chopPunctuation">
215 <xsl:with-param name="chopString">
216 <xsl:call-template name="subfieldSelect">
217 <xsl:with-param name="codes">av</xsl:with-param>
222 <xsl:text> </xsl:text><xsl:call-template name="part"/>
223 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
226 <!-- 490 Series not traced, Ind1 = 0 -->
227 <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
228 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
229 <xsl:call-template name="chopPunctuation">
230 <xsl:with-param name="chopString">
231 <xsl:call-template name="subfieldSelect">
232 <xsl:with-param name="codes">av</xsl:with-param>
237 <xsl:call-template name="part"/>
238 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
240 <!-- 490 Series traced, Ind1 = 1 -->
241 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
242 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
244 <xsl:when test="marc:subfield[@code='w']">
245 <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
246 <xsl:call-template name="chopPunctuation">
247 <xsl:with-param name="chopString">
248 <xsl:call-template name="subfieldSelect">
249 <xsl:with-param name="codes">at</xsl:with-param>
256 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
257 <xsl:call-template name="chopPunctuation">
258 <xsl:with-param name="chopString">
259 <xsl:call-template name="subfieldSelect">
260 <xsl:with-param name="codes">at</xsl:with-param>
265 <xsl:call-template name="part"/>
268 <xsl:text>: </xsl:text>
269 <xsl:value-of select="marc:subfield[@code='v']" />
270 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
277 <xsl:if test="$leader7='s'">
278 <span class="results_summary"><span class="label">Analytics: </span>
281 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
282 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
285 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
288 <xsl:text>Show analytics</xsl:text>
293 <!-- Volumes of sets and traced series -->
294 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
295 <span class="results_summary"><span class="label">Volumes: </span>
298 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
299 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
302 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
305 <xsl:text>Show volumes</xsl:text>
311 <xsl:if test="$leader19='c'">
312 <span class="results_summary"><span class="label">Set: </span>
313 <xsl:for-each select="marc:datafield[@tag=773]">
316 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
317 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:subfield[@code='w']"/></xsl:attribute>
320 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
323 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
326 <xsl:when test="position()=last()"></xsl:when>
327 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
333 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
334 <xsl:if test="$display880">
335 <xsl:call-template name="m880Select">
336 <xsl:with-param name="basetags">260</xsl:with-param>
337 <xsl:with-param name="codes">abcg</xsl:with-param>
338 <xsl:with-param name="class">results_summary</xsl:with-param>
339 <xsl:with-param name="label">Publisher: </xsl:with-param>
343 <xsl:if test="marc:datafield[@tag=260]">
344 <span class="results_summary"><span class="label">Publisher: </span>
345 <xsl:for-each select="marc:datafield[@tag=260]">
346 <xsl:if test="marc:subfield[@code='b']">
347 <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
348 <xsl:call-template name="subfieldSelect">
349 <xsl:with-param name="codes">b</xsl:with-param>
353 <xsl:text> </xsl:text>
354 <xsl:call-template name="chopPunctuation">
355 <xsl:with-param name="chopString">
356 <xsl:call-template name="subfieldSelect">
357 <xsl:with-param name="codes">acg</xsl:with-param>
361 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
366 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
367 <xsl:if test="$display880">
368 <xsl:call-template name="m880Select">
369 <xsl:with-param name="basetags">250</xsl:with-param>
370 <xsl:with-param name="codes">ab</xsl:with-param>
371 <xsl:with-param name="class">results_summary</xsl:with-param>
372 <xsl:with-param name="label">Edition: </xsl:with-param>
376 <xsl:if test="marc:datafield[@tag=250]">
377 <span class="results_summary"><span class="label">Edition: </span>
378 <xsl:for-each select="marc:datafield[@tag=250]">
379 <xsl:call-template name="chopPunctuation">
380 <xsl:with-param name="chopString">
381 <xsl:call-template name="subfieldSelect">
382 <xsl:with-param name="codes">ab</xsl:with-param>
386 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
391 <!-- Description: Alternate Graphic Representation (MARC 880) -->
392 <xsl:if test="$display880">
393 <xsl:call-template name="m880Select">
394 <xsl:with-param name="basetags">300</xsl:with-param>
395 <xsl:with-param name="codes">abceg</xsl:with-param>
396 <xsl:with-param name="class">results_summary</xsl:with-param>
397 <xsl:with-param name="label">Description: </xsl:with-param>
401 <xsl:if test="marc:datafield[@tag=300]">
402 <span class="results_summary"><span class="label">Description: </span>
403 <xsl:for-each select="marc:datafield[@tag=300]">
404 <xsl:call-template name="chopPunctuation">
405 <xsl:with-param name="chopString">
406 <xsl:call-template name="subfieldSelect">
407 <xsl:with-param name="codes">abceg</xsl:with-param>
411 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
416 <xsl:if test="marc:datafield[@tag=020]">
417 <span class="results_summary"><span class="label">ISBN: </span>
418 <xsl:for-each select="marc:datafield[@tag=020]">
419 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
420 <xsl:value-of select="marc:subfield[@code='a']"/>
421 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
426 <xsl:if test="marc:datafield[@tag=022]">
427 <span class="results_summary"><span class="label">ISSN: </span>
428 <xsl:for-each select="marc:datafield[@tag=022]">
429 <xsl:value-of select="marc:subfield[@code='a']"/>
430 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
435 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
436 <xsl:if test="$display880">
437 <xsl:call-template name="m880Select">
438 <xsl:with-param name="basetags">246</xsl:with-param>
439 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
440 <xsl:with-param name="class">results_summary</xsl:with-param>
441 <xsl:with-param name="label">Other Title: </xsl:with-param>
445 <xsl:if test="marc:datafield[@tag=246]">
446 <span class="results_summary"><span class="label">Other Title: </span>
447 <xsl:for-each select="marc:datafield[@tag=246]">
448 <xsl:call-template name="chopPunctuation">
449 <xsl:with-param name="chopString">
450 <xsl:call-template name="subfieldSelect">
451 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
455 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
460 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
461 <xsl:if test="$display880">
462 <xsl:call-template name="m880Select">
463 <xsl:with-param name="basetags">130,240</xsl:with-param>
464 <xsl:with-param name="codes">adfklmor</xsl:with-param>
465 <xsl:with-param name="class">results_summary</xsl:with-param>
466 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
470 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
471 <span class="results_summary"><span class="label">Uniform titles: </span>
472 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
473 <xsl:variable name="str">
474 <xsl:for-each select="marc:subfield">
475 <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
476 <xsl:value-of select="text()"/>
477 <xsl:text> </xsl:text>
481 <xsl:call-template name="chopPunctuation">
482 <xsl:with-param name="chopString">
483 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
487 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
492 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
493 <span class="results_summary"><span class="label">Subject(s): </span>
494 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
497 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
498 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
500 <xsl:when test="$TraceSubjectSubdivisions='1'">
501 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
502 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
503 <xsl:with-param name="delimeter"> and </xsl:with-param>
504 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:{</xsl:with-param>
505 <xsl:with-param name="suffix">})</xsl:with-param>
510 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:{<xsl:value-of select="marc:subfield[@code='a']"/>}</xsl:attribute>
513 <xsl:call-template name="chopPunctuation">
514 <xsl:with-param name="chopString">
515 <xsl:call-template name="subfieldSelect">
516 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
517 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
518 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
524 <xsl:when test="position()=last()"></xsl:when>
525 <xsl:otherwise> | </xsl:otherwise>
532 <!-- Image processing code added here, takes precedence over text links including y3z text -->
533 <xsl:if test="marc:datafield[@tag=856]">
534 <span class="results_summary"><span class="label">Online Resources: </span>
535 <xsl:for-each select="marc:datafield[@tag=856]">
536 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
537 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
538 <xsl:if test="$OPACurlOpenInNewWindow='1'">
539 <xsl:attribute name="target">_blank</xsl:attribute>
542 <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
543 <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
545 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
546 <xsl:call-template name="subfieldSelect">
547 <xsl:with-param name="codes">y3z</xsl:with-param>
550 <xsl:when test="$urlLinkText!=''">
551 <xsl:value-of select="$urlLinkText"/>
554 <xsl:text>Click here to access online</xsl:text>
559 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
560 <xsl:otherwise> | </xsl:otherwise>
567 <xsl:if test="marc:datafield[@tag=530]">
568 <xsl:for-each select="marc:datafield[@tag=530]">
569 <span class="results_summary additionalforms">
570 <xsl:call-template name="subfieldSelect">
571 <xsl:with-param name="codes">abcd</xsl:with-param>
573 <xsl:for-each select="marc:subfield[@code='u']">
574 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
575 <xsl:if test="$OPACurlOpenInNewWindow='1'">
576 <xsl:attribute name="target">_blank</xsl:attribute>
578 <xsl:value-of select="text()"/>
586 <xsl:if test="marc:datafield[@tag=505]">
587 <xsl:for-each select="marc:datafield[@tag=505]">
588 <span class="results_summary contents">
590 <xsl:when test="@ind1=1">
591 <span class="label">Incomplete contents:</span>
593 <xsl:when test="@ind1=1">
594 <span class="label">Partial contents:</span>
597 <span class="label">Contents:</span>
601 <xsl:when test="@ind2=0">
602 <xsl:call-template name="subfieldSelect">
603 <xsl:with-param name="codes">tru</xsl:with-param>
607 <xsl:call-template name="subfieldSelect">
608 <xsl:with-param name="codes">au</xsl:with-param>
617 <xsl:if test="marc:datafield[@tag=583]">
618 <xsl:for-each select="marc:datafield[@tag=583]">
619 <xsl:if test="@ind1=1 or @ind1=' '">
620 <span class="results_summary actionnote">
622 <xsl:when test="marc:subfield[@code='z']">
623 <xsl:value-of select="marc:subfield[@code='z']"/>
626 <xsl:call-template name="subfieldSelect">
627 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
637 <xsl:if test="marc:datafield[@tag=586]">
638 <xsl:for-each select="marc:datafield[@tag=586]">
639 <span class="results_summary awardsnote">
640 <xsl:if test="@ind1=' '">
641 <span class="label">Awards: </span>
643 <xsl:value-of select="marc:subfield[@code='a']"/>
649 <xsl:if test="marc:datafield[@tag=773]">
650 <xsl:for-each select="marc:datafield[@tag=773]">
651 <xsl:if test="@ind1=0">
652 <span class="results_summary"><span class="label">
654 <xsl:when test="@ind2=' '">
657 <xsl:when test="@ind2=8">
658 <xsl:if test="marc:subfield[@code='i']">
659 <xsl:value-of select="marc:subfield[@code='i']"/>
664 <xsl:variable name="f773">
665 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
666 <xsl:with-param name="codes">at</xsl:with-param>
667 </xsl:call-template></xsl:with-param></xsl:call-template>
670 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
671 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
672 <xsl:value-of select="translate($f773, '()', '')"/>
674 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
677 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
678 <xsl:value-of select="$f773"/>
680 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
685 <xsl:if test="marc:subfield[@code='n']">
686 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
693 <xsl:for-each select="marc:datafield[@tag=520]">
694 <span class="results_summary"><span class="label">
696 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
697 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
698 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
699 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
700 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
701 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
704 <xsl:call-template name="subfieldSelect">
705 <xsl:with-param name="codes">abcu</xsl:with-param>
710 <!-- 866 holdings public note -->
711 <xsl:if test="marc:datafield[@tag=866]">
712 <span class="results_summary"><span class="label">Holdings Note: </span>
713 <xsl:for-each select="marc:datafield[@tag=866]">
714 <xsl:value-of select="marc:subfield[@code='z']"/>
715 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
720 <!-- 775 Other Edition -->
721 <xsl:if test="marc:datafield[@tag=775]">
722 <span class="results_summary"><span class="label">Other Editions: </span>
723 <xsl:for-each select="marc:datafield[@tag=775]">
724 <xsl:if test="marc:subfield[@code='i']">
725 <xsl:call-template name="subfieldSelect">
726 <xsl:with-param name="codes">i</xsl:with-param>
728 <xsl:text>: </xsl:text>
732 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
733 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:subfield[@code='w']"/></xsl:attribute>
736 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
739 <xsl:call-template name="subfieldSelect">
740 <xsl:with-param name="codes">t</xsl:with-param>
744 <xsl:when test="position()=last()"></xsl:when>
745 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
752 <xsl:if test="marc:datafield[@tag=780]">
753 <xsl:for-each select="marc:datafield[@tag=780]">
754 <xsl:if test="@ind1=0">
755 <span class="results_summary">
757 <xsl:when test="@ind2=0">
758 <span class="label">Continues:</span>
760 <xsl:when test="@ind2=1">
761 <span class="label">Continues in part:</span>
763 <xsl:when test="@ind2=2">
764 <span class="label">Supersedes:</span>
766 <xsl:when test="@ind2=3">
767 <span class="label">Supersedes in part:</span>
769 <xsl:when test="@ind2=4">
770 <span class="label">Formed by the union: ... and: ...</span>
772 <xsl:when test="@ind2=5">
773 <span class="label">Absorbed:</span>
775 <xsl:when test="@ind2=6">
776 <span class="label">Absorbed in part:</span>
778 <xsl:when test="@ind2=7">
779 <span class="label">Separated from:</span>
782 <xsl:variable name="f780">
783 <xsl:call-template name="subfieldSelect">
784 <xsl:with-param name="codes">at</xsl:with-param>
788 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
789 <a href="/cgi-bin/koha/opac-search.pl?q=Control-number:{marc:subfield[@code='w']}">
790 <xsl:value-of select="translate($f780, '()', '')"/>
794 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
795 <xsl:value-of select="translate($f780, '()', '')"/>
801 <xsl:if test="marc:subfield[@code='n']">
802 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
810 <xsl:if test="marc:datafield[@tag=785]">
811 <xsl:for-each select="marc:datafield[@tag=785]">
812 <xsl:if test="@ind1=0">
813 <span class="results_summary">
815 <xsl:when test="@ind2=0">
816 <span class="label">Continued by:</span>
818 <xsl:when test="@ind2=1">
819 <span class="label">Continued in part by:</span>
821 <xsl:when test="@ind2=2">
822 <span class="label">Superseded by:</span>
824 <xsl:when test="@ind2=3">
825 <span class="label">Superseded in part by:</span>
827 <xsl:when test="@ind2=4">
828 <span class="label">Absorbed by:</span>
830 <xsl:when test="@ind2=5">
831 <span class="label">Absorbed in part by:</span>
833 <xsl:when test="@ind2=6">
834 <span class="label">Split into .. and ...:</span>
836 <xsl:when test="@ind2=7">
837 <span class="label">Merged with ... to form ...</span>
839 <xsl:when test="@ind2=8">
840 <span class="label">Changed back to:</span>
844 <xsl:variable name="f785">
845 <xsl:call-template name="subfieldSelect">
846 <xsl:with-param name="codes">at</xsl:with-param>
851 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
852 <a href="/cgi-bin/koha/opac-search.pl?q=Control-number:{marc:subfield[@code='w']}">
853 <xsl:value-of select="translate($f785, '()', '')"/>
857 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
858 <xsl:value-of select="translate($f785, '()', '')"/>
865 <xsl:if test="marc:subfield[@code='n']">
866 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
875 <xsl:template name="nameABCDQ">
876 <xsl:call-template name="chopPunctuation">
877 <xsl:with-param name="chopString">
878 <xsl:call-template name="subfieldSelect">
879 <xsl:with-param name="codes">aq</xsl:with-param>
882 <xsl:with-param name="punctuation">
883 <xsl:text>:,;/ </xsl:text>
886 <xsl:call-template name="termsOfAddress"/>
889 <xsl:template name="nameABCDN">
890 <xsl:for-each select="marc:subfield[@code='a']">
891 <xsl:call-template name="chopPunctuation">
892 <xsl:with-param name="chopString" select="."/>
895 <xsl:for-each select="marc:subfield[@code='b']">
896 <xsl:value-of select="."/>
898 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
899 <xsl:call-template name="subfieldSelect">
900 <xsl:with-param name="codes">cdn</xsl:with-param>
905 <xsl:template name="nameACDEQ">
906 <xsl:call-template name="subfieldSelect">
907 <xsl:with-param name="codes">acdeq</xsl:with-param>
910 <xsl:template name="termsOfAddress">
911 <xsl:if test="marc:subfield[@code='b' or @code='c']">
912 <xsl:call-template name="chopPunctuation">
913 <xsl:with-param name="chopString">
914 <xsl:call-template name="subfieldSelect">
915 <xsl:with-param name="codes">bc</xsl:with-param>
922 <xsl:template name="part">
923 <xsl:variable name="partNumber">
924 <xsl:call-template name="specialSubfieldSelect">
925 <xsl:with-param name="axis">n</xsl:with-param>
926 <xsl:with-param name="anyCodes">n</xsl:with-param>
927 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
930 <xsl:variable name="partName">
931 <xsl:call-template name="specialSubfieldSelect">
932 <xsl:with-param name="axis">p</xsl:with-param>
933 <xsl:with-param name="anyCodes">p</xsl:with-param>
934 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
937 <xsl:if test="string-length(normalize-space($partNumber))">
938 <xsl:call-template name="chopPunctuation">
939 <xsl:with-param name="chopString" select="$partNumber"/>
942 <xsl:if test="string-length(normalize-space($partName))">
943 <xsl:call-template name="chopPunctuation">
944 <xsl:with-param name="chopString" select="$partName"/>
949 <xsl:template name="specialSubfieldSelect">
950 <xsl:param name="anyCodes"/>
951 <xsl:param name="axis"/>
952 <xsl:param name="beforeCodes"/>
953 <xsl:param name="afterCodes"/>
954 <xsl:variable name="str">
955 <xsl:for-each select="marc:subfield">
956 <xsl:if test="contains($anyCodes, @code) or (contains($beforeCodes,@code) and following-sibling::marc:subfield[@code=$axis]) or (contains($afterCodes,@code) and preceding-sibling::marc:subfield[@code=$axis])">
957 <xsl:value-of select="text()"/>
958 <xsl:text> </xsl:text>
962 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>