1 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
6 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
7 <xsl:stylesheet version="1.0"
8 xmlns:marc="http://www.loc.gov/MARC21/slim"
9 xmlns:items="http://www.koha-community.org/items"
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 exclude-result-prefixes="marc items">
12 <xsl:import href="MARC21slimUtils.xsl"/>
13 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
18 <xsl:template match="marc:record">
20 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
21 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
25 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
26 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
27 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
28 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
30 <xsl:variable name="TracingQuotesLeft">
32 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
33 <xsl:otherwise>"</xsl:otherwise>
36 <xsl:variable name="TracingQuotesRight">
38 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
39 <xsl:otherwise>"</xsl:otherwise>
42 <xsl:variable name="leader" select="marc:leader"/>
43 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
44 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
45 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
46 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
47 <xsl:variable name="materialTypeCode">
49 <xsl:when test="$leader19='a'">ST</xsl:when>
50 <xsl:when test="$leader6='a'">
52 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
53 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
54 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
57 <xsl:when test="$leader6='t'">BK</xsl:when>
58 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
59 <xsl:when test="$leader6='m'">CF</xsl:when>
60 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
61 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
62 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
63 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
66 <xsl:variable name="materialTypeLabel">
68 <xsl:when test="$leader19='a'">Set</xsl:when>
69 <xsl:when test="$leader6='a'">
71 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
72 <xsl:when test="$leader7='i' or $leader7='s'">
74 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
75 <xsl:otherwise>Series</xsl:otherwise>
78 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
81 <xsl:when test="$leader6='t'">Book</xsl:when>
82 <xsl:when test="$leader6='o'">Kit</xsl:when>
83 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
84 <xsl:when test="$leader6='m'">Computer file</xsl:when>
85 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
86 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
87 <xsl:when test="$leader6='j'">Music</xsl:when>
88 <xsl:when test="$leader6='i'">Sound</xsl:when>
89 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
93 <!-- Title Statement -->
94 <!-- Alternate Graphic Representation (MARC 880) -->
95 <xsl:if test="$display880">
97 <xsl:call-template name="m880Select">
98 <xsl:with-param name="basetags">245</xsl:with-param>
99 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
105 <xsl:if test="marc:datafield[@tag=245]">
106 <h1 class="title" property="name">
107 <xsl:for-each select="marc:datafield[@tag=245]">
108 <xsl:call-template name="subfieldSelect">
109 <xsl:with-param name="codes">a</xsl:with-param>
111 <xsl:text> </xsl:text>
112 <!-- 13381 add additional subfields-->
113 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
115 <xsl:when test="@code='h'">
116 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
117 <span class="title_medium"><xsl:apply-templates/> </span>
119 <xsl:when test="@code='c'">
120 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
121 <span class="title_resp_stmt"><xsl:apply-templates/> </span>
124 <xsl:apply-templates/>
125 <xsl:text> </xsl:text>
133 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
134 <xsl:if test="$display880">
136 <xsl:call-template name="m880Select">
137 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
138 <xsl:with-param name="codes">abc</xsl:with-param>
139 <xsl:with-param name="index">au</xsl:with-param>
140 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
141 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
146 <!-- Author Statement -->
147 <xsl:call-template name="showAuthor">
148 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
149 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
152 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
153 <xsl:call-template name="showAuthor">
154 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=700 or @tag=710 or @tag=711) and not(@ind2=2) and not(marc:subfield[@code='i'])]"/>
155 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
158 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
159 <span class="results_summary type"><span class="label">Material type: </span>
160 <xsl:element name="img"><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
161 <xsl:text> </xsl:text>
162 <xsl:value-of select="$materialTypeLabel"/>
167 <!--Series: Alternate Graphic Representation (MARC 880) -->
168 <xsl:if test="$display880">
169 <xsl:call-template name="m880Select">
170 <xsl:with-param name="basetags">440,490</xsl:with-param>
171 <xsl:with-param name="codes">av</xsl:with-param>
172 <xsl:with-param name="class">results_summary series</xsl:with-param>
173 <xsl:with-param name="label">Series: </xsl:with-param>
174 <xsl:with-param name="index">se</xsl:with-param>
179 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
180 <span class="results_summary series"><span class="label">Series: </span>
182 <xsl:for-each select="marc:datafield[@tag=440]">
183 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
184 <xsl:call-template name="chopPunctuation">
185 <xsl:with-param name="chopString">
186 <xsl:call-template name="subfieldSelect">
187 <xsl:with-param name="codes">av</xsl:with-param>
192 <xsl:call-template name="part"/>
193 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
196 <!-- 490 Series not traced, Ind1 = 0 -->
197 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
198 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
199 <xsl:call-template name="chopPunctuation">
200 <xsl:with-param name="chopString">
201 <xsl:call-template name="subfieldSelect">
202 <xsl:with-param name="codes">av</xsl:with-param>
207 <xsl:call-template name="part"/>
208 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
210 <!-- 490 Series traced, Ind1 = 1 -->
211 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
212 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
214 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
215 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
216 <xsl:call-template name="chopPunctuation">
217 <xsl:with-param name="chopString">
218 <xsl:call-template name="subfieldSelect">
219 <xsl:with-param name="codes">a_t</xsl:with-param>
226 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
227 <xsl:call-template name="chopPunctuation">
228 <xsl:with-param name="chopString">
229 <xsl:call-template name="subfieldSelect">
230 <xsl:with-param name="codes">a_t</xsl:with-param>
235 <xsl:call-template name="part"/>
238 <xsl:text>: </xsl:text>
239 <xsl:value-of select="marc:subfield[@code='v']" />
240 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
248 <xsl:if test="$leader7='s'">
249 <span class="results_summary analytics"><span class="label">Analytics: </span>
252 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
253 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
256 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
259 <xsl:text>Show analytics</xsl:text>
264 <!-- Volumes of sets and traced series -->
265 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
266 <span class="results_summary volumes"><span class="label">Volumes: </span>
269 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
270 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
273 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
276 <xsl:text>Show volumes</xsl:text>
282 <xsl:if test="$leader19='c'">
283 <span class="results_summary set"><span class="label">Set: </span>
284 <xsl:for-each select="marc:datafield[@tag=773]">
287 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
288 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
291 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
294 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
297 <xsl:when test="position()=last()"></xsl:when>
298 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
304 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
305 <xsl:if test="$display880">
306 <xsl:call-template name="m880Select">
307 <xsl:with-param name="basetags">260</xsl:with-param>
308 <xsl:with-param name="codes">abcg</xsl:with-param>
309 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
310 <xsl:with-param name="label">Publisher: </xsl:with-param>
314 <!-- Publisher info and RDA related info from tags 260, 264 -->
316 <xsl:when test="marc:datafield[@tag=260]">
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>
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>
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>
340 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
342 <xsl:if test="marc:datafield[@tag=264]">
343 <xsl:text>; </xsl:text>
344 <xsl:call-template name="showRDAtag264"/>
348 <xsl:when test="marc:datafield[@tag=264]">
349 <span class="results_summary">
350 <xsl:call-template name="showRDAtag264"/>
355 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
356 <xsl:if test="$display880">
357 <xsl:call-template name="m880Select">
358 <xsl:with-param name="basetags">250</xsl:with-param>
359 <xsl:with-param name="codes">ab</xsl:with-param>
360 <xsl:with-param name="class">results_summary edition</xsl:with-param>
361 <xsl:with-param name="label">Edition: </xsl:with-param>
365 <xsl:if test="marc:datafield[@tag=250]">
366 <span class="results_summary edition"><span class="label">Edition: </span>
367 <xsl:for-each select="marc:datafield[@tag=250]">
368 <xsl:call-template name="chopPunctuation">
369 <xsl:with-param name="chopString">
370 <xsl:call-template name="subfieldSelect">
371 <xsl:with-param name="codes">ab</xsl:with-param>
375 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
380 <!-- Description: Alternate Graphic Representation (MARC 880) -->
381 <xsl:if test="$display880">
382 <xsl:call-template name="m880Select">
383 <xsl:with-param name="basetags">300</xsl:with-param>
384 <xsl:with-param name="codes">abceg</xsl:with-param>
385 <xsl:with-param name="class">results_summary description</xsl:with-param>
386 <xsl:with-param name="label">Description: </xsl:with-param>
390 <xsl:if test="marc:datafield[@tag=300]">
391 <span class="results_summary description"><span class="label">Description: </span>
392 <xsl:for-each select="marc:datafield[@tag=300]">
393 <xsl:call-template name="chopPunctuation">
394 <xsl:with-param name="chopString">
395 <xsl:call-template name="subfieldSelect">
396 <xsl:with-param name="codes">abceg</xsl:with-param>
400 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
405 <!-- Content Type -->
406 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
407 <span class="results_summary" id="content_type">
408 <xsl:if test="marc:datafield[@tag=336]">
409 <span class="label">Content Type: </span>
410 <xsl:for-each select="marc:datafield[@tag=336]">
411 <xsl:call-template name="subfieldSelect">
412 <xsl:with-param name="codes">a</xsl:with-param>
413 <xsl:with-param name="delimeter">, </xsl:with-param>
415 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
418 <xsl:text> </xsl:text>
420 <xsl:if test="marc:datafield[@tag=337]">
421 <span class="label">Media Type: </span>
422 <xsl:for-each select="marc:datafield[@tag=337]">
423 <xsl:call-template name="subfieldSelect">
424 <xsl:with-param name="codes">a</xsl:with-param>
425 <xsl:with-param name="delimeter">, </xsl:with-param>
427 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
430 <xsl:text> </xsl:text>
432 <xsl:if test="marc:datafield[@tag=338]">
433 <span class="label">Carrier Type: </span>
434 <xsl:for-each select="marc:datafield[@tag=338]">
435 <xsl:call-template name="subfieldSelect">
436 <xsl:with-param name="codes">a</xsl:with-param>
437 <xsl:with-param name="delimeter">, </xsl:with-param>
439 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
447 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
448 <span class="results_summary isbn"><span class="label">ISBN: </span>
449 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
450 <span property="isbn">
451 <xsl:value-of select="."/>
453 <xsl:when test="position()=last()">
454 <xsl:text>.</xsl:text>
457 <xsl:text>; </xsl:text>
466 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
467 <span class="results_summary issn"><span class="label">ISSN: </span>
468 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
469 <span property="issn">
470 <xsl:value-of select="."/>
472 <xsl:when test="position()=last()">
473 <xsl:text>.</xsl:text>
476 <xsl:text>; </xsl:text>
484 <xsl:if test="marc:datafield[@tag=013]">
485 <span class="results_summary patent_info">
486 <span class="label">Patent information: </span>
487 <xsl:for-each select="marc:datafield[@tag=013]">
488 <xsl:call-template name="subfieldSelect">
489 <xsl:with-param name="codes">acdef</xsl:with-param>
490 <xsl:with-param name="delimeter">, </xsl:with-param>
492 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
497 <xsl:if test="marc:datafield[@tag=088]">
498 <span class="results_summary report_number">
499 <span class="label">Report number: </span>
500 <xsl:for-each select="marc:datafield[@tag=088]">
501 <xsl:call-template name="subfieldSelect">
502 <xsl:with-param name="codes">a</xsl:with-param>
504 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
509 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
510 <xsl:if test="$display880">
511 <xsl:call-template name="m880Select">
512 <xsl:with-param name="basetags">246</xsl:with-param>
513 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
514 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
515 <xsl:with-param name="label">Other title: </xsl:with-param>
519 <xsl:if test="marc:datafield[@tag=246]">
520 <span class="results_summary other_title"><span class="label">Other title: </span>
521 <xsl:for-each select="marc:datafield[@tag=246]">
522 <xsl:call-template name="chopPunctuation">
523 <xsl:with-param name="chopString">
524 <xsl:call-template name="subfieldSelect">
525 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
529 <!-- #13386 added separator | -->
530 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose>
535 <xsl:if test="marc:datafield[@tag=242]">
536 <span class="results_summary translated_title"><span class="label">Title translated: </span>
537 <xsl:for-each select="marc:datafield[@tag=242]">
538 <xsl:call-template name="chopPunctuation">
539 <xsl:with-param name="chopString">
540 <xsl:call-template name="subfieldSelect">
541 <xsl:with-param name="codes">abchnp</xsl:with-param>
545 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
550 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
551 <xsl:if test="$display880">
552 <xsl:call-template name="m880Select">
553 <xsl:with-param name="basetags">130,240</xsl:with-param>
554 <xsl:with-param name="codes">adfklmor</xsl:with-param>
555 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
556 <xsl:with-param name="label">Uniform title: </xsl:with-param>
560 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
561 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
562 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
563 <xsl:for-each select="marc:subfield">
564 <xsl:if test="contains('adfghklmnoprst',@code)">
565 <xsl:value-of select="text()"/>
566 <xsl:text> </xsl:text>
569 <xsl:if test="position() != last()">
570 <span class="separator"><xsl:text> | </xsl:text></span>
576 <!-- #13382 Added Related works 700$i -->
577 <xsl:if test="marc:datafield[@tag=700][marc:subfield[@code='i']] or marc:datafield[@tag=710][marc:subfield[@code='i']] or marc:datafield[@tag=711][marc:subfield[@code='i']]">
578 <span class="results_summary related_works"><span class="label">Related Works: </span>
579 <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='i']] | marc:datafield[@tag=710][marc:subfield[@code='i']] | marc:datafield[@tag=711][marc:subfield[@code='i']]">
580 <xsl:variable name="str">
581 <xsl:call-template name="subfieldSelect">
582 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
585 <xsl:call-template name="chopPunctuation">
586 <xsl:with-param name="chopString">
587 <xsl:value-of select="$str"/>
590 <!-- add relator code too between brackets-->
591 <xsl:if test="marc:subfield[@code='4' or @code='e']">
592 <span class="relatorcode">
593 <xsl:text> [</xsl:text>
595 <xsl:when test="marc:subfield[@code='e']">
596 <xsl:for-each select="marc:subfield[@code='e']">
597 <xsl:value-of select="."/>
598 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
602 <xsl:for-each select="marc:subfield[@code='4']">
603 <xsl:value-of select="."/>
604 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
608 <xsl:text>]</xsl:text>
612 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
618 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
619 <xsl:if test="marc:datafield[@tag=700][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=710][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=711][@ind2=2 and not(marc:subfield[@code='i'])]">
620 <span class="results_summary contained_works"><span class="label">Contained Works: </span>
621 <xsl:for-each select="marc:datafield[@tag=700][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=710][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=711][@ind2=2][not(marc:subfield[@code='i'])]">
622 <xsl:variable name="str">
623 <xsl:call-template name="subfieldSelect">
624 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
627 <xsl:call-template name="chopPunctuation">
628 <xsl:with-param name="chopString">
629 <xsl:value-of select="$str"/>
632 <!-- add relator code too between brackets-->
633 <xsl:if test="marc:subfield[@code='4' or @code='e']">
634 <span class="relatorcode">
635 <xsl:text> [</xsl:text>
637 <xsl:when test="marc:subfield[@code='e']">
638 <xsl:for-each select="marc:subfield[@code='e']">
639 <xsl:value-of select="."/>
640 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
644 <xsl:for-each select="marc:subfield[@code='4']">
645 <xsl:value-of select="."/>
646 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
650 <xsl:text>]</xsl:text>
654 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
661 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
662 <span class="results_summary subjects"><span class="label">Subject(s): </span>
663 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
666 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
667 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
668 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
670 <xsl:when test="$TraceSubjectSubdivisions='1'">
671 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
672 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
673 <xsl:with-param name="delimeter"> AND </xsl:with-param>
674 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
675 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
679 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
681 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="translate(marc:subfield[@code='a'],'()','')"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
684 <xsl:call-template name="chopPunctuation">
685 <xsl:with-param name="chopString">
686 <xsl:call-template name="subfieldSelect">
687 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
688 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
689 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
695 <xsl:when test="position()=last()"></xsl:when>
696 <xsl:otherwise> | </xsl:otherwise>
704 <xsl:if test="marc:datafield[@tag=655]">
705 <span class="results_summary genre"><span class="label">Genre/Form: </span>
706 <xsl:for-each select="marc:datafield[@tag=655]">
709 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
710 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
712 <xsl:when test="$TraceSubjectSubdivisions='1'">
713 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
714 <xsl:with-param name="codes">avxyz</xsl:with-param>
715 <xsl:with-param name="delimeter"> AND </xsl:with-param>
716 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
717 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
722 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
725 <xsl:call-template name="subfieldSelect">
726 <xsl:with-param name="codes">avxyz</xsl:with-param>
727 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
728 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
731 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
736 <!-- DDC classification -->
737 <xsl:if test="marc:datafield[@tag=082]">
738 <span class="results_summary ddc">
739 <span class="label">DDC classification: </span>
740 <xsl:for-each select="marc:datafield[@tag=082]">
741 <xsl:call-template name="subfieldSelect">
742 <xsl:with-param name="codes">a</xsl:with-param>
743 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
746 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
747 <xsl:otherwise> | </xsl:otherwise>
753 <xsl:if test="marc:datafield[@tag=856]">
754 <span class="results_summary online_resources"><span class="label">Online resources: </span>
755 <xsl:for-each select="marc:datafield[@tag=856]">
756 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
757 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
759 <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')">
760 <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>
762 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
763 <xsl:call-template name="subfieldSelect">
764 <xsl:with-param name="codes">y3z</xsl:with-param>
767 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
769 <xsl:when test="$URLLinkText!=''">
770 <xsl:value-of select="$URLLinkText"/>
773 <xsl:text>Click here to access online</xsl:text>
780 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
781 <xsl:otherwise> | </xsl:otherwise>
787 <xsl:if test="marc:datafield[@tag=505]">
788 <div class="results_summary contents">
790 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
791 <span class="label">Contents:</span>
793 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
794 <span class="label">Incomplete contents:</span>
796 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
797 <span class="label">Partial contents:</span>
800 <xsl:for-each select="marc:datafield[@tag=505]">
801 <div class='contentblock'>
803 <xsl:when test="@ind2=0">
804 <xsl:call-template name="subfieldSelectSpan">
805 <xsl:with-param name="codes">tru</xsl:with-param>
809 <xsl:call-template name="subfieldSelectSpan">
810 <xsl:with-param name="codes">atru</xsl:with-param>
820 <xsl:if test="marc:datafield[@tag=586]">
821 <span class="results_summary awardsnote">
822 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
823 <span class="label">Awards: </span>
825 <xsl:for-each select="marc:datafield[@tag=586]">
826 <xsl:value-of select="marc:subfield[@code='a']"/>
827 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
833 <xsl:if test="marc:datafield[@tag=508]">
834 <div class="results_summary prod_credits">
835 <span class="label">Production Credits: </span>
836 <xsl:for-each select="marc:datafield[@tag=508]">
837 <xsl:call-template name="subfieldSelectSpan">
838 <xsl:with-param name="codes">a</xsl:with-param>
845 <xsl:if test="marc:datafield[@tag=773]">
846 <xsl:for-each select="marc:datafield[@tag=773]">
847 <xsl:if test="@ind1 !=1">
848 <span class="results_summary in"><span class="label">
850 <xsl:when test="@ind2=' '">
853 <xsl:when test="@ind2=8">
854 <xsl:if test="marc:subfield[@code='i']">
855 <xsl:value-of select="marc:subfield[@code='i']"/>
860 <xsl:variable name="f773">
861 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
862 <xsl:with-param name="codes">a_t</xsl:with-param>
863 </xsl:call-template></xsl:with-param></xsl:call-template>
866 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
867 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
868 <xsl:value-of select="translate($f773, '()', '')"/>
870 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
872 <xsl:when test="marc:subfield[@code='0']">
873 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
874 <xsl:value-of select="$f773"/>
878 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
879 <xsl:value-of select="$f773"/>
881 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
886 <xsl:if test="marc:subfield[@code='n']">
887 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
894 <xsl:if test="marc:datafield[@tag=502]">
895 <span class="results_summary diss_note">
896 <span class="label">Dissertation note: </span>
897 <xsl:for-each select="marc:datafield[@tag=502]">
898 <xsl:call-template name="subfieldSelect">
899 <xsl:with-param name="codes">abcdgo</xsl:with-param>
902 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
906 <!-- 866 textual holdings -->
907 <xsl:if test="marc:datafield[@tag=866]">
908 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
909 <xsl:for-each select="marc:datafield[@tag=866]">
910 <xsl:call-template name="subfieldSelect">
911 <xsl:with-param name="codes">axz</xsl:with-param>
913 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
918 <!-- 775 Other Edition -->
919 <xsl:if test="marc:datafield[@tag=775]">
920 <span class="results_summary other_editions"><span class="label">Other editions: </span>
921 <xsl:for-each select="marc:datafield[@tag=775]">
922 <xsl:variable name="f775">
923 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
924 <xsl:with-param name="codes">a_t</xsl:with-param>
925 </xsl:call-template></xsl:with-param></xsl:call-template>
927 <xsl:if test="marc:subfield[@code='i']">
928 <xsl:call-template name="subfieldSelect">
929 <xsl:with-param name="codes">i</xsl:with-param>
931 <xsl:text>: </xsl:text>
935 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
936 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
939 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
942 <xsl:call-template name="subfieldSelect">
943 <xsl:with-param name="codes">a_t</xsl:with-param>
947 <xsl:when test="position()=last()"></xsl:when>
948 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
955 <xsl:if test="marc:datafield[@tag=780]">
956 <xsl:for-each select="marc:datafield[@tag=780]">
957 <xsl:if test="@ind1=0">
958 <span class="results_summary preceeding_entry">
960 <xsl:when test="@ind2=0">
961 <span class="label">Continues:</span>
963 <xsl:when test="@ind2=1">
964 <span class="label">Continues in part:</span>
966 <xsl:when test="@ind2=2">
967 <span class="label">Supersedes:</span>
969 <xsl:when test="@ind2=3">
970 <span class="label">Supersedes in part:</span>
972 <xsl:when test="@ind2=4">
973 <span class="label">Formed by the union: ... and: ...</span>
975 <xsl:when test="@ind2=5">
976 <span class="label">Absorbed:</span>
978 <xsl:when test="@ind2=6">
979 <span class="label">Absorbed in part:</span>
981 <xsl:when test="@ind2=7">
982 <span class="label">Separated from:</span>
985 <xsl:text> </xsl:text>
986 <xsl:variable name="f780">
987 <xsl:call-template name="subfieldSelect">
988 <xsl:with-param name="codes">a_t</xsl:with-param>
992 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
993 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
994 <xsl:value-of select="translate($f780, '()', '')"/>
998 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
999 <xsl:value-of select="translate($f780, '()', '')"/>
1005 <xsl:if test="marc:subfield[@code='n']">
1006 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1014 <xsl:if test="marc:datafield[@tag=785]">
1015 <xsl:for-each select="marc:datafield[@tag=785]">
1016 <span class="results_summary succeeding_entry">
1018 <xsl:when test="@ind2=0">
1019 <span class="label">Continued by:</span>
1021 <xsl:when test="@ind2=1">
1022 <span class="label">Continued in part by:</span>
1024 <xsl:when test="@ind2=2">
1025 <span class="label">Superseded by:</span>
1027 <xsl:when test="@ind2=3">
1028 <span class="label">Superseded in part by:</span>
1030 <xsl:when test="@ind2=4">
1031 <span class="label">Absorbed by:</span>
1033 <xsl:when test="@ind2=5">
1034 <span class="label">Absorbed in part by:</span>
1036 <xsl:when test="@ind2=6">
1037 <span class="label">Split into .. and ...:</span>
1039 <xsl:when test="@ind2=7">
1040 <span class="label">Merged with ... to form ...</span>
1042 <xsl:when test="@ind2=8">
1043 <span class="label">Changed back to:</span>
1046 <xsl:text> </xsl:text>
1047 <xsl:variable name="f785">
1048 <xsl:call-template name="subfieldSelect">
1049 <xsl:with-param name="codes">a_t</xsl:with-param>
1050 </xsl:call-template>
1054 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1055 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1056 <xsl:value-of select="translate($f785, '()', '')"/>
1060 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1061 <xsl:value-of select="translate($f785, '()', '')"/>
1070 <xsl:if test="$OPACBaseURL!=''">
1071 <span class="results_summary"><span class="label">OPAC view: </span>
1072 <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>.
1078 <xsl:template name="nameABCQ">
1079 <xsl:call-template name="chopPunctuation">
1080 <xsl:with-param name="chopString">
1081 <xsl:call-template name="subfieldSelect">
1082 <xsl:with-param name="codes">abcq</xsl:with-param>
1083 </xsl:call-template>
1085 <xsl:with-param name="punctuation">
1086 <xsl:text>:,;/ </xsl:text>
1088 </xsl:call-template>
1091 <xsl:template name="nameABCDN">
1092 <xsl:call-template name="chopPunctuation">
1093 <xsl:with-param name="chopString">
1094 <xsl:call-template name="subfieldSelect">
1095 <xsl:with-param name="codes">abcdn</xsl:with-param>
1096 </xsl:call-template>
1098 <xsl:with-param name="punctuation">
1099 <xsl:text>:,;/ </xsl:text>
1101 </xsl:call-template>
1104 <xsl:template name="nameACDEQ">
1105 <xsl:call-template name="subfieldSelect">
1106 <xsl:with-param name="codes">acdeq</xsl:with-param>
1107 </xsl:call-template>
1110 <xsl:template name="part">
1111 <xsl:variable name="partNumber">
1112 <xsl:call-template name="specialSubfieldSelect">
1113 <xsl:with-param name="axis">n</xsl:with-param>
1114 <xsl:with-param name="anyCodes">n</xsl:with-param>
1115 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1116 </xsl:call-template>
1118 <xsl:variable name="partName">
1119 <xsl:call-template name="specialSubfieldSelect">
1120 <xsl:with-param name="axis">p</xsl:with-param>
1121 <xsl:with-param name="anyCodes">p</xsl:with-param>
1122 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1123 </xsl:call-template>
1125 <xsl:if test="string-length(normalize-space($partNumber))">
1126 <xsl:call-template name="chopPunctuation">
1127 <xsl:with-param name="chopString" select="$partNumber"/>
1128 </xsl:call-template>
1130 <xsl:if test="string-length(normalize-space($partName))">
1131 <xsl:call-template name="chopPunctuation">
1132 <xsl:with-param name="chopString" select="$partName"/>
1133 </xsl:call-template>
1137 <xsl:template name="specialSubfieldSelect">
1138 <xsl:param name="anyCodes"/>
1139 <xsl:param name="axis"/>
1140 <xsl:param name="beforeCodes"/>
1141 <xsl:param name="afterCodes"/>
1142 <xsl:variable name="str">
1143 <xsl:for-each select="marc:subfield">
1144 <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])">
1145 <xsl:value-of select="text()"/>
1146 <xsl:text> </xsl:text>
1150 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1153 <xsl:template name="showAuthor">
1154 <xsl:param name="authorfield"/>
1155 <xsl:param name="UseAuthoritiesForTracings"/>
1156 <xsl:if test="count($authorfield)>0">
1158 <xsl:for-each select="$authorfield">
1160 <xsl:when test="position()>1"/>
1162 <xsl:when test="@tag<700">By: </xsl:when>
1163 <!--#13382 Changed Additional author to contributor -->
1164 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1168 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1169 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1172 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1176 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1178 <xsl:call-template name="chopPunctuation">
1179 <xsl:with-param name="chopString">
1180 <xsl:call-template name="subfieldSelect">
1181 <xsl:with-param name="codes">
1183 <!-- #13383 include subfield e for field 111 -->
1184 <xsl:when test="@tag=111">abcdeqt</xsl:when>
1185 <xsl:otherwise>abcdjqt</xsl:otherwise>
1188 </xsl:call-template>
1190 <xsl:with-param name="punctuation">
1191 <xsl:text>:,;/ </xsl:text>
1193 </xsl:call-template>
1195 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1196 <!--#13382 Added all relevant subfields 4, e, are handled separately -->
1197 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1198 <xsl:variable name="str">
1199 <xsl:call-template name="subfieldSelect">
1200 <xsl:with-param name="codes">abcdfghiklmnoprstux</xsl:with-param>
1201 </xsl:call-template>
1203 <xsl:call-template name="chopPunctuation">
1204 <xsl:with-param name="chopString">
1205 <xsl:value-of select="$str"/>
1207 <xsl:with-param name="punctuation">
1208 <xsl:text>:,;/. </xsl:text>
1210 </xsl:call-template>
1214 <!-- add relator code too between brackets-->
1215 <!-- #13383 include relator code j for field 111 -->
1216 <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1217 <span class="relatorcode">
1218 <xsl:text> [</xsl:text>
1220 <xsl:when test="@tag=111">
1222 <!-- Prefer j over 4 -->
1223 <xsl:when test="marc:subfield[@code='j']">
1224 <xsl:for-each select="marc:subfield[@code='j']">
1225 <xsl:value-of select="."/>
1226 <xsl:if test="position() != last()">, </xsl:if>
1230 <xsl:for-each select="marc:subfield[@code=4]">
1231 <xsl:value-of select="."/>
1232 <xsl:if test="position() != last()">, </xsl:if>
1237 <!-- Prefer e over 4 -->
1238 <xsl:when test="marc:subfield[@code='e']">
1239 <xsl:for-each select="marc:subfield[@code='e']">
1240 <xsl:value-of select="."/>
1241 <xsl:if test="position() != last()">, </xsl:if>
1245 <xsl:for-each select="marc:subfield[@code=4]">
1246 <xsl:value-of select="."/>
1247 <xsl:if test="position() != last()">, </xsl:if>
1251 <xsl:text>]</xsl:text>
1256 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1264 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1265 <xsl:template name="subfieldSelectSubject">
1266 <xsl:param name="codes"/>
1267 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1268 <xsl:param name="subdivCodes"/>
1269 <xsl:param name="subdivDelimiter"/>
1270 <xsl:param name="prefix"/>
1271 <xsl:param name="suffix"/>
1272 <xsl:variable name="str">
1273 <xsl:for-each select="marc:subfield">
1274 <xsl:if test="contains($codes, @code)">
1275 <xsl:if test="contains($subdivCodes, @code)">
1276 <xsl:value-of select="$subdivDelimiter"/>
1278 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1282 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>