1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
4 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <xsl:stylesheet version="1.0"
6 xmlns:marc="http://www.loc.gov/MARC21/slim"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:str="http://exslt.org/strings"
9 exclude-result-prefixes="marc str">
10 <xsl:import href="MARC21slimUtils.xsl"/>
11 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
13 <xsl:template match="/">
14 <xsl:apply-templates/>
17 <xsl:template match="marc:record">
19 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
20 <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="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
24 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
25 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
27 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
28 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
29 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
30 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
31 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
32 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
33 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
34 <xsl:variable name="TracingQuotesLeft">
36 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
37 <xsl:otherwise>"</xsl:otherwise>
40 <xsl:variable name="TracingQuotesRight">
42 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
43 <xsl:otherwise>"</xsl:otherwise>
46 <xsl:variable name="leader" select="marc:leader"/>
47 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
48 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
49 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
50 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
51 <xsl:variable name="materialTypeCode">
53 <xsl:when test="$leader19='a'">ST</xsl:when>
54 <xsl:when test="$leader6='a'">
56 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
57 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
58 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
61 <xsl:when test="$leader6='t'">BK</xsl:when>
62 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
63 <xsl:when test="$leader6='m'">CF</xsl:when>
64 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
65 <xsl:when test="$leader6='g'">VM</xsl:when>
66 <xsl:when test="$leader6='k'">PK</xsl:when>
67 <xsl:when test="$leader6='r'">OB</xsl:when>
68 <xsl:when test="$leader6='i'">MU</xsl:when>
69 <xsl:when test="$leader6='j'">MU</xsl:when>
70 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
73 <xsl:variable name="materialTypeLabel">
75 <xsl:when test="$leader19='a'">Set</xsl:when>
76 <xsl:when test="$leader6='a'">
78 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Text</xsl:when>
79 <xsl:when test="$leader7='i' or $leader7='s'">
81 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
82 <xsl:otherwise>Series</xsl:otherwise>
85 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
88 <xsl:when test="$leader6='t'">Text</xsl:when>
89 <xsl:when test="$leader6='o'">Kit</xsl:when>
90 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
91 <xsl:when test="$leader6='m'">Computer file</xsl:when>
92 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
93 <xsl:when test="$leader6='g'">Film</xsl:when>
94 <xsl:when test="$leader6='k'">Picture</xsl:when>
95 <xsl:when test="$leader6='r'">Object</xsl:when>
96 <xsl:when test="$leader6='j'">Music</xsl:when>
97 <xsl:when test="$leader6='i'">Sound</xsl:when>
98 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
102 <!-- Schema.org type -->
103 <xsl:variable name="schemaOrgType">
105 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
106 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
107 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
108 <xsl:otherwise>CreativeWork</xsl:otherwise>
112 <!-- Wrapper div for our schema.org object -->
113 <xsl:element name="div">
114 <xsl:attribute name="class"><xsl:value-of select="'record'" /></xsl:attribute>
115 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
116 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
117 <xsl:attribute name="resource">#record</xsl:attribute>
119 <!-- Title Statement -->
120 <!-- Alternate Graphic Representation (MARC 880) -->
121 <xsl:if test="$display880">
122 <h1 class="title" property="alternateName">
123 <xsl:call-template name="m880Select">
124 <xsl:with-param name="basetags">245</xsl:with-param>
125 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
131 <xsl:if test="marc:datafield[@tag=245]">
132 <h1 class="title" property="name">
133 <xsl:for-each select="marc:datafield[@tag=245]">
134 <xsl:call-template name="subfieldSelect">
135 <xsl:with-param name="codes">a</xsl:with-param>
137 <xsl:text> </xsl:text>
138 <!-- 13381 add additional subfields-->
139 <!-- bug17625 adding f and g subfields -->
140 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
142 <xsl:when test="@code='h'">
143 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
144 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
146 <xsl:when test="@code='c'">
147 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
148 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
151 <xsl:apply-templates/>
152 <xsl:text> </xsl:text>
161 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
162 <xsl:if test="$display880">
164 <xsl:call-template name="m880Select">
165 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
166 <xsl:with-param name="codes">abc</xsl:with-param>
167 <xsl:with-param name="index">au</xsl:with-param>
168 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
173 <!--#13382 Added Author Statement to separate Authors and Contributors -->
174 <xsl:call-template name="showAuthor">
175 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=100 or @tag=110 or @tag=111)]"/>
176 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
177 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
178 <xsl:with-param name="theme" select="$theme"/>
181 <xsl:call-template name="showAuthor">
182 <!-- #13382 suppress 700$i and 7xx/@ind2=2 -->
183 <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'])]"/>
184 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
185 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
186 <xsl:with-param name="theme" select="$theme"/>
189 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
190 <xsl:if test="$materialTypeCode!=''">
191 <span class="results_summary type"><span class="label">Material type: </span>
192 <xsl:element name="img">
193 <xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute>
194 <xsl:attribute name="alt"><xsl:value-of select="$materialTypeLabel"/></xsl:attribute>
195 <xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute>
197 <xsl:value-of select="$materialTypeLabel"/>
202 <xsl:call-template name="show-lang-041"/>
204 <!--Series: Alternate Graphic Representation (MARC 880) -->
205 <xsl:if test="$display880">
206 <xsl:call-template name="m880Select">
207 <xsl:with-param name="basetags">440,490</xsl:with-param>
208 <xsl:with-param name="codes">av</xsl:with-param>
209 <xsl:with-param name="class">results_summary series</xsl:with-param>
210 <xsl:with-param name="label">Series: </xsl:with-param>
211 <xsl:with-param name="index">se</xsl:with-param>
216 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
217 <span class="results_summary series"><span class="label">Series: </span>
219 <xsl:for-each select="marc:datafield[@tag=440]">
220 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
221 <xsl:call-template name="chopPunctuation">
222 <xsl:with-param name="chopString">
223 <xsl:call-template name="subfieldSelect">
224 <xsl:with-param name="codes">av</xsl:with-param>
229 <xsl:call-template name="part"/>
231 <xsl:when test="position()=last()">
232 <xsl:if test="../marc:datafield[@tag=490][@ind1!=1]">
233 <xsl:text>; </xsl:text>
236 <xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise>
240 <!-- 490 Series not traced, Ind1 = 0 -->
241 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
242 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
243 <xsl:call-template name="chopPunctuation">
244 <xsl:with-param name="chopString">
245 <xsl:call-template name="subfieldSelect">
246 <xsl:with-param name="codes">av</xsl:with-param>
251 <xsl:call-template name="part"/>
252 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
254 <!-- 490 Series traced, Ind1 = 1 -->
255 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
256 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811]">
258 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
259 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
260 <xsl:call-template name="chopPunctuation">
261 <xsl:with-param name="chopString">
262 <xsl:call-template name="subfieldSelect">
263 <xsl:with-param name="codes">a_t</xsl:with-param>
269 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
270 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
271 <xsl:call-template name="chopPunctuation">
272 <xsl:with-param name="chopString">
273 <xsl:call-template name="subfieldSelect">
274 <xsl:with-param name="codes">a_t</xsl:with-param>
281 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
282 <xsl:call-template name="chopPunctuation">
283 <xsl:with-param name="chopString">
284 <xsl:call-template name="subfieldSelect">
285 <xsl:with-param name="codes">a_t</xsl:with-param>
290 <xsl:call-template name="part"/>
293 <xsl:text>: </xsl:text>
294 <xsl:value-of select="marc:subfield[@code='v']" />
295 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
297 <xsl:for-each select="marc:datafield[@tag=830]">
299 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
300 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
301 <xsl:call-template name="chopPunctuation">
302 <xsl:with-param name="chopString">
303 <xsl:call-template name="subfieldSelect">
304 <xsl:with-param name="codes">a_t</xsl:with-param>
310 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
311 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
312 <xsl:call-template name="chopPunctuation">
313 <xsl:with-param name="chopString">
314 <xsl:call-template name="subfieldSelect">
315 <xsl:with-param name="codes">a_t</xsl:with-param>
322 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
323 <xsl:call-template name="chopPunctuation">
324 <xsl:with-param name="chopString">
325 <xsl:call-template name="subfieldSelect">
326 <xsl:with-param name="codes">a_t</xsl:with-param>
331 <xsl:call-template name="part"/>
334 <xsl:text>: </xsl:text>
335 <xsl:value-of select="marc:subfield[@code='v']" />
336 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
343 <xsl:if test="$leader7='s'">
344 <span class="results_summary analytics"><span class="label">Analytics: </span>
347 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
348 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
351 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
354 <xsl:text>Show analytics</xsl:text>
359 <!-- Volumes of sets and traced series -->
360 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
361 <span class="results_summary volumes"><span class="label">Volumes: </span>
364 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
365 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
368 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
371 <xsl:text>Show volumes</xsl:text>
377 <xsl:if test="$leader19='c'">
378 <span class="results_summary set"><span class="label">Set: </span>
379 <xsl:for-each select="marc:datafield[@tag=773]">
382 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
383 <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>
386 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
389 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
392 <xsl:when test="position()=last()"></xsl:when>
393 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
399 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
400 <xsl:if test="$display880">
401 <xsl:call-template name="m880Select">
402 <xsl:with-param name="basetags">260</xsl:with-param>
403 <xsl:with-param name="codes">abcg</xsl:with-param>
404 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
405 <xsl:with-param name="label">Publisher: </xsl:with-param>
409 <!-- Publisher info and RDA related info from tags 260, 264 -->
411 <xsl:when test="marc:datafield[@tag=264]">
412 <xsl:call-template name="showRDAtag264">
413 <xsl:with-param name="show_url">1</xsl:with-param>
416 <xsl:when test="marc:datafield[@tag=260]">
417 <span class="results_summary publisher"><span class="label">Publisher: </span>
418 <xsl:for-each select="marc:datafield[@tag=260]">
419 <span property="publisher" typeof="Organization">
420 <xsl:if test="marc:subfield[@code='a']">
421 <span property="location">
422 <xsl:call-template name="subfieldSelect">
423 <xsl:with-param name="codes">a</xsl:with-param>
427 <xsl:text> </xsl:text>
428 <xsl:if test="marc:subfield[@code='b']">
429 <span property="name"><a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/></xsl:attribute>
430 <xsl:call-template name="subfieldSelect">
431 <xsl:with-param name="codes">b</xsl:with-param>
436 <xsl:text> </xsl:text>
437 <xsl:if test="marc:subfield[@code='c' or @code='g']">
438 <span property="datePublished">
439 <xsl:call-template name="chopPunctuation">
440 <xsl:with-param name="chopString">
441 <xsl:call-template name="subfieldSelect">
442 <xsl:with-param name="codes">cg</xsl:with-param>
448 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
454 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
455 <xsl:if test="$display880">
456 <xsl:call-template name="m880Select">
457 <xsl:with-param name="basetags">250</xsl:with-param>
458 <xsl:with-param name="codes">ab</xsl:with-param>
459 <xsl:with-param name="class">results_summary edition</xsl:with-param>
460 <xsl:with-param name="label">Edition: </xsl:with-param>
464 <xsl:if test="marc:datafield[@tag=250]">
465 <span class="results_summary edition"><span class="label">Edition: </span>
466 <xsl:for-each select="marc:datafield[@tag=250]">
467 <span property="bookEdition">
468 <xsl:call-template name="chopPunctuation">
469 <xsl:with-param name="chopString">
470 <xsl:call-template name="subfieldSelect">
471 <xsl:with-param name="codes">ab</xsl:with-param>
476 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
481 <!-- Description: Alternate Graphic Representation (MARC 880) -->
482 <xsl:if test="$display880">
483 <xsl:call-template name="m880Select">
484 <xsl:with-param name="basetags">300</xsl:with-param>
485 <xsl:with-param name="codes">abceg</xsl:with-param>
486 <xsl:with-param name="class">results_summary description</xsl:with-param>
487 <xsl:with-param name="label">Description: </xsl:with-param>
491 <xsl:if test="marc:datafield[@tag=300]">
492 <span class="results_summary description"><span class="label">Description: </span>
493 <xsl:for-each select="marc:datafield[@tag=300]">
494 <span property="description">
495 <xsl:call-template name="chopPunctuation">
496 <xsl:with-param name="chopString">
497 <xsl:call-template name="subfieldSelect">
498 <xsl:with-param name="codes">abcefg</xsl:with-param>
503 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
509 <!-- Content Type -->
510 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
511 <span class="results_summary" id="content_type">
512 <xsl:if test="marc:datafield[@tag=336]">
513 <span class="label">Content type: </span>
514 <xsl:for-each select="marc:datafield[@tag=336]">
515 <xsl:call-template name="subfieldSelect">
516 <xsl:with-param name="codes">a</xsl:with-param>
517 <xsl:with-param name="delimeter">, </xsl:with-param>
519 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
522 <xsl:text> </xsl:text>
524 <xsl:if test="marc:datafield[@tag=337]">
525 <span class="label">Media type: </span>
526 <xsl:for-each select="marc:datafield[@tag=337]">
527 <xsl:call-template name="subfieldSelect">
528 <xsl:with-param name="codes">a</xsl:with-param>
529 <xsl:with-param name="delimeter">, </xsl:with-param>
531 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
534 <xsl:text> </xsl:text>
536 <xsl:if test="marc:datafield[@tag=338]">
537 <span class="label">Carrier type: </span>
538 <xsl:for-each select="marc:datafield[@tag=338]">
539 <xsl:call-template name="subfieldSelect">
540 <xsl:with-param name="codes">a</xsl:with-param>
541 <xsl:with-param name="delimeter">, </xsl:with-param>
543 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
551 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
552 <span class="results_summary isbn"><span class="label">ISBN: </span>
553 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
554 <span property="isbn">
555 <xsl:value-of select="."/>
556 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
563 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
564 <span class="results_summary issn"><span class="label">ISSN: </span>
565 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
566 <span property="issn">
567 <xsl:value-of select="."/>
568 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
574 <xsl:if test="marc:datafield[@tag=013]">
575 <span class="results_summary patent_info">
576 <span class="label">Patent information: </span>
577 <xsl:for-each select="marc:datafield[@tag=013]">
578 <xsl:call-template name="subfieldSelect">
579 <xsl:with-param name="codes">acdef</xsl:with-param>
580 <xsl:with-param name="delimeter">, </xsl:with-param>
582 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
587 <xsl:if test="marc:datafield[@tag=088]">
588 <span class="results_summary report_number">
589 <span class="label">Report number: </span>
590 <xsl:for-each select="marc:datafield[@tag=088]">
591 <xsl:call-template name="subfieldSelect">
592 <xsl:with-param name="codes">a</xsl:with-param>
594 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
599 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
600 <xsl:if test="$display880">
601 <xsl:call-template name="m880Select">
602 <xsl:with-param name="basetags">246</xsl:with-param>
603 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
604 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
605 <xsl:with-param name="label">Other title: </xsl:with-param>
609 <xsl:if test="marc:datafield[@tag=246]">
610 <span class="results_summary other_title"><span class="label">Other title: </span>
611 <xsl:for-each select="marc:datafield[@tag=246]">
612 <span property="alternateName">
613 <xsl:call-template name="chopPunctuation">
614 <xsl:with-param name="chopString">
615 <xsl:if test="marc:subfield[@code='i']">
616 <xsl:call-template name="subfieldSelect">
617 <xsl:with-param name="codes">i</xsl:with-param>
620 <xsl:text> </xsl:text>
621 <xsl:call-template name="subfieldSelect">
622 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
626 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
628 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
629 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
630 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
631 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
632 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
633 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
634 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
635 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
636 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
640 <!-- #13386 added separator | -->
641 <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>
647 <xsl:if test="marc:datafield[@tag=242]">
648 <span class="results_summary translated_title"><span class="label">Title translated: </span>
649 <xsl:for-each select="marc:datafield[@tag=242]">
650 <span property="alternateName">
651 <xsl:call-template name="chopPunctuation">
652 <xsl:with-param name="chopString">
653 <xsl:call-template name="subfieldSelect">
654 <xsl:with-param name="codes">abchnp</xsl:with-param>
659 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
664 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
665 <xsl:if test="$display880">
666 <span property="alternateName">
667 <xsl:call-template name="m880Select">
668 <xsl:with-param name="basetags">130,240</xsl:with-param>
669 <xsl:with-param name="codes">adfklmor</xsl:with-param>
670 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
671 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
676 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
677 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
678 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
679 <span property="alternateName">
680 <xsl:if test="marc:subfield[@code='i']">
681 <xsl:call-template name="subfieldSelect">
682 <xsl:with-param name="codes">i</xsl:with-param>
685 <xsl:text> </xsl:text>
686 <xsl:for-each select="marc:subfield">
687 <xsl:if test="contains('adfghklmnoprst',@code)">
688 <xsl:value-of select="text()"/>
689 <xsl:text> </xsl:text>
693 <xsl:if test="position() != last()">
694 <span class="separator"><xsl:text> | </xsl:text></span>
701 <!-- #13382 Added Related works 700$i -->
702 <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']]">
703 <span class="results_summary related_works"><span class="label">Related works: </span>
704 <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']]">
705 <xsl:variable name="str">
706 <xsl:call-template name="subfieldSelect">
707 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
710 <xsl:call-template name="chopPunctuation">
711 <xsl:with-param name="chopString">
712 <xsl:value-of select="$str"/>
715 <!-- add relator code too between brackets-->
716 <xsl:if test="marc:subfield[@code='4' or @code='e']">
717 <span class="relatorcode">
718 <xsl:text> [</xsl:text>
720 <xsl:when test="marc:subfield[@code='e']">
721 <xsl:for-each select="marc:subfield[@code='e']">
722 <xsl:value-of select="."/>
723 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
727 <xsl:for-each select="marc:subfield[@code='4']">
728 <xsl:value-of select="."/>
729 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
733 <xsl:text>]</xsl:text>
737 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
743 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
744 <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'])]">
745 <span class="results_summary contained_works"><span class="label">Contained works: </span>
746 <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'])]">
747 <xsl:variable name="str">
748 <xsl:call-template name="subfieldSelect">
749 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
752 <xsl:call-template name="chopPunctuation">
753 <xsl:with-param name="chopString">
754 <xsl:value-of select="$str"/>
757 <!-- add relator code too between brackets-->
758 <xsl:if test="marc:subfield[@code='4' or @code='e']">
759 <span class="relatorcode">
760 <xsl:text> [</xsl:text>
762 <xsl:when test="marc:subfield[@code='e']">
763 <xsl:for-each select="marc:subfield[@code='e']">
764 <xsl:value-of select="."/>
765 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
769 <xsl:for-each select="marc:subfield[@code='4']">
770 <xsl:value-of select="."/>
771 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
775 <xsl:text>]</xsl:text>
779 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
785 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
786 <span class="results_summary subjects"><span class="label">Subject(s): </span>
787 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
788 <span property="keywords">
790 <xsl:attribute name="class">subject</xsl:attribute>
792 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
793 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
795 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
796 <xsl:when test="$TraceSubjectSubdivisions='1'">
797 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
798 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
799 <xsl:with-param name="delimeter"> AND </xsl:with-param>
800 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
801 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
802 <xsl:with-param name="urlencode">1</xsl:with-param>
806 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
808 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'],'()',''), true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
811 <xsl:call-template name="chopPunctuation">
812 <xsl:with-param name="chopString">
813 <xsl:call-template name="subfieldSelect">
814 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
815 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
816 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
822 <xsl:if test="marc:subfield[@code=9]">
824 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
825 <xsl:element name="i">
826 <xsl:attribute name="class">fa fa-search</xsl:attribute>
831 <xsl:when test="position()=last()"></xsl:when>
832 <xsl:otherwise> | </xsl:otherwise>
840 <xsl:if test="marc:datafield[@tag=655]">
841 <span class="results_summary genre"><span class="label">Genre/Form: </span>
842 <xsl:for-each select="marc:datafield[@tag=655]">
845 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
846 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
848 <xsl:when test="$TraceSubjectSubdivisions='1'">
849 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
850 <xsl:with-param name="codes">avxyz</xsl:with-param>
851 <xsl:with-param name="delimeter"> AND </xsl:with-param>
852 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
853 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
854 <xsl:with-param name="urlencode">1</xsl:with-param>
859 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
862 <xsl:call-template name="subfieldSelect">
863 <xsl:with-param name="codes">avxyz</xsl:with-param>
864 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
865 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
868 <xsl:if test="marc:subfield[@code=9]">
869 <xsl:text> </xsl:text>
871 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
872 <xsl:element name="i">
873 <xsl:attribute name="class">fa fa-search</xsl:attribute>
877 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
882 <!-- MARC21 776 Additional Physical Form Entry -->
883 <xsl:if test="marc:datafield[@tag=776]">
884 <span class="results_summary add_physical_form">
885 <span class="label">Additional physical formats: </span>
886 <xsl:for-each select="marc:datafield[@tag=776]">
887 <xsl:variable name="linktext">
889 <xsl:when test="marc:subfield[@code='t']">
890 <xsl:value-of select="marc:subfield[@code='t']"/>
892 <xsl:when test="marc:subfield[@code='a']">
893 <xsl:value-of select="marc:subfield[@code='a']"/>
896 <xsl:text>No title</xsl:text>
900 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
901 <xsl:call-template name="subfieldSelect">
902 <xsl:with-param name="codes">i</xsl:with-param>
904 <xsl:text>: </xsl:text>
907 <xsl:when test="marc:subfield[@code='w']">
909 <xsl:attribute name="href">
910 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
911 <xsl:call-template name="extractControlNumber">
912 <xsl:with-param name="subfieldW">
913 <xsl:value-of select="marc:subfield[@code='w']"/>
917 <xsl:value-of select="$linktext"/>
921 <xsl:value-of select="$linktext"/>
924 <xsl:if test="position() != last()">
925 <xsl:text>; </xsl:text>
931 <!-- DDC classification -->
932 <xsl:if test="marc:datafield[@tag=082]">
933 <span class="results_summary ddc">
934 <span class="label">DDC classification: </span>
935 <xsl:for-each select="marc:datafield[@tag=082]">
936 <xsl:call-template name="subfieldSelect">
937 <xsl:with-param name="codes">a</xsl:with-param>
938 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
941 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
942 <xsl:otherwise> | </xsl:otherwise>
948 <!-- LOC classification -->
949 <xsl:if test="marc:datafield[@tag=050]">
950 <span class="results_summary loc">
951 <span class="label">LOC classification: </span>
952 <xsl:for-each select="marc:datafield[@tag=050]">
953 <xsl:call-template name="subfieldSelect">
954 <xsl:with-param name="codes">ab</xsl:with-param>
955 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
961 <!-- Other classification -->
962 <xsl:if test="marc:datafield[@tag=084]">
963 <span class="results_summary oc">
964 <span class="label">Other classification: </span>
965 <xsl:for-each select="marc:datafield[@tag=084]">
966 <xsl:call-template name="subfieldSelect">
967 <xsl:with-param name="codes">a</xsl:with-param>
968 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
971 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
972 <xsl:otherwise> | </xsl:otherwise>
979 <!-- Image processing code added here, takes precedence over text links including y3z text -->
980 <xsl:if test="marc:datafield[@tag=856]">
981 <span class="results_summary online_resources"><span class="label">Online resources: </span>
982 <xsl:for-each select="marc:datafield[@tag=856]">
983 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
986 <xsl:when test="$OPACTrackClicks='track'">
987 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
989 <xsl:when test="$OPACTrackClicks='anonymous'">
990 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
993 <xsl:attribute name="href">
994 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
996 <xsl:when test="@ind1=7">
997 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
999 <xsl:when test="@ind1=1">
1000 <xsl:text>ftp://</xsl:text>
1003 <xsl:text>http://</xsl:text>
1007 <xsl:value-of select="marc:subfield[@code='u']"/>
1011 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1012 <xsl:attribute name="target">_blank</xsl:attribute>
1015 <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')">
1016 <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="style">height:100px</xsl:attribute></xsl:element><xsl:text></xsl:text>
1018 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1019 <xsl:call-template name="subfieldSelect">
1020 <xsl:with-param name="codes">y3z</xsl:with-param>
1021 </xsl:call-template>
1023 <xsl:when test="$URLLinkText!=''">
1024 <xsl:value-of select="$URLLinkText"/>
1027 <xsl:text>Click here to access online</xsl:text>
1032 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1033 <xsl:otherwise> | </xsl:otherwise>
1040 <xsl:if test="marc:datafield[@tag=530]">
1041 <xsl:for-each select="marc:datafield[@tag=530]">
1042 <span class="results_summary additionalforms">
1043 <xsl:call-template name="subfieldSelect">
1044 <xsl:with-param name="codes">abcd</xsl:with-param>
1045 </xsl:call-template>
1046 <xsl:for-each select="marc:subfield[@code='u']">
1047 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1048 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1049 <xsl:attribute name="target">_blank</xsl:attribute>
1051 <xsl:value-of select="text()"/>
1059 <xsl:if test="marc:datafield[@tag=505]">
1060 <div class="results_summary contents">
1061 <xsl:for-each select="marc:datafield[@tag=505]">
1062 <xsl:if test="position()=1">
1064 <xsl:when test="@ind1=1">
1065 <span class="label">Incomplete contents:</span>
1067 <xsl:when test="@ind1=2">
1068 <span class="label">Partial contents:</span>
1071 <span class="label">Contents:</span>
1075 <div class='contentblock' property='description'>
1077 <xsl:when test="@ind2=0">
1078 <xsl:call-template name="subfieldSelectSpan">
1079 <xsl:with-param name="codes">tru</xsl:with-param>
1080 </xsl:call-template>
1083 <xsl:call-template name="subfieldSelectSpan">
1084 <xsl:with-param name="codes">atru</xsl:with-param>
1085 </xsl:call-template>
1094 <xsl:if test="marc:datafield[@tag=583 and not(@ind1=0)]">
1095 <span class="results_summary actionnote">
1096 <span class="label">Action note: </span>
1097 <xsl:for-each select="marc:datafield[@tag=583 and not(@ind1=0)]">
1099 <xsl:when test="marc:subfield[@code='z']">
1100 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1103 <xsl:call-template name="subfieldSelect">
1104 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1105 </xsl:call-template>
1108 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1114 <xsl:if test="marc:datafield[@tag=508]">
1115 <span class="results_summary prod_credits">
1116 <span class="label">Production credits: </span>
1117 <xsl:for-each select="marc:datafield[@tag=508]">
1118 <xsl:call-template name="subfieldSelectSpan">
1119 <xsl:with-param name="codes">a</xsl:with-param>
1120 </xsl:call-template>
1121 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1127 <xsl:if test="marc:datafield[@tag=586]">
1128 <span class="results_summary awardsnote">
1129 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1130 <span class="label">Awards: </span>
1132 <xsl:for-each select="marc:datafield[@tag=586]">
1133 <xsl:value-of select="marc:subfield[@code='a']"/>
1134 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1140 <xsl:if test="marc:datafield[@tag=773]">
1141 <xsl:for-each select="marc:datafield[@tag=773]">
1142 <xsl:if test="@ind1 !=1">
1143 <span class="results_summary in"><span class="label">
1145 <xsl:when test="@ind2=' '">
1148 <xsl:when test="@ind2=8">
1149 <xsl:if test="marc:subfield[@code='i']">
1150 <xsl:value-of select="marc:subfield[@code='i']"/>
1155 <xsl:variable name="f773">
1156 <xsl:call-template name="chopPunctuation">
1157 <xsl:with-param name="chopString">
1158 <xsl:call-template name="subfieldSelect">
1159 <xsl:with-param name="codes">a_t</xsl:with-param>
1160 </xsl:call-template>
1162 </xsl:call-template>
1165 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1166 <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>
1167 <xsl:value-of select="translate($f773, '()', '')"/>
1170 <xsl:when test="marc:subfield[@code='0']">
1171 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:subfield[@code='0'], true())"/></xsl:attribute>
1172 <xsl:value-of select="$f773"/>
1176 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
1177 <xsl:value-of select="$f773"/>
1181 <xsl:if test="marc:subfield[@code='g']">
1182 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1186 <xsl:if test="marc:subfield[@code='n']">
1187 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1194 <xsl:for-each select="marc:datafield[@tag=511]">
1195 <span class="results_summary perf_note">
1196 <span class="label">
1197 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1199 <xsl:call-template name="subfieldSelect">
1200 <xsl:with-param name="codes">a</xsl:with-param>
1201 </xsl:call-template>
1205 <xsl:if test="marc:datafield[@tag=502]">
1206 <span class="results_summary diss_note">
1207 <span class="label">Dissertation note: </span>
1208 <xsl:for-each select="marc:datafield[@tag=502]">
1209 <xsl:call-template name="subfieldSelect">
1210 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1211 </xsl:call-template>
1213 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1217 <xsl:for-each select="marc:datafield[@tag=520]">
1218 <span class="results_summary summary"><span class="label">
1220 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1221 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1222 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1223 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1224 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1225 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1228 <xsl:call-template name="subfieldSelect">
1229 <xsl:with-param name="codes">abcu</xsl:with-param>
1230 </xsl:call-template>
1234 <!-- 866 textual holdings -->
1235 <xsl:if test="marc:datafield[@tag=866]">
1236 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1237 <xsl:for-each select="marc:datafield[@tag=866]">
1238 <span class="holdings_note_data">
1239 <xsl:call-template name="subfieldSelect">
1240 <xsl:with-param name="codes">az</xsl:with-param>
1241 </xsl:call-template>
1242 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1248 <!-- 867 textual holdings -->
1249 <xsl:if test="marc:datafield[@tag=867]">
1250 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1251 <xsl:for-each select="marc:datafield[@tag=867]">
1252 <span class="holdings_note_data">
1253 <xsl:call-template name="subfieldSelect">
1254 <xsl:with-param name="codes">az</xsl:with-param>
1255 </xsl:call-template>
1256 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1262 <!-- 868 textual holdings -->
1263 <xsl:if test="marc:datafield[@tag=868]">
1264 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1265 <xsl:for-each select="marc:datafield[@tag=868]">
1266 <span class="holdings_note_data">
1267 <xsl:call-template name="subfieldSelect">
1268 <xsl:with-param name="codes">az</xsl:with-param>
1269 </xsl:call-template>
1270 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1276 <!-- 775 Other Edition -->
1277 <xsl:if test="marc:datafield[@tag=775]">
1278 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1279 <xsl:for-each select="marc:datafield[@tag=775]">
1280 <xsl:variable name="f775">
1281 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1282 <xsl:with-param name="codes">a_t</xsl:with-param>
1283 </xsl:call-template></xsl:with-param></xsl:call-template>
1285 <xsl:if test="marc:subfield[@code='i']">
1286 <xsl:call-template name="subfieldSelect">
1287 <xsl:with-param name="codes">i</xsl:with-param>
1288 </xsl:call-template>
1289 <xsl:text>: </xsl:text>
1293 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1294 <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>
1297 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f775, '()', ''), true())"/></xsl:attribute>
1300 <xsl:call-template name="subfieldSelect">
1301 <xsl:with-param name="codes">a_t</xsl:with-param>
1302 </xsl:call-template>
1305 <xsl:when test="position()=last()"></xsl:when>
1306 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1313 <xsl:if test="marc:datafield[@tag=780]">
1314 <xsl:for-each select="marc:datafield[@tag=780]">
1315 <xsl:if test="@ind1=0">
1316 <span class="results_summary preceeding_entry">
1318 <xsl:when test="@ind2=0">
1319 <span class="label">Continues:</span>
1321 <xsl:when test="@ind2=1">
1322 <span class="label">Continues in part:</span>
1324 <xsl:when test="@ind2=2">
1325 <span class="label">Supersedes:</span>
1327 <xsl:when test="@ind2=3">
1328 <span class="label">Supersedes in part:</span>
1330 <xsl:when test="@ind2=4">
1331 <span class="label">Formed by the union: ... and: ...</span>
1333 <xsl:when test="@ind2=5">
1334 <span class="label">Absorbed:</span>
1336 <xsl:when test="@ind2=6">
1337 <span class="label">Absorbed in part:</span>
1339 <xsl:when test="@ind2=7">
1340 <span class="label">Separated from:</span>
1343 <xsl:text> </xsl:text>
1344 <xsl:variable name="f780">
1345 <xsl:call-template name="subfieldSelect">
1346 <xsl:with-param name="codes">a_t</xsl:with-param>
1347 </xsl:call-template>
1350 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1351 <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>
1352 <xsl:value-of select="translate($f780, '()', '')"/>
1356 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
1357 <xsl:value-of select="translate($f780, '()', '')"/>
1363 <xsl:if test="marc:subfield[@code='n']">
1364 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1372 <xsl:if test="marc:datafield[@tag=785]">
1373 <xsl:for-each select="marc:datafield[@tag=785]">
1374 <xsl:if test="@ind1=0">
1375 <span class="results_summary succeeding_entry">
1377 <xsl:when test="@ind2=0">
1378 <span class="label">Continued by:</span>
1380 <xsl:when test="@ind2=1">
1381 <span class="label">Continued in part by:</span>
1383 <xsl:when test="@ind2=2">
1384 <span class="label">Superseded by:</span>
1386 <xsl:when test="@ind2=3">
1387 <span class="label">Superseded in part by:</span>
1389 <xsl:when test="@ind2=4">
1390 <span class="label">Absorbed by:</span>
1392 <xsl:when test="@ind2=5">
1393 <span class="label">Absorbed in part by:</span>
1395 <xsl:when test="@ind2=6">
1396 <span class="label">Split into .. and ...:</span>
1398 <xsl:when test="@ind2=7">
1399 <span class="label">Merged with ... to form ...</span>
1401 <xsl:when test="@ind2=8">
1402 <span class="label">Changed back to:</span>
1405 <xsl:text> </xsl:text>
1406 <xsl:variable name="f785">
1407 <xsl:call-template name="subfieldSelect">
1408 <xsl:with-param name="codes">a_t</xsl:with-param>
1409 </xsl:call-template>
1413 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1414 <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>
1415 <xsl:value-of select="translate($f785, '()', '')"/>
1419 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
1420 <xsl:value-of select="translate($f785, '()', '')"/>
1427 <xsl:if test="marc:subfield[@code='n']">
1428 <span class="results_summary succeeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1436 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
1437 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
1438 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
1439 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
1441 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
1442 <xsl:variable name="openurltext">
1444 <xsl:when test="$OpenURLText != ''">
1445 <xsl:value-of select="$OpenURLText" />
1448 <xsl:text>OpenURL</xsl:text>
1453 <span class="results_summary"><a>
1454 <xsl:attribute name="href">
1455 <xsl:value-of select="$OpenURLResolverURL" />
1457 <xsl:attribute name="title">
1458 <xsl:value-of select="$openurltext" />
1460 <xsl:attribute name="class">
1461 <xsl:text>OpenURL</xsl:text>
1463 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1464 <xsl:attribute name="target">
1465 <xsl:text>_blank</xsl:text>
1469 <xsl:when test="$OpenURLImageLocation != ''">
1471 <xsl:attribute name="src">
1472 <xsl:value-of select="$OpenURLImageLocation" />
1477 <xsl:value-of select="$openurltext" />
1482 <!-- End of OpenURL -->
1484 <xsl:variable name="OPACShowMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACShowMusicalInscripts']" />
1485 <xsl:variable name="OPACPlayMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACPlayMusicalInscripts']" />
1487 <xsl:if test="$OPACShowMusicalInscripts = 1 and marc:datafield[@tag=031]">
1488 <xsl:for-each select="marc:datafield[@tag=031]">
1490 <span class="results_summary musical_inscripts">
1491 <xsl:if test="marc:subfield[@code='u']">
1494 <xsl:attribute name="href">
1495 <xsl:value-of select="marc:subfield[@code='u']"/>
1497 <xsl:text>Audio file</xsl:text>
1501 <xsl:if test="marc:subfield[@code='2'] and marc:subfield[@code='2']/text() = 'pe' and marc:subfield[@code='g'] and marc:subfield[@code='n'] and marc:subfield[@code='o'] and marc:subfield[@code='p']">
1502 <div class="inscript" data-system="pae">
1503 <xsl:attribute name="data-clef">
1504 <xsl:value-of select="marc:subfield[@code='g']"/>
1506 <xsl:attribute name="data-keysig">
1507 <xsl:value-of select="marc:subfield[@code='n']"/>
1509 <xsl:attribute name="data-timesig">
1510 <xsl:value-of select="marc:subfield[@code='o']"/>
1512 <xsl:attribute name="data-notation">
1513 <xsl:value-of select="marc:subfield[@code='p']"/>
1516 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1517 <div class="audio_controls hide">
1518 <button class="btn play_btn">
1519 <i id="carticon" class="fa fa-play"></i>
1520 <xsl:text> Play this sample</xsl:text>
1527 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1528 <div class="results_summary">
1529 <span class="inscript_audio hide"></span>
1537 <xsl:template name="showAuthor">
1538 <xsl:param name="authorfield" />
1539 <xsl:param name="UseAuthoritiesForTracings" />
1540 <xsl:param name="materialTypeLabel" />
1541 <xsl:param name="theme" />
1542 <xsl:if test="count($authorfield)>0">
1544 <xsl:for-each select="$authorfield">
1546 <xsl:when test="position()>1"/>
1548 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1549 <!--#13382 Changed Additional author to contributor -->
1550 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1553 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1554 <xsl:when test="marc:subfield[@code='n']">
1555 <xsl:text> </xsl:text>
1556 <xsl:call-template name="subfieldSelect">
1557 <xsl:with-param name="codes">n</xsl:with-param>
1558 </xsl:call-template>
1559 <xsl:text> </xsl:text>
1564 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1565 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/>"</xsl:attribute>
1568 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
1571 <xsl:attribute name="class">contributors</xsl:attribute>
1572 <span resource="#record"><span>
1574 <xsl:when test="substring(@tag, 1, 1)='1'">
1576 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1577 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1580 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1583 <xsl:when test="substring(@tag, 2, 1)='0'">
1585 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1586 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1589 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1591 <span property="name">
1593 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1595 <xsl:call-template name="chopPunctuation">
1596 <xsl:with-param name="chopString">
1597 <xsl:call-template name="subfieldSelect">
1598 <xsl:with-param name="codes">
1600 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1601 <xsl:when test="@tag=111">aeq</xsl:when>
1602 <xsl:when test="@tag=110">ab</xsl:when>
1603 <xsl:otherwise>abcjq</xsl:otherwise>
1606 </xsl:call-template>
1608 <xsl:with-param name="punctuation">
1609 <xsl:text>:,;/ </xsl:text>
1611 </xsl:call-template>
1612 <!-- Display only name and title portion in 110 field -->
1613 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1614 <span class="titleportion">
1616 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1617 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1619 <xsl:call-template name="chopPunctuation">
1620 <xsl:with-param name="chopString">
1621 <xsl:call-template name="subfieldSelect">
1622 <xsl:with-param name="codes">cdnt</xsl:with-param>
1623 </xsl:call-template>
1625 </xsl:call-template>
1628 <!-- Display only name and title portion in 111 field -->
1629 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1630 <span class="titleportion">
1632 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1633 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1636 <xsl:call-template name="chopPunctuation">
1637 <xsl:with-param name="chopString">
1638 <xsl:call-template name="subfieldSelect">
1639 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1640 </xsl:call-template>
1642 </xsl:call-template>
1645 <!-- Display only dates in 100 field -->
1646 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1647 <span class="authordates">
1648 <xsl:text>, </xsl:text>
1649 <xsl:call-template name="chopPunctuation">
1650 <xsl:with-param name="chopString">
1651 <xsl:call-template name="subfieldSelect">
1652 <xsl:with-param name="codes">d</xsl:with-param>
1653 </xsl:call-template>
1655 </xsl:call-template>
1659 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1660 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1661 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1662 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1663 <xsl:if test="@tag=710 or @tag=711">
1664 <xsl:call-template name="chopPunctuation">
1665 <xsl:with-param name="chopString">
1666 <xsl:call-template name="subfieldSelect">
1667 <xsl:with-param name="codes">
1669 <xsl:when test="@tag=711">aeq</xsl:when>
1670 <xsl:otherwise>ab</xsl:otherwise>
1673 </xsl:call-template>
1675 <xsl:with-param name="punctuation">
1676 <xsl:text>:,;/ </xsl:text>
1678 </xsl:call-template>
1679 <!-- Display only name and title portion in 711 field -->
1680 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1681 <span class="titleportion">
1683 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1684 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1687 <xsl:call-template name="chopPunctuation">
1688 <xsl:with-param name="chopString">
1689 <xsl:call-template name="subfieldSelect">
1690 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1691 </xsl:call-template>
1693 </xsl:call-template>
1696 <!-- Display only name and title portion in 710 field -->
1697 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1698 <span class="titleportion">
1700 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1701 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1703 <xsl:call-template name="chopPunctuation">
1704 <xsl:with-param name="chopString">
1705 <xsl:call-template name="subfieldSelect">
1706 <xsl:with-param name="codes">cdnt</xsl:with-param>
1707 </xsl:call-template>
1709 </xsl:call-template>
1714 <!-- Display only name portion in 700 field -->
1715 <xsl:if test="@tag=700">
1716 <xsl:call-template name="chopPunctuation">
1717 <xsl:with-param name="chopString">
1718 <xsl:call-template name="subfieldSelect">
1719 <xsl:with-param name="codes">abcq</xsl:with-param>
1720 </xsl:call-template>
1722 </xsl:call-template>
1724 <!-- Display class "authordates" in 700 field -->
1725 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1726 <span class="authordates">
1727 <xsl:text>, </xsl:text>
1728 <xsl:call-template name="chopPunctuation">
1729 <xsl:with-param name="chopString">
1730 <xsl:call-template name="subfieldSelect">
1731 <xsl:with-param name="codes">d</xsl:with-param>
1732 </xsl:call-template>
1734 </xsl:call-template>
1737 <!-- Display class "titleportion" in 700 field -->
1738 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1739 <xsl:if test="@tag=700 and $titleportionfields">
1740 <span class="titleportion">
1741 <xsl:text>. </xsl:text>
1742 <xsl:call-template name="chopPunctuation">
1743 <xsl:with-param name="chopString">
1744 <xsl:call-template name="subfieldSelect">
1745 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1746 </xsl:call-template>
1748 </xsl:call-template>
1754 </span></span></span>
1756 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1757 <xsl:if test="(@tag!=111 and @tag!=711 and marc:subfield[@code='4' or @code='e']) or ((@tag=111 or @tag=711) and marc:subfield[@code='4' or @code='j'])">
1759 <span class="relatorcode">
1760 <xsl:text> [</xsl:text>
1762 <xsl:when test="@tag=111 or @tag=711">
1764 <!-- Prefer j over 4 for 111 and 711 -->
1765 <xsl:when test="marc:subfield[@code='j']">
1766 <xsl:for-each select="marc:subfield[@code='j']">
1767 <xsl:value-of select="."/>
1768 <xsl:if test="position() != last()">, </xsl:if>
1772 <xsl:for-each select="marc:subfield[@code=4]">
1773 <xsl:value-of select="."/>
1774 <xsl:if test="position() != last()">, </xsl:if>
1779 <!-- Prefer e over 4 on 100 and 110-->
1780 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1781 <xsl:for-each select="marc:subfield[@code='e']">
1782 <xsl:value-of select="."/>
1783 <xsl:if test="position() != last()">, </xsl:if>
1787 <xsl:for-each select="marc:subfield[@code=4]">
1788 <xsl:value-of select="."/>
1789 <xsl:if test="position() != last()">, </xsl:if>
1793 <xsl:text>]</xsl:text>
1797 <xsl:if test="marc:subfield[@code=9]">
1798 <a class='authlink'>
1799 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
1800 <xsl:element name="i">
1801 <xsl:attribute name="class">fa fa-search</xsl:attribute>
1806 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1813 <xsl:template name="nameABCQ">
1814 <xsl:call-template name="chopPunctuation">
1815 <xsl:with-param name="chopString">
1816 <xsl:call-template name="subfieldSelect">
1817 <xsl:with-param name="codes">abcq</xsl:with-param>
1818 </xsl:call-template>
1820 <xsl:with-param name="punctuation">
1821 <xsl:text>:,;/ </xsl:text>
1823 </xsl:call-template>
1826 <xsl:template name="nameABCDN">
1827 <xsl:call-template name="chopPunctuation">
1828 <xsl:with-param name="chopString">
1829 <xsl:call-template name="subfieldSelect">
1830 <xsl:with-param name="codes">abcdn</xsl:with-param>
1831 </xsl:call-template>
1833 <xsl:with-param name="punctuation">
1834 <xsl:text>:,;/ </xsl:text>
1836 </xsl:call-template>
1839 <xsl:template name="nameACDEQ">
1840 <xsl:call-template name="subfieldSelect">
1841 <xsl:with-param name="codes">acdeq</xsl:with-param>
1842 </xsl:call-template>
1845 <xsl:template name="part">
1846 <xsl:variable name="partNumber">
1847 <xsl:call-template name="specialSubfieldSelect">
1848 <xsl:with-param name="axis">n</xsl:with-param>
1849 <xsl:with-param name="anyCodes">n</xsl:with-param>
1850 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1851 </xsl:call-template>
1853 <xsl:variable name="partName">
1854 <xsl:call-template name="specialSubfieldSelect">
1855 <xsl:with-param name="axis">p</xsl:with-param>
1856 <xsl:with-param name="anyCodes">p</xsl:with-param>
1857 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1858 </xsl:call-template>
1860 <xsl:if test="string-length(normalize-space($partNumber))">
1861 <xsl:call-template name="chopPunctuation">
1862 <xsl:with-param name="chopString" select="$partNumber"/>
1863 </xsl:call-template>
1865 <xsl:if test="string-length(normalize-space($partName))">
1866 <xsl:call-template name="chopPunctuation">
1867 <xsl:with-param name="chopString" select="$partName"/>
1868 </xsl:call-template>
1872 <xsl:template name="specialSubfieldSelect">
1873 <xsl:param name="anyCodes"/>
1874 <xsl:param name="axis"/>
1875 <xsl:param name="beforeCodes"/>
1876 <xsl:param name="afterCodes"/>
1877 <xsl:variable name="str">
1878 <xsl:for-each select="marc:subfield">
1879 <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])">
1880 <xsl:value-of select="text()"/>
1881 <xsl:text> </xsl:text>
1885 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1888 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1889 <xsl:template name="subfieldSelectSubject">
1890 <xsl:param name="codes"/>
1891 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1892 <xsl:param name="subdivCodes"/>
1893 <xsl:param name="subdivDelimiter"/>
1894 <xsl:param name="prefix"/>
1895 <xsl:param name="suffix"/>
1896 <xsl:param name="urlencode"/>
1897 <xsl:variable name="str">
1898 <xsl:for-each select="marc:subfield">
1899 <xsl:if test="contains($codes, @code)">
1900 <xsl:if test="contains($subdivCodes, @code)">
1901 <xsl:value-of select="$subdivDelimiter"/>
1903 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1908 <xsl:when test="$urlencode=1">
1909 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1912 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>