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='h']">
99 <xsl:text> </xsl:text>
100 <xsl:call-template name="subfieldSelect">
101 <xsl:with-param name="codes">h</xsl:with-param>
104 <xsl:if test="marc:subfield[@code='b']">
105 <xsl:text> </xsl:text>
106 <xsl:call-template name="subfieldSelect">
107 <xsl:with-param name="codes">b</xsl:with-param>
110 <xsl:text> </xsl:text>
111 <xsl:call-template name="subfieldSelect">
112 <xsl:with-param name="codes">fgknps</xsl:with-param>
115 <!-- dodano mglavica -->
116 <xsl:if test="marc:datafield[@tag=245]">
117 <xsl:for-each select="marc:datafield[@tag=245]">
118 <xsl:if test="marc:subfield[@code='c']">
119 <span style="font-weight: normal; color: #000000">
120 <xsl:call-template name="subfieldSelect">
121 <xsl:with-param name="codes">c</xsl:with-param>
125 <xsl:text> </xsl:text>
131 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
132 <xsl:if test="$display880">
134 <xsl:call-template name="m880Select">
135 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
136 <xsl:with-param name="codes">abc</xsl:with-param>
137 <xsl:with-param name="index">au</xsl:with-param>
138 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
144 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
145 <xsl:if test="$materialTypeCode!=''">
146 <span class="results_summary type"><span class="label">Type: </span>
147 <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>
148 <xsl:value-of select="$materialTypeLabel"/>
155 <!--Series: Alternate Graphic Representation (MARC 880) -->
156 <xsl:if test="$display880">
157 <xsl:call-template name="m880Select">
158 <xsl:with-param name="basetags">440,490</xsl:with-param>
159 <xsl:with-param name="codes">av</xsl:with-param>
160 <xsl:with-param name="class">results_summary series</xsl:with-param>
161 <xsl:with-param name="label">Series: </xsl:with-param>
162 <xsl:with-param name="index">se</xsl:with-param>
167 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
168 <span class="results_summary series"><span class="label">Series: </span>
170 <xsl:for-each select="marc:datafield[@tag=440]">
171 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
172 <xsl:call-template name="chopPunctuation">
173 <xsl:with-param name="chopString">
174 <xsl:call-template name="subfieldSelect">
175 <xsl:with-param name="codes">av</xsl:with-param>
180 <xsl:text> </xsl:text><xsl:call-template name="part"/>
181 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
184 <!-- 490 Series not traced, Ind1 = 0 -->
185 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
186 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
187 <xsl:call-template name="chopPunctuation">
188 <xsl:with-param name="chopString">
189 <xsl:call-template name="subfieldSelect">
190 <xsl:with-param name="codes">av</xsl:with-param>
195 <xsl:call-template name="part"/>
196 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
198 <!-- 490 Series traced, Ind1 = 1 -->
199 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
200 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
202 <xsl:when test="marc:subfield[@code='w']">
203 <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
204 <xsl:call-template name="chopPunctuation">
205 <xsl:with-param name="chopString">
206 <xsl:call-template name="subfieldSelect">
207 <xsl:with-param name="codes">a_t</xsl:with-param>
214 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
215 <xsl:call-template name="chopPunctuation">
216 <xsl:with-param name="chopString">
217 <xsl:call-template name="subfieldSelect">
218 <xsl:with-param name="codes">a_t</xsl:with-param>
223 <xsl:call-template name="part"/>
226 <xsl:text>: </xsl:text>
227 <xsl:value-of select="marc:subfield[@code='v']" />
228 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
235 <xsl:if test="$leader7='s'">
236 <span class="results_summary analytics"><span class="label">Analytics: </span>
239 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
240 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
243 <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>
246 <xsl:text>Show analytics</xsl:text>
251 <!-- Volumes of sets and traced series -->
252 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
253 <span class="results_summary volumes"><span class="label">Volumes: </span>
256 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
257 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
260 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
263 <xsl:text>Show volumes</xsl:text>
269 <xsl:if test="$leader19='c'">
270 <span class="results_summary set"><span class="label">Set: </span>
271 <xsl:for-each select="marc:datafield[@tag=773]">
274 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
275 <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>
278 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
281 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
284 <xsl:when test="position()=last()"></xsl:when>
285 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
291 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
292 <xsl:if test="$display880">
293 <xsl:call-template name="m880Select">
294 <xsl:with-param name="basetags">260</xsl:with-param>
295 <xsl:with-param name="codes">abcg</xsl:with-param>
296 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
297 <xsl:with-param name="label">Publisher: </xsl:with-param>
301 <xsl:if test="marc:datafield[@tag=260]">
302 <span class="results_summary publisher"><span class="label">Publisher: </span>
303 <xsl:for-each select="marc:datafield[@tag=260]">
304 <xsl:if test="marc:subfield[@code='a']">
305 <xsl:call-template name="subfieldSelect">
306 <xsl:with-param name="codes">a</xsl:with-param>
307 </xsl:call-template>
309 <xsl:if test="marc:subfield[@code='b']">
310 <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
311 <xsl:call-template name="subfieldSelect">
312 <xsl:with-param name="codes">b</xsl:with-param>
316 <xsl:text> </xsl:text>
317 <xsl:call-template name="chopPunctuation">
318 <xsl:with-param name="chopString">
319 <xsl:call-template name="subfieldSelect">
320 <xsl:with-param name="codes">cg</xsl:with-param>
324 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
329 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
330 <xsl:if test="$display880">
331 <xsl:call-template name="m880Select">
332 <xsl:with-param name="basetags">250</xsl:with-param>
333 <xsl:with-param name="codes">ab</xsl:with-param>
334 <xsl:with-param name="class">results_summary edition</xsl:with-param>
335 <xsl:with-param name="label">Edition: </xsl:with-param>
339 <xsl:if test="marc:datafield[@tag=250]">
340 <span class="results_summary edition"><span class="label">Edition: </span>
341 <xsl:for-each select="marc:datafield[@tag=250]">
342 <xsl:call-template name="chopPunctuation">
343 <xsl:with-param name="chopString">
344 <xsl:call-template name="subfieldSelect">
345 <xsl:with-param name="codes">ab</xsl:with-param>
349 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
354 <!-- Description: Alternate Graphic Representation (MARC 880) -->
355 <xsl:if test="$display880">
356 <xsl:call-template name="m880Select">
357 <xsl:with-param name="basetags">300</xsl:with-param>
358 <xsl:with-param name="codes">abceg</xsl:with-param>
359 <xsl:with-param name="class">results_summary description</xsl:with-param>
360 <xsl:with-param name="label">Description: </xsl:with-param>
364 <xsl:if test="marc:datafield[@tag=300]">
365 <span class="results_summary description"><span class="label">Description: </span>
366 <xsl:for-each select="marc:datafield[@tag=300]">
367 <xsl:call-template name="chopPunctuation">
368 <xsl:with-param name="chopString">
369 <xsl:call-template name="subfieldSelect">
370 <xsl:with-param name="codes">abceg</xsl:with-param>
374 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
379 <xsl:if test="marc:datafield[@tag=020]">
380 <span class="results_summary isbn"><span class="label">ISBN: </span>
381 <xsl:for-each select="marc:datafield[@tag=020]">
382 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
383 <xsl:value-of select="marc:subfield[@code='a']"/>
384 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
389 <xsl:if test="marc:datafield[@tag=022]">
390 <span class="results_summary issn"><span class="label">ISSN: </span>
391 <xsl:for-each select="marc:datafield[@tag=022]">
392 <xsl:value-of select="marc:subfield[@code='a']"/>
393 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
398 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
399 <xsl:if test="$display880">
400 <xsl:call-template name="m880Select">
401 <xsl:with-param name="basetags">246</xsl:with-param>
402 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
403 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
404 <xsl:with-param name="label">Other Title: </xsl:with-param>
408 <xsl:if test="marc:datafield[@tag=246]">
409 <span class="results_summary other_title"><span class="label">Other Title: </span>
410 <xsl:for-each select="marc:datafield[@tag=246]">
411 <xsl:call-template name="chopPunctuation">
412 <xsl:with-param name="chopString">
413 <xsl:call-template name="subfieldSelect">
414 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
418 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
423 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
424 <xsl:if test="$display880">
425 <xsl:call-template name="m880Select">
426 <xsl:with-param name="basetags">130,240</xsl:with-param>
427 <xsl:with-param name="codes">adfklmor</xsl:with-param>
428 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
429 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
433 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
434 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
435 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
436 <xsl:variable name="str">
437 <xsl:for-each select="marc:subfield">
438 <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'])))">
439 <xsl:value-of select="text()"/>
440 <xsl:text> </xsl:text>
444 <xsl:call-template name="chopPunctuation">
445 <xsl:with-param name="chopString">
446 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
450 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
455 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
456 <span class="results_summary subjects"><span class="label">Subject(s): </span>
457 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
460 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
461 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
463 <xsl:when test="$TraceSubjectSubdivisions='1'">
464 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
465 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
466 <xsl:with-param name="delimeter"> and </xsl:with-param>
467 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:{</xsl:with-param>
468 <xsl:with-param name="suffix">})</xsl:with-param>
473 <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>
476 <xsl:call-template name="chopPunctuation">
477 <xsl:with-param name="chopString">
478 <xsl:call-template name="subfieldSelect">
479 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
480 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
481 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
487 <xsl:when test="position()=last()"></xsl:when>
488 <xsl:otherwise> | </xsl:otherwise>
496 <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]">
497 <span class="results_summary"><span class="label">Responsiblity: </span>
498 <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
501 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
502 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
505 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
508 <xsl:call-template name="nameABCDQ"/></a>
510 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
513 <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
516 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
517 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
520 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
523 <xsl:call-template name="nameABCDN"/></a>
524 <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
527 <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
529 <xsl:when test="marc:subfield[@code='n']">
530 <xsl:text> </xsl:text>
531 <xsl:call-template name="subfieldSelect">
532 <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template>
533 <xsl:text> </xsl:text>
538 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
539 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
542 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
545 <xsl:call-template name="nameACDEQ"/></a>
546 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
554 <!-- Image processing code added here, takes precedence over text links including y3z text -->
555 <xsl:if test="marc:datafield[@tag=856]">
556 <span class="results_summary online_resources"><span class="label">Online Resources: </span>
557 <xsl:for-each select="marc:datafield[@tag=856]">
558 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
559 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
560 <xsl:if test="$OPACURLOpenInNewWindow='1'">
561 <xsl:attribute name="target">_blank</xsl:attribute>
564 <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')">
565 <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>
567 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
568 <xsl:call-template name="subfieldSelect">
569 <xsl:with-param name="codes">y3z</xsl:with-param>
572 <xsl:when test="$URLLinkText!=''">
573 <xsl:value-of select="$URLLinkText"/>
576 <xsl:text>Click here to access online</xsl:text>
581 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
582 <xsl:otherwise> | </xsl:otherwise>
589 <xsl:if test="marc:datafield[@tag=530]">
590 <xsl:for-each select="marc:datafield[@tag=530]">
591 <span class="results_summary additionalforms">
592 <xsl:call-template name="subfieldSelect">
593 <xsl:with-param name="codes">abcd</xsl:with-param>
595 <xsl:for-each select="marc:subfield[@code='u']">
596 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
597 <xsl:if test="$OPACURLOpenInNewWindow='1'">
598 <xsl:attribute name="target">_blank</xsl:attribute>
600 <xsl:value-of select="text()"/>
609 <xsl:if test="marc:datafield[@tag=505]">
610 <xsl:for-each select="marc:datafield[@tag=505]">
611 <span class="results_summary contents">
613 <xsl:when test="@ind1=1">
614 <span class="label">Incomplete contents:</span>
616 <xsl:when test="@ind1=1">
617 <span class="label">Partial contents:</span>
620 <span class="label">Contents:</span>
624 <xsl:when test="@ind2=0">
625 <xsl:call-template name="subfieldSelect">
626 <xsl:with-param name="codes">tru</xsl:with-param>
630 <xsl:call-template name="subfieldSelect">
631 <xsl:with-param name="codes">au</xsl:with-param>
641 <xsl:if test="marc:datafield[@tag=583]">
642 <xsl:for-each select="marc:datafield[@tag=583]">
643 <xsl:if test="@ind1=1 or @ind1=' '">
644 <span class="results_summary actionnote">
646 <xsl:when test="marc:subfield[@code='z']">
647 <xsl:value-of select="marc:subfield[@code='z']"/>
650 <xsl:call-template name="subfieldSelect">
651 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
661 <xsl:if test="marc:datafield[@tag=586]">
662 <xsl:for-each select="marc:datafield[@tag=586]">
663 <span class="results_summary awardsnote">
664 <xsl:if test="@ind1=' '">
665 <span class="label">Awards: </span>
667 <xsl:value-of select="marc:subfield[@code='a']"/>
673 <xsl:if test="marc:datafield[@tag=773]">
674 <xsl:for-each select="marc:datafield[@tag=773]">
675 <xsl:if test="@ind1=0">
676 <span class="results_summary in"><span class="label">
678 <xsl:when test="@ind2=' '">
681 <xsl:when test="@ind2=8">
682 <xsl:if test="marc:subfield[@code='i']">
683 <xsl:value-of select="marc:subfield[@code='i']"/>
688 <xsl:variable name="f773">
689 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
690 <xsl:with-param name="codes">a_t</xsl:with-param>
691 </xsl:call-template></xsl:with-param></xsl:call-template>
694 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
695 <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>
696 <xsl:value-of select="translate($f773, '()', '')"/>
698 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
700 <xsl:when test="marc:subfield[@code='0']">
701 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
702 <xsl:value-of select="$f773"/>
706 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
707 <xsl:value-of select="$f773"/>
709 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
714 <xsl:if test="marc:subfield[@code='n']">
715 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
722 <xsl:for-each select="marc:datafield[@tag=520]">
723 <span class="results_summary summary"><span class="label">
725 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
726 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
727 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
728 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
729 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
730 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
733 <xsl:call-template name="subfieldSelect">
734 <xsl:with-param name="codes">abcu</xsl:with-param>
739 <!-- 866 holdings public note -->
740 <xsl:if test="marc:datafield[@tag=866]">
741 <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
742 <xsl:for-each select="marc:datafield[@tag=866]">
743 <xsl:value-of select="marc:subfield[@code='z']"/>
744 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
749 <!-- 775 Other Edition -->
750 <xsl:if test="marc:datafield[@tag=775]">
751 <span class="results_summary other_editions"><span class="label">Other Editions: </span>
752 <xsl:for-each select="marc:datafield[@tag=775]">
753 <xsl:if test="marc:subfield[@code='i']">
754 <xsl:call-template name="subfieldSelect">
755 <xsl:with-param name="codes">i</xsl:with-param>
757 <xsl:text>: </xsl:text>
761 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
762 <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>
765 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
768 <xsl:call-template name="subfieldSelect">
769 <xsl:with-param name="codes">t</xsl:with-param>
773 <xsl:when test="position()=last()"></xsl:when>
774 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
781 <xsl:if test="marc:datafield[@tag=780]">
782 <xsl:for-each select="marc:datafield[@tag=780]">
783 <xsl:if test="@ind1=0">
784 <span class="results_summary preceeding_entry">
786 <xsl:when test="@ind2=0">
787 <span class="label">Continues:</span>
789 <xsl:when test="@ind2=1">
790 <span class="label">Continues in part:</span>
792 <xsl:when test="@ind2=2">
793 <span class="label">Supersedes:</span>
795 <xsl:when test="@ind2=3">
796 <span class="label">Supersedes in part:</span>
798 <xsl:when test="@ind2=4">
799 <span class="label">Formed by the union: ... and: ...</span>
801 <xsl:when test="@ind2=5">
802 <span class="label">Absorbed:</span>
804 <xsl:when test="@ind2=6">
805 <span class="label">Absorbed in part:</span>
807 <xsl:when test="@ind2=7">
808 <span class="label">Separated from:</span>
811 <xsl:variable name="f780">
812 <xsl:call-template name="subfieldSelect">
813 <xsl:with-param name="codes">a_t</xsl:with-param>
817 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
818 <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>
819 <xsl:value-of select="translate($f780, '()', '')"/>
823 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
824 <xsl:value-of select="translate($f780, '()', '')"/>
830 <xsl:if test="marc:subfield[@code='n']">
831 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
839 <xsl:if test="marc:datafield[@tag=785]">
840 <xsl:for-each select="marc:datafield[@tag=785]">
841 <xsl:if test="@ind1=0">
842 <span class="results_summary succeeding_entry">
844 <xsl:when test="@ind2=0">
845 <span class="label">Continued by:</span>
847 <xsl:when test="@ind2=1">
848 <span class="label">Continued in part by:</span>
850 <xsl:when test="@ind2=2">
851 <span class="label">Superseded by:</span>
853 <xsl:when test="@ind2=3">
854 <span class="label">Superseded in part by:</span>
856 <xsl:when test="@ind2=4">
857 <span class="label">Absorbed by:</span>
859 <xsl:when test="@ind2=5">
860 <span class="label">Absorbed in part by:</span>
862 <xsl:when test="@ind2=6">
863 <span class="label">Split into .. and ...:</span>
865 <xsl:when test="@ind2=7">
866 <span class="label">Merged with ... to form ...</span>
868 <xsl:when test="@ind2=8">
869 <span class="label">Changed back to:</span>
873 <xsl:variable name="f785">
874 <xsl:call-template name="subfieldSelect">
875 <xsl:with-param name="codes">a_t</xsl:with-param>
880 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
881 <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>
882 <xsl:value-of select="translate($f785, '()', '')"/>
886 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
887 <xsl:value-of select="translate($f785, '()', '')"/>
894 <xsl:if test="marc:subfield[@code='n']">
895 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
904 <xsl:template name="nameABCDQ">
905 <xsl:call-template name="chopPunctuation">
906 <xsl:with-param name="chopString">
907 <xsl:call-template name="subfieldSelect">
908 <xsl:with-param name="codes">aq</xsl:with-param>
911 <xsl:with-param name="punctuation">
912 <xsl:text>:,;/ </xsl:text>
915 <xsl:call-template name="termsOfAddress"/>
918 <xsl:template name="nameABCDN">
919 <xsl:for-each select="marc:subfield[@code='a']">
920 <xsl:call-template name="chopPunctuation">
921 <xsl:with-param name="chopString" select="."/>
924 <xsl:for-each select="marc:subfield[@code='b']">
925 <xsl:value-of select="."/>
927 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
928 <xsl:call-template name="subfieldSelect">
929 <xsl:with-param name="codes">cdn</xsl:with-param>
934 <xsl:template name="nameACDEQ">
935 <xsl:call-template name="subfieldSelect">
936 <xsl:with-param name="codes">acdeq</xsl:with-param>
939 <xsl:template name="termsOfAddress">
940 <xsl:if test="marc:subfield[@code='b' or @code='c']">
941 <xsl:call-template name="chopPunctuation">
942 <xsl:with-param name="chopString">
943 <xsl:call-template name="subfieldSelect">
944 <xsl:with-param name="codes">bc</xsl:with-param>
951 <xsl:template name="part">
952 <xsl:variable name="partNumber">
953 <xsl:call-template name="specialSubfieldSelect">
954 <xsl:with-param name="axis">n</xsl:with-param>
955 <xsl:with-param name="anyCodes">n</xsl:with-param>
956 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
959 <xsl:variable name="partName">
960 <xsl:call-template name="specialSubfieldSelect">
961 <xsl:with-param name="axis">p</xsl:with-param>
962 <xsl:with-param name="anyCodes">p</xsl:with-param>
963 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
966 <xsl:if test="string-length(normalize-space($partNumber))">
967 <xsl:call-template name="chopPunctuation">
968 <xsl:with-param name="chopString" select="$partNumber"/>
971 <xsl:if test="string-length(normalize-space($partName))">
972 <xsl:call-template name="chopPunctuation">
973 <xsl:with-param name="chopString" select="$partName"/>
978 <xsl:template name="specialSubfieldSelect">
979 <xsl:param name="anyCodes"/>
980 <xsl:param name="axis"/>
981 <xsl:param name="beforeCodes"/>
982 <xsl:param name="afterCodes"/>
983 <xsl:variable name="str">
984 <xsl:for-each select="marc:subfield">
985 <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])">
986 <xsl:value-of select="text()"/>
987 <xsl:text> </xsl:text>
991 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>