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 <!-- Indicate if record is suppressed in OPAC -->
94 <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
95 <span class="results_summary suppressed_opac"><xsl:value-of select="concat('#',marc:datafield[@tag=999]/marc:subfield[@code='c'])"/> - Suppressed in OPAC</span>
98 <!-- Title Statement -->
99 <!-- Alternate Graphic Representation (MARC 880) -->
100 <xsl:if test="$display880">
102 <xsl:call-template name="m880Select">
103 <xsl:with-param name="basetags">245</xsl:with-param>
104 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
110 <xsl:if test="marc:datafield[@tag=245]">
111 <h1 class="title" property="name">
112 <xsl:for-each select="marc:datafield[@tag=245]">
113 <xsl:call-template name="subfieldSelect">
114 <xsl:with-param name="codes">a</xsl:with-param>
116 <xsl:text> </xsl:text>
117 <!-- 13381 add additional subfields-->
118 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
120 <xsl:when test="@code='h'">
121 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
122 <span class="title_medium"><xsl:apply-templates/> </span>
124 <xsl:when test="@code='c'">
125 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
126 <span class="title_resp_stmt"><xsl:apply-templates/> </span>
129 <xsl:apply-templates/>
130 <xsl:text> </xsl:text>
138 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
139 <xsl:if test="$display880">
141 <xsl:call-template name="m880Select">
142 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
143 <xsl:with-param name="codes">abc</xsl:with-param>
144 <xsl:with-param name="index">au</xsl:with-param>
145 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
146 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
151 <!-- Author Statement -->
152 <xsl:call-template name="showAuthor">
153 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
154 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
157 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
158 <xsl:call-template name="showAuthor">
159 <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'])]"/>
160 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
163 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
164 <span class="results_summary type"><span class="label">Material type: </span>
165 <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>
166 <xsl:text> </xsl:text>
167 <xsl:value-of select="$materialTypeLabel"/>
172 <!--Series: Alternate Graphic Representation (MARC 880) -->
173 <xsl:if test="$display880">
174 <xsl:call-template name="m880Select">
175 <xsl:with-param name="basetags">440,490</xsl:with-param>
176 <xsl:with-param name="codes">av</xsl:with-param>
177 <xsl:with-param name="class">results_summary series</xsl:with-param>
178 <xsl:with-param name="label">Series: </xsl:with-param>
179 <xsl:with-param name="index">se</xsl:with-param>
184 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
185 <span class="results_summary series"><span class="label">Series: </span>
187 <xsl:for-each select="marc:datafield[@tag=440]">
188 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
189 <xsl:call-template name="chopPunctuation">
190 <xsl:with-param name="chopString">
191 <xsl:call-template name="subfieldSelect">
192 <xsl:with-param name="codes">av</xsl:with-param>
197 <xsl:call-template name="part"/>
198 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
201 <!-- 490 Series not traced, Ind1 = 0 -->
202 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
203 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
204 <xsl:call-template name="chopPunctuation">
205 <xsl:with-param name="chopString">
206 <xsl:call-template name="subfieldSelect">
207 <xsl:with-param name="codes">av</xsl:with-param>
212 <xsl:call-template name="part"/>
213 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
215 <!-- 490 Series traced, Ind1 = 1 -->
216 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
217 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
219 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
220 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
221 <xsl:call-template name="chopPunctuation">
222 <xsl:with-param name="chopString">
223 <xsl:call-template name="subfieldSelect">
224 <xsl:with-param name="codes">a_t</xsl:with-param>
231 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
232 <xsl:call-template name="chopPunctuation">
233 <xsl:with-param name="chopString">
234 <xsl:call-template name="subfieldSelect">
235 <xsl:with-param name="codes">a_t</xsl:with-param>
240 <xsl:call-template name="part"/>
243 <xsl:text>: </xsl:text>
244 <xsl:value-of select="marc:subfield[@code='v']" />
245 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
253 <xsl:if test="$leader7='s'">
254 <span class="results_summary analytics"><span class="label">Analytics: </span>
257 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
258 <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>
261 <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>
264 <xsl:text>Show analytics</xsl:text>
269 <!-- Volumes of sets and traced series -->
270 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
271 <span class="results_summary volumes"><span class="label">Volumes: </span>
274 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
275 <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>
278 <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>
281 <xsl:text>Show volumes</xsl:text>
287 <xsl:if test="$leader19='c'">
288 <span class="results_summary set"><span class="label">Set: </span>
289 <xsl:for-each select="marc:datafield[@tag=773]">
292 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
293 <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>
296 <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>
299 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
302 <xsl:when test="position()=last()"></xsl:when>
303 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
309 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
310 <xsl:if test="$display880">
311 <xsl:call-template name="m880Select">
312 <xsl:with-param name="basetags">260</xsl:with-param>
313 <xsl:with-param name="codes">abcg</xsl:with-param>
314 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
315 <xsl:with-param name="label">Publisher: </xsl:with-param>
319 <!-- Publisher info and RDA related info from tags 260, 264 -->
321 <xsl:when test="marc:datafield[@tag=264]">
322 <xsl:call-template name="showRDAtag264">
323 <xsl:with-param name="show_url">1</xsl:with-param>
326 <xsl:when test="marc:datafield[@tag=260]">
327 <span class="results_summary publisher"><span class="label">Publisher: </span>
328 <xsl:for-each select="marc:datafield[@tag=260]">
329 <xsl:if test="marc:subfield[@code='a']">
330 <xsl:call-template name="subfieldSelect">
331 <xsl:with-param name="codes">a</xsl:with-param>
334 <xsl:text> </xsl:text>
335 <xsl:if test="marc:subfield[@code='b']">
336 <a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{marc:subfield[@code='b']}">
337 <xsl:call-template name="subfieldSelect">
338 <xsl:with-param name="codes">b</xsl:with-param>
342 <xsl:text> </xsl:text>
343 <xsl:call-template name="chopPunctuation">
344 <xsl:with-param name="chopString">
345 <xsl:call-template name="subfieldSelect">
346 <xsl:with-param name="codes">cg</xsl:with-param>
350 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
356 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
357 <xsl:if test="$display880">
358 <xsl:call-template name="m880Select">
359 <xsl:with-param name="basetags">250</xsl:with-param>
360 <xsl:with-param name="codes">ab</xsl:with-param>
361 <xsl:with-param name="class">results_summary edition</xsl:with-param>
362 <xsl:with-param name="label">Edition: </xsl:with-param>
366 <xsl:if test="marc:datafield[@tag=250]">
367 <span class="results_summary edition"><span class="label">Edition: </span>
368 <xsl:for-each select="marc:datafield[@tag=250]">
369 <xsl:call-template name="chopPunctuation">
370 <xsl:with-param name="chopString">
371 <xsl:call-template name="subfieldSelect">
372 <xsl:with-param name="codes">ab</xsl:with-param>
376 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
381 <!-- Description: Alternate Graphic Representation (MARC 880) -->
382 <xsl:if test="$display880">
383 <xsl:call-template name="m880Select">
384 <xsl:with-param name="basetags">300</xsl:with-param>
385 <xsl:with-param name="codes">abceg</xsl:with-param>
386 <xsl:with-param name="class">results_summary description</xsl:with-param>
387 <xsl:with-param name="label">Description: </xsl:with-param>
391 <xsl:if test="marc:datafield[@tag=300]">
392 <span class="results_summary description"><span class="label">Description: </span>
393 <xsl:for-each select="marc:datafield[@tag=300]">
394 <xsl:call-template name="chopPunctuation">
395 <xsl:with-param name="chopString">
396 <xsl:call-template name="subfieldSelect">
397 <xsl:with-param name="codes">abceg</xsl:with-param>
401 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
406 <!-- Content Type -->
407 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
408 <span class="results_summary" id="content_type">
409 <xsl:if test="marc:datafield[@tag=336]">
410 <span class="label">Content type: </span>
411 <xsl:for-each select="marc:datafield[@tag=336]">
412 <xsl:call-template name="subfieldSelect">
413 <xsl:with-param name="codes">a</xsl:with-param>
414 <xsl:with-param name="delimeter">, </xsl:with-param>
416 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
419 <xsl:text> </xsl:text>
421 <xsl:if test="marc:datafield[@tag=337]">
422 <span class="label">Media type: </span>
423 <xsl:for-each select="marc:datafield[@tag=337]">
424 <xsl:call-template name="subfieldSelect">
425 <xsl:with-param name="codes">a</xsl:with-param>
426 <xsl:with-param name="delimeter">, </xsl:with-param>
428 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
431 <xsl:text> </xsl:text>
433 <xsl:if test="marc:datafield[@tag=338]">
434 <span class="label">Carrier type: </span>
435 <xsl:for-each select="marc:datafield[@tag=338]">
436 <xsl:call-template name="subfieldSelect">
437 <xsl:with-param name="codes">a</xsl:with-param>
438 <xsl:with-param name="delimeter">, </xsl:with-param>
440 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
448 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
449 <span class="results_summary isbn"><span class="label">ISBN: </span>
450 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
451 <span property="isbn">
452 <xsl:value-of select="."/>
454 <xsl:when test="position()=last()">
455 <xsl:text>.</xsl:text>
458 <xsl:text>; </xsl:text>
467 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
468 <span class="results_summary issn"><span class="label">ISSN: </span>
469 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
470 <span property="issn">
471 <xsl:value-of select="."/>
473 <xsl:when test="position()=last()">
474 <xsl:text>.</xsl:text>
477 <xsl:text>; </xsl:text>
485 <xsl:if test="marc:datafield[@tag=013]">
486 <span class="results_summary patent_info">
487 <span class="label">Patent information: </span>
488 <xsl:for-each select="marc:datafield[@tag=013]">
489 <xsl:call-template name="subfieldSelect">
490 <xsl:with-param name="codes">acdef</xsl:with-param>
491 <xsl:with-param name="delimeter">, </xsl:with-param>
493 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
498 <xsl:if test="marc:datafield[@tag=088]">
499 <span class="results_summary report_number">
500 <span class="label">Report number: </span>
501 <xsl:for-each select="marc:datafield[@tag=088]">
502 <xsl:call-template name="subfieldSelect">
503 <xsl:with-param name="codes">a</xsl:with-param>
505 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
510 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
511 <xsl:if test="$display880">
512 <xsl:call-template name="m880Select">
513 <xsl:with-param name="basetags">246</xsl:with-param>
514 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
515 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
516 <xsl:with-param name="label">Other title: </xsl:with-param>
520 <xsl:if test="marc:datafield[@tag=246]">
521 <span class="results_summary other_title"><span class="label">Other title: </span>
522 <xsl:for-each select="marc:datafield[@tag=246]">
523 <xsl:call-template name="chopPunctuation">
524 <xsl:with-param name="chopString">
525 <xsl:call-template name="subfieldSelect">
526 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
530 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
532 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
533 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
534 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
535 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
536 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
537 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
538 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
539 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
540 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
543 <xsl:if test="marc:subfield[@code='i']">
544 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
546 <!-- #13386 added separator | -->
547 <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>
552 <xsl:if test="marc:datafield[@tag=242]">
553 <span class="results_summary translated_title"><span class="label">Title translated: </span>
554 <xsl:for-each select="marc:datafield[@tag=242]">
555 <xsl:call-template name="chopPunctuation">
556 <xsl:with-param name="chopString">
557 <xsl:call-template name="subfieldSelect">
558 <xsl:with-param name="codes">abchnp</xsl:with-param>
562 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
567 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
568 <xsl:if test="$display880">
569 <xsl:call-template name="m880Select">
570 <xsl:with-param name="basetags">130,240</xsl:with-param>
571 <xsl:with-param name="codes">adfklmor</xsl:with-param>
572 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
573 <xsl:with-param name="label">Uniform title: </xsl:with-param>
577 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
578 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
579 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
580 <xsl:for-each select="marc:subfield">
581 <xsl:if test="contains('adfghklmnoprst',@code)">
582 <xsl:value-of select="text()"/>
583 <xsl:text> </xsl:text>
586 <xsl:if test="position() != last()">
587 <span class="separator"><xsl:text> | </xsl:text></span>
593 <!-- #13382 Added Related works 700$i -->
594 <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']]">
595 <span class="results_summary related_works"><span class="label">Related works: </span>
596 <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']]">
597 <xsl:variable name="str">
598 <xsl:call-template name="subfieldSelect">
599 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
602 <xsl:call-template name="chopPunctuation">
603 <xsl:with-param name="chopString">
604 <xsl:value-of select="$str"/>
607 <!-- add relator code too between brackets-->
608 <xsl:if test="marc:subfield[@code='4' or @code='e']">
609 <span class="relatorcode">
610 <xsl:text> [</xsl:text>
612 <xsl:when test="marc:subfield[@code='e']">
613 <xsl:for-each select="marc:subfield[@code='e']">
614 <xsl:value-of select="."/>
615 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
619 <xsl:for-each select="marc:subfield[@code='4']">
620 <xsl:value-of select="."/>
621 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
625 <xsl:text>]</xsl:text>
629 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
635 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
636 <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'])]">
637 <span class="results_summary contained_works"><span class="label">Contained works: </span>
638 <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'])]">
639 <xsl:variable name="str">
640 <xsl:call-template name="subfieldSelect">
641 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
644 <xsl:call-template name="chopPunctuation">
645 <xsl:with-param name="chopString">
646 <xsl:value-of select="$str"/>
649 <!-- add relator code too between brackets-->
650 <xsl:if test="marc:subfield[@code='4' or @code='e']">
651 <span class="relatorcode">
652 <xsl:text> [</xsl:text>
654 <xsl:when test="marc:subfield[@code='e']">
655 <xsl:for-each select="marc:subfield[@code='e']">
656 <xsl:value-of select="."/>
657 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
661 <xsl:for-each select="marc:subfield[@code='4']">
662 <xsl:value-of select="."/>
663 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
667 <xsl:text>]</xsl:text>
671 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
678 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
679 <span class="results_summary subjects"><span class="label">Subject(s): </span>
680 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
683 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
684 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
685 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
687 <xsl:when test="$TraceSubjectSubdivisions='1'">
688 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
689 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
690 <xsl:with-param name="delimeter"> AND </xsl:with-param>
691 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
692 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
696 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
698 <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>
701 <xsl:call-template name="chopPunctuation">
702 <xsl:with-param name="chopString">
703 <xsl:call-template name="subfieldSelect">
704 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
705 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
706 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
712 <xsl:when test="position()=last()"></xsl:when>
713 <xsl:otherwise> | </xsl:otherwise>
721 <xsl:if test="marc:datafield[@tag=655]">
722 <span class="results_summary genre"><span class="label">Genre/Form: </span>
723 <xsl:for-each select="marc:datafield[@tag=655]">
726 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
727 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
729 <xsl:when test="$TraceSubjectSubdivisions='1'">
730 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
731 <xsl:with-param name="codes">avxyz</xsl:with-param>
732 <xsl:with-param name="delimeter"> AND </xsl:with-param>
733 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
734 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
739 <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>
742 <xsl:call-template name="subfieldSelect">
743 <xsl:with-param name="codes">avxyz</xsl:with-param>
744 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
745 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
748 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
753 <!-- DDC classification -->
754 <xsl:if test="marc:datafield[@tag=082]">
755 <span class="results_summary ddc">
756 <span class="label">DDC classification: </span>
757 <xsl:for-each select="marc:datafield[@tag=082]">
758 <xsl:call-template name="subfieldSelect">
759 <xsl:with-param name="codes">a</xsl:with-param>
760 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
763 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
764 <xsl:otherwise> | </xsl:otherwise>
770 <xsl:if test="marc:datafield[@tag=856]">
771 <span class="results_summary online_resources"><span class="label">Online resources: </span>
772 <xsl:for-each select="marc:datafield[@tag=856]">
773 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
774 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
776 <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')">
777 <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>
779 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
780 <xsl:call-template name="subfieldSelect">
781 <xsl:with-param name="codes">y3z</xsl:with-param>
784 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
786 <xsl:when test="$URLLinkText!=''">
787 <xsl:value-of select="$URLLinkText"/>
790 <xsl:text>Click here to access online</xsl:text>
797 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
798 <xsl:otherwise> | </xsl:otherwise>
804 <xsl:if test="marc:datafield[@tag=505]">
805 <div class="results_summary contents">
807 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
808 <span class="label">Contents:</span>
810 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
811 <span class="label">Incomplete contents:</span>
813 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
814 <span class="label">Partial contents:</span>
817 <xsl:for-each select="marc:datafield[@tag=505]">
818 <div class='contentblock'>
820 <xsl:when test="@ind2=0">
821 <xsl:call-template name="subfieldSelectSpan">
822 <xsl:with-param name="codes">tru</xsl:with-param>
826 <xsl:call-template name="subfieldSelectSpan">
827 <xsl:with-param name="codes">atru</xsl:with-param>
837 <xsl:if test="marc:datafield[@tag=586]">
838 <span class="results_summary awardsnote">
839 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
840 <span class="label">Awards: </span>
842 <xsl:for-each select="marc:datafield[@tag=586]">
843 <xsl:value-of select="marc:subfield[@code='a']"/>
844 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
850 <xsl:if test="marc:datafield[@tag=508]">
851 <div class="results_summary prod_credits">
852 <span class="label">Production credits: </span>
853 <xsl:for-each select="marc:datafield[@tag=508]">
854 <xsl:call-template name="subfieldSelectSpan">
855 <xsl:with-param name="codes">a</xsl:with-param>
857 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
863 <xsl:if test="marc:datafield[@tag=773]">
864 <xsl:for-each select="marc:datafield[@tag=773]">
865 <xsl:if test="@ind1 !=1">
866 <span class="results_summary in"><span class="label">
868 <xsl:when test="@ind2=' '">
871 <xsl:when test="@ind2=8">
872 <xsl:if test="marc:subfield[@code='i']">
873 <xsl:value-of select="marc:subfield[@code='i']"/>
878 <xsl:variable name="f773">
879 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
880 <xsl:with-param name="codes">a_t</xsl:with-param>
881 </xsl:call-template></xsl:with-param></xsl:call-template>
884 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
885 <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>
886 <xsl:value-of select="translate($f773, '()', '')"/>
888 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
890 <xsl:when test="marc:subfield[@code='0']">
891 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
892 <xsl:value-of select="$f773"/>
896 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
897 <xsl:value-of select="$f773"/>
899 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
904 <xsl:if test="marc:subfield[@code='n']">
905 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
912 <xsl:if test="marc:datafield[@tag=502]">
913 <span class="results_summary diss_note">
914 <span class="label">Dissertation note: </span>
915 <xsl:for-each select="marc:datafield[@tag=502]">
916 <xsl:call-template name="subfieldSelect">
917 <xsl:with-param name="codes">abcdgo</xsl:with-param>
920 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
924 <!-- 866 textual holdings -->
925 <xsl:if test="marc:datafield[@tag=866]">
926 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
927 <xsl:for-each select="marc:datafield[@tag=866]">
928 <xsl:call-template name="subfieldSelect">
929 <xsl:with-param name="codes">axz</xsl:with-param>
931 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
936 <!-- 775 Other Edition -->
937 <xsl:if test="marc:datafield[@tag=775]">
938 <span class="results_summary other_editions"><span class="label">Other editions: </span>
939 <xsl:for-each select="marc:datafield[@tag=775]">
940 <xsl:variable name="f775">
941 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
942 <xsl:with-param name="codes">a_t</xsl:with-param>
943 </xsl:call-template></xsl:with-param></xsl:call-template>
945 <xsl:if test="marc:subfield[@code='i']">
946 <xsl:call-template name="subfieldSelect">
947 <xsl:with-param name="codes">i</xsl:with-param>
949 <xsl:text>: </xsl:text>
953 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
954 <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>
957 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
960 <xsl:call-template name="subfieldSelect">
961 <xsl:with-param name="codes">a_t</xsl:with-param>
965 <xsl:when test="position()=last()"></xsl:when>
966 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
973 <xsl:if test="marc:datafield[@tag=780]">
974 <xsl:for-each select="marc:datafield[@tag=780]">
975 <xsl:if test="@ind1=0">
976 <span class="results_summary preceeding_entry">
978 <xsl:when test="@ind2=0">
979 <span class="label">Continues:</span>
981 <xsl:when test="@ind2=1">
982 <span class="label">Continues in part:</span>
984 <xsl:when test="@ind2=2">
985 <span class="label">Supersedes:</span>
987 <xsl:when test="@ind2=3">
988 <span class="label">Supersedes in part:</span>
990 <xsl:when test="@ind2=4">
991 <span class="label">Formed by the union: ... and: ...</span>
993 <xsl:when test="@ind2=5">
994 <span class="label">Absorbed:</span>
996 <xsl:when test="@ind2=6">
997 <span class="label">Absorbed in part:</span>
999 <xsl:when test="@ind2=7">
1000 <span class="label">Separated from:</span>
1003 <xsl:text> </xsl:text>
1004 <xsl:variable name="f780">
1005 <xsl:call-template name="subfieldSelect">
1006 <xsl:with-param name="codes">a_t</xsl:with-param>
1007 </xsl:call-template>
1010 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1011 <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>
1012 <xsl:value-of select="translate($f780, '()', '')"/>
1016 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1017 <xsl:value-of select="translate($f780, '()', '')"/>
1023 <xsl:if test="marc:subfield[@code='n']">
1024 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1032 <xsl:if test="marc:datafield[@tag=785]">
1033 <xsl:for-each select="marc:datafield[@tag=785]">
1034 <span class="results_summary succeeding_entry">
1036 <xsl:when test="@ind2=0">
1037 <span class="label">Continued by:</span>
1039 <xsl:when test="@ind2=1">
1040 <span class="label">Continued in part by:</span>
1042 <xsl:when test="@ind2=2">
1043 <span class="label">Superseded by:</span>
1045 <xsl:when test="@ind2=3">
1046 <span class="label">Superseded in part by:</span>
1048 <xsl:when test="@ind2=4">
1049 <span class="label">Absorbed by:</span>
1051 <xsl:when test="@ind2=5">
1052 <span class="label">Absorbed in part by:</span>
1054 <xsl:when test="@ind2=6">
1055 <span class="label">Split into .. and ...:</span>
1057 <xsl:when test="@ind2=7">
1058 <span class="label">Merged with ... to form ...</span>
1060 <xsl:when test="@ind2=8">
1061 <span class="label">Changed back to:</span>
1064 <xsl:text> </xsl:text>
1065 <xsl:variable name="f785">
1066 <xsl:call-template name="subfieldSelect">
1067 <xsl:with-param name="codes">a_t</xsl:with-param>
1068 </xsl:call-template>
1072 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1073 <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>
1074 <xsl:value-of select="translate($f785, '()', '')"/>
1078 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1079 <xsl:value-of select="translate($f785, '()', '')"/>
1088 <xsl:if test="$OPACBaseURL!=''">
1089 <span class="results_summary"><span class="label">OPAC view: </span>
1090 <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>.
1096 <xsl:template name="nameABCQ">
1097 <xsl:call-template name="chopPunctuation">
1098 <xsl:with-param name="chopString">
1099 <xsl:call-template name="subfieldSelect">
1100 <xsl:with-param name="codes">abcq</xsl:with-param>
1101 </xsl:call-template>
1103 <xsl:with-param name="punctuation">
1104 <xsl:text>:,;/ </xsl:text>
1106 </xsl:call-template>
1109 <xsl:template name="nameABCDN">
1110 <xsl:call-template name="chopPunctuation">
1111 <xsl:with-param name="chopString">
1112 <xsl:call-template name="subfieldSelect">
1113 <xsl:with-param name="codes">abcdn</xsl:with-param>
1114 </xsl:call-template>
1116 <xsl:with-param name="punctuation">
1117 <xsl:text>:,;/ </xsl:text>
1119 </xsl:call-template>
1122 <xsl:template name="nameACDEQ">
1123 <xsl:call-template name="subfieldSelect">
1124 <xsl:with-param name="codes">acdeq</xsl:with-param>
1125 </xsl:call-template>
1128 <xsl:template name="part">
1129 <xsl:variable name="partNumber">
1130 <xsl:call-template name="specialSubfieldSelect">
1131 <xsl:with-param name="axis">n</xsl:with-param>
1132 <xsl:with-param name="anyCodes">n</xsl:with-param>
1133 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1134 </xsl:call-template>
1136 <xsl:variable name="partName">
1137 <xsl:call-template name="specialSubfieldSelect">
1138 <xsl:with-param name="axis">p</xsl:with-param>
1139 <xsl:with-param name="anyCodes">p</xsl:with-param>
1140 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1141 </xsl:call-template>
1143 <xsl:if test="string-length(normalize-space($partNumber))">
1144 <xsl:call-template name="chopPunctuation">
1145 <xsl:with-param name="chopString" select="$partNumber"/>
1146 </xsl:call-template>
1148 <xsl:if test="string-length(normalize-space($partName))">
1149 <xsl:call-template name="chopPunctuation">
1150 <xsl:with-param name="chopString" select="$partName"/>
1151 </xsl:call-template>
1155 <xsl:template name="specialSubfieldSelect">
1156 <xsl:param name="anyCodes"/>
1157 <xsl:param name="axis"/>
1158 <xsl:param name="beforeCodes"/>
1159 <xsl:param name="afterCodes"/>
1160 <xsl:variable name="str">
1161 <xsl:for-each select="marc:subfield">
1162 <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])">
1163 <xsl:value-of select="text()"/>
1164 <xsl:text> </xsl:text>
1168 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1171 <xsl:template name="showAuthor">
1172 <xsl:param name="authorfield"/>
1173 <xsl:param name="UseAuthoritiesForTracings"/>
1174 <xsl:if test="count($authorfield)>0">
1176 <xsl:for-each select="$authorfield">
1178 <xsl:when test="position()>1"/>
1180 <xsl:when test="@tag<700">By: </xsl:when>
1181 <!--#13382 Changed Additional author to contributor -->
1182 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1186 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1187 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1190 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1194 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1196 <xsl:call-template name="chopPunctuation">
1197 <xsl:with-param name="chopString">
1198 <xsl:call-template name="subfieldSelect">
1199 <xsl:with-param name="codes">
1201 <!-- #13383 include subfield e for field 111 -->
1202 <xsl:when test="@tag=111">abceqt</xsl:when>
1203 <xsl:otherwise>abcjqt</xsl:otherwise>
1206 </xsl:call-template>
1208 <xsl:with-param name="punctuation">
1209 <xsl:text>:,;/ </xsl:text>
1211 </xsl:call-template>
1213 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1214 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1215 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1216 <xsl:variable name="str">
1217 <xsl:call-template name="subfieldSelect">
1218 <xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param>
1219 </xsl:call-template>
1221 <xsl:call-template name="chopPunctuation">
1222 <xsl:with-param name="chopString">
1223 <xsl:value-of select="$str"/>
1225 <xsl:with-param name="punctuation">
1226 <xsl:text>:,;/. </xsl:text>
1228 </xsl:call-template>
1231 <xsl:if test="marc:subfield[@code='d']">
1232 <span class="authordates">
1233 <xsl:text> </xsl:text>
1234 <xsl:value-of select="marc:subfield[@code='d']"/>
1237 <!-- add relator code too between brackets-->
1238 <!-- #13383 include relator code j for field 111 -->
1239 <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'][. != ''])">
1240 <span class="relatorcode">
1241 <xsl:text> [</xsl:text>
1243 <xsl:when test="@tag=111">
1245 <!-- Prefer j over 4 -->
1246 <xsl:when test="marc:subfield[@code='j']">
1247 <xsl:for-each select="marc:subfield[@code='j']">
1248 <xsl:value-of select="."/>
1249 <xsl:if test="position() != last()">, </xsl:if>
1253 <xsl:for-each select="marc:subfield[@code=4]">
1254 <xsl:value-of select="."/>
1255 <xsl:if test="position() != last()">, </xsl:if>
1260 <!-- Prefer e over 4 -->
1261 <xsl:when test="marc:subfield[@code='e']">
1262 <xsl:for-each select="marc:subfield[@code='e']">
1263 <xsl:value-of select="."/>
1264 <xsl:if test="position() != last()">, </xsl:if>
1268 <xsl:for-each select="marc:subfield[@code=4]">
1269 <xsl:value-of select="."/>
1270 <xsl:if test="position() != last()">, </xsl:if>
1274 <xsl:text>]</xsl:text>
1279 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1287 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1288 <xsl:template name="subfieldSelectSubject">
1289 <xsl:param name="codes"/>
1290 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1291 <xsl:param name="subdivCodes"/>
1292 <xsl:param name="subdivDelimiter"/>
1293 <xsl:param name="prefix"/>
1294 <xsl:param name="suffix"/>
1295 <xsl:variable name="str">
1296 <xsl:for-each select="marc:subfield">
1297 <xsl:if test="contains($codes, @code)">
1298 <xsl:if test="contains($subdivCodes, @code)">
1299 <xsl:value-of select="$subdivDelimiter"/>
1301 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1305 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>