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:items="http://www.koha-community.org/items"
8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns:str="http://exslt.org/strings"
10 exclude-result-prefixes="marc items str">
11 <xsl:import href="MARC21slimUtils.xsl"/>
12 <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])"/>
23 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
24 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
25 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
26 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
28 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
29 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
30 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
31 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
32 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
33 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
34 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
35 <xsl:variable name="TracingQuotesLeft">
37 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
38 <xsl:otherwise>"</xsl:otherwise>
41 <xsl:variable name="TracingQuotesRight">
43 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
44 <xsl:otherwise>"</xsl:otherwise>
47 <xsl:variable name="leader" select="marc:leader"/>
48 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
49 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
50 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
51 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
52 <xsl:variable name="materialTypeCode">
54 <xsl:when test="$leader19='a'">ST</xsl:when>
55 <xsl:when test="$leader6='a'">
57 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
58 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
59 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
62 <xsl:when test="$leader6='t'">BK</xsl:when>
63 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
64 <xsl:when test="$leader6='m'">CF</xsl:when>
65 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
66 <xsl:when test="$leader6='g'">VM</xsl:when>
67 <xsl:when test="$leader6='k'">PK</xsl:when>
68 <xsl:when test="$leader6='r'">OB</xsl:when>
69 <xsl:when test="$leader6='i'">MU</xsl:when>
70 <xsl:when test="$leader6='j'">MU</xsl:when>
71 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
74 <xsl:variable name="materialTypeLabel">
76 <xsl:when test="$leader19='a'">Set</xsl:when>
77 <xsl:when test="$leader6='a'">
79 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Text</xsl:when>
80 <xsl:when test="$leader7='i' or $leader7='s'">
82 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
83 <xsl:otherwise>Series</xsl:otherwise>
86 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
89 <xsl:when test="$leader6='t'">Text</xsl:when>
90 <xsl:when test="$leader6='o'">Kit</xsl:when>
91 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
92 <xsl:when test="$leader6='m'">Computer file</xsl:when>
93 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
94 <xsl:when test="$leader6='g'">Film</xsl:when>
95 <xsl:when test="$leader6='k'">Picture</xsl:when>
96 <xsl:when test="$leader6='r'">Object</xsl:when>
97 <xsl:when test="$leader6='j'">Music</xsl:when>
98 <xsl:when test="$leader6='i'">Sound</xsl:when>
99 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
103 <!-- Schema.org type -->
104 <xsl:variable name="schemaOrgType">
106 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
107 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
108 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
109 <xsl:otherwise>CreativeWork</xsl:otherwise>
113 <!-- Wrapper div for our schema.org object -->
114 <xsl:element name="div">
115 <xsl:attribute name="class"><xsl:value-of select="'record'" /></xsl:attribute>
116 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
117 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
118 <xsl:attribute name="resource">#record</xsl:attribute>
120 <!-- Title Statement -->
121 <!-- Alternate Graphic Representation (MARC 880) -->
122 <xsl:if test="$display880">
123 <h1 class="title" property="alternateName">
124 <xsl:call-template name="m880Select">
125 <xsl:with-param name="basetags">245</xsl:with-param>
126 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
132 <xsl:if test="marc:datafield[@tag=245]">
133 <h1 class="title" property="name">
134 <xsl:for-each select="marc:datafield[@tag=245]">
135 <xsl:call-template name="subfieldSelect">
136 <xsl:with-param name="codes">a</xsl:with-param>
138 <xsl:text> </xsl:text>
139 <!-- 13381 add additional subfields-->
140 <!-- bug17625 adding f and g subfields -->
141 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
143 <xsl:when test="@code='h'">
144 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
145 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
147 <xsl:when test="@code='c'">
148 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
149 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
152 <xsl:apply-templates/>
153 <xsl:text> </xsl:text>
162 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
163 <xsl:if test="$display880">
165 <xsl:call-template name="m880Select">
166 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
167 <xsl:with-param name="codes">abc</xsl:with-param>
168 <xsl:with-param name="index">au</xsl:with-param>
169 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
174 <!--#13382 Added Author Statement to separate Authors and Contributors -->
175 <xsl:call-template name="showAuthor">
176 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=100 or @tag=110 or @tag=111)]"/>
177 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
178 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
179 <xsl:with-param name="theme" select="$theme"/>
182 <xsl:call-template name="showAuthor">
183 <!-- #13382 suppress 700$i and 7xx/@ind2=2 -->
184 <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'])]"/>
185 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
186 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
187 <xsl:with-param name="theme" select="$theme"/>
190 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
191 <xsl:if test="$materialTypeCode!=''">
192 <span class="results_summary type"><span class="label">Material type: </span>
193 <xsl:element name="img">
194 <xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute>
195 <xsl:attribute name="alt"><xsl:value-of select="$materialTypeLabel"/></xsl:attribute>
196 <xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute>
198 <xsl:value-of select="$materialTypeLabel"/>
203 <!--Series: Alternate Graphic Representation (MARC 880) -->
204 <xsl:if test="$display880">
205 <xsl:call-template name="m880Select">
206 <xsl:with-param name="basetags">440,490</xsl:with-param>
207 <xsl:with-param name="codes">av</xsl:with-param>
208 <xsl:with-param name="class">results_summary series</xsl:with-param>
209 <xsl:with-param name="label">Series: </xsl:with-param>
210 <xsl:with-param name="index">se</xsl:with-param>
215 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
216 <span class="results_summary series"><span class="label">Series: </span>
218 <xsl:for-each select="marc:datafield[@tag=440]">
219 <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>
220 <xsl:call-template name="chopPunctuation">
221 <xsl:with-param name="chopString">
222 <xsl:call-template name="subfieldSelect">
223 <xsl:with-param name="codes">av</xsl:with-param>
228 <xsl:call-template name="part"/>
230 <xsl:when test="position()=last()">
231 <xsl:if test="../marc:datafield[@tag=490][@ind1!=1]">
232 <xsl:text>; </xsl:text>
235 <xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise>
239 <!-- 490 Series not traced, Ind1 = 0 -->
240 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
241 <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>
242 <xsl:call-template name="chopPunctuation">
243 <xsl:with-param name="chopString">
244 <xsl:call-template name="subfieldSelect">
245 <xsl:with-param name="codes">av</xsl:with-param>
250 <xsl:call-template name="part"/>
251 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
253 <!-- 490 Series traced, Ind1 = 1 -->
254 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
255 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811]">
257 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
258 <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>
259 <xsl:call-template name="chopPunctuation">
260 <xsl:with-param name="chopString">
261 <xsl:call-template name="subfieldSelect">
262 <xsl:with-param name="codes">a_t</xsl:with-param>
268 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
269 <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>
270 <xsl:call-template name="chopPunctuation">
271 <xsl:with-param name="chopString">
272 <xsl:call-template name="subfieldSelect">
273 <xsl:with-param name="codes">a_t</xsl:with-param>
280 <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>
281 <xsl:call-template name="chopPunctuation">
282 <xsl:with-param name="chopString">
283 <xsl:call-template name="subfieldSelect">
284 <xsl:with-param name="codes">a_t</xsl:with-param>
289 <xsl:call-template name="part"/>
292 <xsl:text>: </xsl:text>
293 <xsl:value-of select="marc:subfield[@code='v']" />
294 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
296 <xsl:for-each select="marc:datafield[@tag=830]">
298 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
299 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
300 <xsl:call-template name="chopPunctuation">
301 <xsl:with-param name="chopString">
302 <xsl:call-template name="subfieldSelect">
303 <xsl:with-param name="codes">a_t</xsl:with-param>
309 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
310 <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>
311 <xsl:call-template name="chopPunctuation">
312 <xsl:with-param name="chopString">
313 <xsl:call-template name="subfieldSelect">
314 <xsl:with-param name="codes">a_t</xsl:with-param>
321 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
322 <xsl:call-template name="chopPunctuation">
323 <xsl:with-param name="chopString">
324 <xsl:call-template name="subfieldSelect">
325 <xsl:with-param name="codes">a_t</xsl:with-param>
330 <xsl:call-template name="part"/>
333 <xsl:text>: </xsl:text>
334 <xsl:value-of select="marc:subfield[@code='v']" />
335 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
342 <xsl:if test="$leader7='s'">
343 <span class="results_summary analytics"><span class="label">Analytics: </span>
346 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
347 <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>
350 <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>
353 <xsl:text>Show analytics</xsl:text>
358 <!-- Volumes of sets and traced series -->
359 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
360 <span class="results_summary volumes"><span class="label">Volumes: </span>
363 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
364 <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>
367 <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>
370 <xsl:text>Show volumes</xsl:text>
376 <xsl:if test="$leader19='c'">
377 <span class="results_summary set"><span class="label">Set: </span>
378 <xsl:for-each select="marc:datafield[@tag=773]">
381 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
382 <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>
385 <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>
388 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
391 <xsl:when test="position()=last()"></xsl:when>
392 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
398 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
399 <xsl:if test="$display880">
400 <xsl:call-template name="m880Select">
401 <xsl:with-param name="basetags">260</xsl:with-param>
402 <xsl:with-param name="codes">abcg</xsl:with-param>
403 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
404 <xsl:with-param name="label">Publisher: </xsl:with-param>
408 <!-- Publisher info and RDA related info from tags 260, 264 -->
410 <xsl:when test="marc:datafield[@tag=264]">
411 <xsl:call-template name="showRDAtag264">
412 <xsl:with-param name="show_url">1</xsl:with-param>
415 <xsl:when test="marc:datafield[@tag=260]">
416 <span class="results_summary publisher"><span class="label">Publisher: </span>
417 <xsl:for-each select="marc:datafield[@tag=260]">
418 <span property="publisher" typeof="Organization">
419 <xsl:if test="marc:subfield[@code='a']">
420 <span property="location">
421 <xsl:call-template name="subfieldSelect">
422 <xsl:with-param name="codes">a</xsl:with-param>
426 <xsl:text> </xsl:text>
427 <xsl:if test="marc:subfield[@code='b']">
428 <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>
429 <xsl:call-template name="subfieldSelect">
430 <xsl:with-param name="codes">b</xsl:with-param>
435 <xsl:text> </xsl:text>
436 <xsl:if test="marc:subfield[@code='c' or @code='g']">
437 <span property="datePublished">
438 <xsl:call-template name="chopPunctuation">
439 <xsl:with-param name="chopString">
440 <xsl:call-template name="subfieldSelect">
441 <xsl:with-param name="codes">cg</xsl:with-param>
447 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
453 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
454 <xsl:if test="$display880">
455 <xsl:call-template name="m880Select">
456 <xsl:with-param name="basetags">250</xsl:with-param>
457 <xsl:with-param name="codes">ab</xsl:with-param>
458 <xsl:with-param name="class">results_summary edition</xsl:with-param>
459 <xsl:with-param name="label">Edition: </xsl:with-param>
463 <xsl:if test="marc:datafield[@tag=250]">
464 <span class="results_summary edition"><span class="label">Edition: </span>
465 <xsl:for-each select="marc:datafield[@tag=250]">
466 <span property="bookEdition">
467 <xsl:call-template name="chopPunctuation">
468 <xsl:with-param name="chopString">
469 <xsl:call-template name="subfieldSelect">
470 <xsl:with-param name="codes">ab</xsl:with-param>
475 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
480 <!-- Description: Alternate Graphic Representation (MARC 880) -->
481 <xsl:if test="$display880">
482 <xsl:call-template name="m880Select">
483 <xsl:with-param name="basetags">300</xsl:with-param>
484 <xsl:with-param name="codes">abceg</xsl:with-param>
485 <xsl:with-param name="class">results_summary description</xsl:with-param>
486 <xsl:with-param name="label">Description: </xsl:with-param>
490 <xsl:if test="marc:datafield[@tag=300]">
491 <span class="results_summary description"><span class="label">Description: </span>
492 <xsl:for-each select="marc:datafield[@tag=300]">
493 <span property="description">
494 <xsl:call-template name="chopPunctuation">
495 <xsl:with-param name="chopString">
496 <xsl:call-template name="subfieldSelect">
497 <xsl:with-param name="codes">abcefg</xsl:with-param>
502 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
508 <!-- Content Type -->
509 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
510 <span class="results_summary" id="content_type">
511 <xsl:if test="marc:datafield[@tag=336]">
512 <span class="label">Content type: </span>
513 <xsl:for-each select="marc:datafield[@tag=336]">
514 <xsl:call-template name="subfieldSelect">
515 <xsl:with-param name="codes">a</xsl:with-param>
516 <xsl:with-param name="delimeter">, </xsl:with-param>
518 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
521 <xsl:text> </xsl:text>
523 <xsl:if test="marc:datafield[@tag=337]">
524 <span class="label">Media type: </span>
525 <xsl:for-each select="marc:datafield[@tag=337]">
526 <xsl:call-template name="subfieldSelect">
527 <xsl:with-param name="codes">a</xsl:with-param>
528 <xsl:with-param name="delimeter">, </xsl:with-param>
530 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
533 <xsl:text> </xsl:text>
535 <xsl:if test="marc:datafield[@tag=338]">
536 <span class="label">Carrier type: </span>
537 <xsl:for-each select="marc:datafield[@tag=338]">
538 <xsl:call-template name="subfieldSelect">
539 <xsl:with-param name="codes">a</xsl:with-param>
540 <xsl:with-param name="delimeter">, </xsl:with-param>
542 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
550 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
551 <span class="results_summary isbn"><span class="label">ISBN: </span>
552 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
553 <span property="isbn">
554 <xsl:value-of select="."/>
555 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
562 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
563 <span class="results_summary issn"><span class="label">ISSN: </span>
564 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
565 <span property="issn">
566 <xsl:value-of select="."/>
567 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
573 <xsl:if test="marc:datafield[@tag=013]">
574 <span class="results_summary patent_info">
575 <span class="label">Patent information: </span>
576 <xsl:for-each select="marc:datafield[@tag=013]">
577 <xsl:call-template name="subfieldSelect">
578 <xsl:with-param name="codes">acdef</xsl:with-param>
579 <xsl:with-param name="delimeter">, </xsl:with-param>
581 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
586 <xsl:if test="marc:datafield[@tag=088]">
587 <span class="results_summary report_number">
588 <span class="label">Report number: </span>
589 <xsl:for-each select="marc:datafield[@tag=088]">
590 <xsl:call-template name="subfieldSelect">
591 <xsl:with-param name="codes">a</xsl:with-param>
593 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
598 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
599 <xsl:if test="$display880">
600 <xsl:call-template name="m880Select">
601 <xsl:with-param name="basetags">246</xsl:with-param>
602 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
603 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
604 <xsl:with-param name="label">Other title: </xsl:with-param>
608 <xsl:if test="marc:datafield[@tag=246]">
609 <span class="results_summary other_title"><span class="label">Other title: </span>
610 <xsl:for-each select="marc:datafield[@tag=246]">
611 <span property="alternateName">
612 <xsl:call-template name="chopPunctuation">
613 <xsl:with-param name="chopString">
614 <xsl:call-template name="subfieldSelect">
615 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
619 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
621 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
622 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
623 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
624 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
625 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
626 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
627 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
628 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
629 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
632 <xsl:if test="marc:subfield[@code='i']">
633 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
636 <!-- #13386 added separator | -->
637 <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>
643 <xsl:if test="marc:datafield[@tag=242]">
644 <span class="results_summary translated_title"><span class="label">Title translated: </span>
645 <xsl:for-each select="marc:datafield[@tag=242]">
646 <span property="alternateName">
647 <xsl:call-template name="chopPunctuation">
648 <xsl:with-param name="chopString">
649 <xsl:call-template name="subfieldSelect">
650 <xsl:with-param name="codes">abchnp</xsl:with-param>
655 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
660 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
661 <xsl:if test="$display880">
662 <span property="alternateName">
663 <xsl:call-template name="m880Select">
664 <xsl:with-param name="basetags">130,240</xsl:with-param>
665 <xsl:with-param name="codes">adfklmor</xsl:with-param>
666 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
667 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
672 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
673 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
674 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
675 <span property="alternateName">
676 <xsl:for-each select="marc:subfield">
677 <xsl:if test="contains('adfghklmnoprst',@code)">
678 <xsl:value-of select="text()"/>
679 <xsl:text> </xsl:text>
683 <xsl:if test="position() != last()">
684 <span class="separator"><xsl:text> | </xsl:text></span>
691 <!-- #13382 Added Related works 700$i -->
692 <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']]">
693 <span class="results_summary related_works"><span class="label">Related works: </span>
694 <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']]">
695 <xsl:variable name="str">
696 <xsl:call-template name="subfieldSelect">
697 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
700 <xsl:call-template name="chopPunctuation">
701 <xsl:with-param name="chopString">
702 <xsl:value-of select="$str"/>
705 <!-- add relator code too between brackets-->
706 <xsl:if test="marc:subfield[@code='4' or @code='e']">
707 <span class="relatorcode">
708 <xsl:text> [</xsl:text>
710 <xsl:when test="marc:subfield[@code='e']">
711 <xsl:for-each select="marc:subfield[@code='e']">
712 <xsl:value-of select="."/>
713 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
717 <xsl:for-each select="marc:subfield[@code='4']">
718 <xsl:value-of select="."/>
719 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
723 <xsl:text>]</xsl:text>
727 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
733 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
734 <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'])]">
735 <span class="results_summary contained_works"><span class="label">Contained works: </span>
736 <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'])]">
737 <xsl:variable name="str">
738 <xsl:call-template name="subfieldSelect">
739 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
742 <xsl:call-template name="chopPunctuation">
743 <xsl:with-param name="chopString">
744 <xsl:value-of select="$str"/>
747 <!-- add relator code too between brackets-->
748 <xsl:if test="marc:subfield[@code='4' or @code='e']">
749 <span class="relatorcode">
750 <xsl:text> [</xsl:text>
752 <xsl:when test="marc:subfield[@code='e']">
753 <xsl:for-each select="marc:subfield[@code='e']">
754 <xsl:value-of select="."/>
755 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
759 <xsl:for-each select="marc:subfield[@code='4']">
760 <xsl:value-of select="."/>
761 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
765 <xsl:text>]</xsl:text>
769 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
775 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
776 <span class="results_summary subjects"><span class="label">Subject(s): </span>
777 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
778 <span property="keywords">
781 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
782 <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>
784 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
785 <xsl:when test="$TraceSubjectSubdivisions='1'">
786 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
787 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
788 <xsl:with-param name="delimeter"> AND </xsl:with-param>
789 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
790 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
791 <xsl:with-param name="urlencode">1</xsl:with-param>
795 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
797 <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>
800 <xsl:call-template name="chopPunctuation">
801 <xsl:with-param name="chopString">
802 <xsl:call-template name="subfieldSelect">
803 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
804 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
805 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
811 <xsl:if test="marc:subfield[@code=9]">
813 <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>
814 <xsl:element name="img">
815 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
816 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
817 <xsl:attribute name="height">15</xsl:attribute>
818 <xsl:attribute name="width">15</xsl:attribute>
823 <xsl:when test="position()=last()"></xsl:when>
824 <xsl:otherwise> | </xsl:otherwise>
832 <xsl:if test="marc:datafield[@tag=655]">
833 <span class="results_summary genre"><span class="label">Genre/Form: </span>
834 <xsl:for-each select="marc:datafield[@tag=655]">
837 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
838 <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>
840 <xsl:when test="$TraceSubjectSubdivisions='1'">
841 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
842 <xsl:with-param name="codes">avxyz</xsl:with-param>
843 <xsl:with-param name="delimeter"> AND </xsl:with-param>
844 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
845 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
846 <xsl:with-param name="urlencode">1</xsl:with-param>
851 <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>
854 <xsl:call-template name="subfieldSelect">
855 <xsl:with-param name="codes">avxyz</xsl:with-param>
856 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
857 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
860 <xsl:if test="marc:subfield[@code=9]">
861 <xsl:text> </xsl:text>
863 <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>
864 <xsl:element name="img">
865 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
866 <xsl:attribute name="alt"></xsl:attribute>
867 <xsl:attribute name="height">15</xsl:attribute>
868 <xsl:attribute name="width">15</xsl:attribute>
872 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
877 <!-- MARC21 776 Additional Physical Form Entry -->
878 <xsl:if test="marc:datafield[@tag=776]">
879 <span class="results_summary add_physical_form">
880 <span class="label">Additional physical formats: </span>
881 <xsl:for-each select="marc:datafield[@tag=776]">
882 <xsl:variable name="linktext">
884 <xsl:when test="marc:subfield[@code='t']">
885 <xsl:value-of select="marc:subfield[@code='t']"/>
887 <xsl:when test="marc:subfield[@code='a']">
888 <xsl:value-of select="marc:subfield[@code='a']"/>
891 <xsl:text>No title</xsl:text>
895 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
896 <xsl:call-template name="subfieldSelect">
897 <xsl:with-param name="codes">i</xsl:with-param>
899 <xsl:text>: </xsl:text>
902 <xsl:when test="marc:subfield[@code='w']">
904 <xsl:attribute name="href">
905 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
906 <xsl:call-template name="extractControlNumber">
907 <xsl:with-param name="subfieldW">
908 <xsl:value-of select="marc:subfield[@code='w']"/>
912 <xsl:value-of select="$linktext"/>
916 <xsl:value-of select="$linktext"/>
919 <xsl:if test="position() != last()">
920 <xsl:text>; </xsl:text>
926 <!-- DDC classification -->
927 <xsl:if test="marc:datafield[@tag=082]">
928 <span class="results_summary ddc">
929 <span class="label">DDC classification: </span>
930 <xsl:for-each select="marc:datafield[@tag=082]">
931 <xsl:call-template name="subfieldSelect">
932 <xsl:with-param name="codes">a</xsl:with-param>
933 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
936 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
937 <xsl:otherwise> | </xsl:otherwise>
943 <!-- LOC classification -->
944 <xsl:if test="marc:datafield[@tag=050]">
945 <span class="results_summary loc">
946 <span class="label">LOC classification: </span>
947 <xsl:for-each select="marc:datafield[@tag=050]">
948 <xsl:call-template name="subfieldSelect">
949 <xsl:with-param name="codes">ab</xsl:with-param>
950 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
956 <!-- Other classification -->
957 <xsl:if test="marc:datafield[@tag=084]">
958 <span class="results_summary oc">
959 <span class="label">Other classification: </span>
960 <xsl:for-each select="marc:datafield[@tag=084]">
961 <xsl:call-template name="subfieldSelect">
962 <xsl:with-param name="codes">a</xsl:with-param>
963 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
966 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
967 <xsl:otherwise> | </xsl:otherwise>
974 <!-- Image processing code added here, takes precedence over text links including y3z text -->
975 <xsl:if test="marc:datafield[@tag=856]">
976 <span class="results_summary online_resources"><span class="label">Online resources: </span>
977 <xsl:for-each select="marc:datafield[@tag=856]">
978 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
981 <xsl:when test="$OPACTrackClicks='track'">
982 <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>
984 <xsl:when test="$OPACTrackClicks='anonymous'">
985 <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>
988 <xsl:attribute name="href">
989 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
991 <xsl:when test="@ind1=7">
992 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
994 <xsl:when test="@ind1=1">
995 <xsl:text>ftp://</xsl:text>
998 <xsl:text>http://</xsl:text>
1002 <xsl:value-of select="marc:subfield[@code='u']"/>
1006 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1007 <xsl:attribute name="target">_blank</xsl:attribute>
1010 <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')">
1011 <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>
1013 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1014 <xsl:call-template name="subfieldSelect">
1015 <xsl:with-param name="codes">y3z</xsl:with-param>
1016 </xsl:call-template>
1018 <xsl:when test="$URLLinkText!=''">
1019 <xsl:value-of select="$URLLinkText"/>
1022 <xsl:text>Click here to access online</xsl:text>
1027 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1028 <xsl:otherwise> | </xsl:otherwise>
1035 <xsl:if test="marc:datafield[@tag=530]">
1036 <xsl:for-each select="marc:datafield[@tag=530]">
1037 <span class="results_summary additionalforms">
1038 <xsl:call-template name="subfieldSelect">
1039 <xsl:with-param name="codes">abcd</xsl:with-param>
1040 </xsl:call-template>
1041 <xsl:for-each select="marc:subfield[@code='u']">
1042 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1043 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1044 <xsl:attribute name="target">_blank</xsl:attribute>
1046 <xsl:value-of select="text()"/>
1054 <xsl:if test="marc:datafield[@tag=505]">
1055 <div class="results_summary contents">
1056 <xsl:for-each select="marc:datafield[@tag=505]">
1057 <xsl:if test="position()=1">
1059 <xsl:when test="@ind1=1">
1060 <span class="label">Incomplete contents:</span>
1062 <xsl:when test="@ind1=2">
1063 <span class="label">Partial contents:</span>
1066 <span class="label">Contents:</span>
1070 <div class='contentblock' property='description'>
1072 <xsl:when test="@ind2=0">
1073 <xsl:call-template name="subfieldSelectSpan">
1074 <xsl:with-param name="codes">tru</xsl:with-param>
1075 </xsl:call-template>
1078 <xsl:call-template name="subfieldSelectSpan">
1079 <xsl:with-param name="codes">atru</xsl:with-param>
1080 </xsl:call-template>
1089 <xsl:if test="marc:datafield[@tag=583]">
1090 <xsl:for-each select="marc:datafield[@tag=583]">
1091 <xsl:if test="@ind1=1 or @ind1=' '">
1092 <span class="results_summary actionnote">
1093 <span class="label">Action note: </span>
1095 <xsl:when test="marc:subfield[@code='z']">
1096 <xsl:value-of select="marc:subfield[@code='z']"/>
1099 <xsl:call-template name="subfieldSelect">
1100 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1101 </xsl:call-template>
1110 <xsl:if test="marc:datafield[@tag=508]">
1111 <div class="results_summary prod_credits">
1112 <span class="label">Production Credits: </span>
1113 <xsl:for-each select="marc:datafield[@tag=508]">
1114 <xsl:call-template name="subfieldSelectSpan">
1115 <xsl:with-param name="codes">a</xsl:with-param>
1116 </xsl:call-template>
1117 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1123 <xsl:if test="marc:datafield[@tag=586]">
1124 <span class="results_summary awardsnote">
1125 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1126 <span class="label">Awards: </span>
1128 <xsl:for-each select="marc:datafield[@tag=586]">
1129 <xsl:value-of select="marc:subfield[@code='a']"/>
1130 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1136 <xsl:if test="marc:datafield[@tag=773]">
1137 <xsl:for-each select="marc:datafield[@tag=773]">
1138 <xsl:if test="@ind1 !=1">
1139 <span class="results_summary in"><span class="label">
1141 <xsl:when test="@ind2=' '">
1144 <xsl:when test="@ind2=8">
1145 <xsl:if test="marc:subfield[@code='i']">
1146 <xsl:value-of select="marc:subfield[@code='i']"/>
1151 <xsl:variable name="f773">
1152 <xsl:call-template name="chopPunctuation">
1153 <xsl:with-param name="chopString">
1154 <xsl:call-template name="subfieldSelect">
1155 <xsl:with-param name="codes">a_t</xsl:with-param>
1156 </xsl:call-template>
1158 </xsl:call-template>
1161 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1162 <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>
1163 <xsl:value-of select="translate($f773, '()', '')"/>
1166 <xsl:when test="marc:subfield[@code='0']">
1167 <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>
1168 <xsl:value-of select="$f773"/>
1172 <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>
1173 <xsl:value-of select="$f773"/>
1177 <xsl:if test="marc:subfield[@code='g']">
1178 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1182 <xsl:if test="marc:subfield[@code='n']">
1183 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1190 <xsl:for-each select="marc:datafield[@tag=511]">
1191 <span class="results_summary perf_note">
1192 <span class="label">
1193 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1195 <xsl:call-template name="subfieldSelect">
1196 <xsl:with-param name="codes">a</xsl:with-param>
1197 </xsl:call-template>
1201 <xsl:if test="marc:datafield[@tag=502]">
1202 <span class="results_summary diss_note">
1203 <span class="label">Dissertation note: </span>
1204 <xsl:for-each select="marc:datafield[@tag=502]">
1205 <xsl:call-template name="subfieldSelect">
1206 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1207 </xsl:call-template>
1209 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1213 <xsl:for-each select="marc:datafield[@tag=520]">
1214 <span class="results_summary summary"><span class="label">
1216 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1217 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1218 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1219 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1220 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1221 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1224 <xsl:call-template name="subfieldSelect">
1225 <xsl:with-param name="codes">abcu</xsl:with-param>
1226 </xsl:call-template>
1230 <!-- 866 textual holdings -->
1231 <xsl:if test="marc:datafield[@tag=866]">
1232 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1233 <xsl:for-each select="marc:datafield[@tag=866]">
1234 <span class="holdings_note_data">
1235 <xsl:call-template name="subfieldSelect">
1236 <xsl:with-param name="codes">az</xsl:with-param>
1237 </xsl:call-template>
1238 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1244 <!-- 867 textual holdings -->
1245 <xsl:if test="marc:datafield[@tag=867]">
1246 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1247 <xsl:for-each select="marc:datafield[@tag=867]">
1248 <span class="holdings_note_data">
1249 <xsl:call-template name="subfieldSelect">
1250 <xsl:with-param name="codes">az</xsl:with-param>
1251 </xsl:call-template>
1252 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1258 <!-- 868 textual holdings -->
1259 <xsl:if test="marc:datafield[@tag=868]">
1260 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1261 <xsl:for-each select="marc:datafield[@tag=868]">
1262 <span class="holdings_note_data">
1263 <xsl:call-template name="subfieldSelect">
1264 <xsl:with-param name="codes">az</xsl:with-param>
1265 </xsl:call-template>
1266 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1272 <!-- 775 Other Edition -->
1273 <xsl:if test="marc:datafield[@tag=775]">
1274 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1275 <xsl:for-each select="marc:datafield[@tag=775]">
1276 <xsl:variable name="f775">
1277 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1278 <xsl:with-param name="codes">a_t</xsl:with-param>
1279 </xsl:call-template></xsl:with-param></xsl:call-template>
1281 <xsl:if test="marc:subfield[@code='i']">
1282 <xsl:call-template name="subfieldSelect">
1283 <xsl:with-param name="codes">i</xsl:with-param>
1284 </xsl:call-template>
1285 <xsl:text>: </xsl:text>
1289 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1290 <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>
1293 <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>
1296 <xsl:call-template name="subfieldSelect">
1297 <xsl:with-param name="codes">a_t</xsl:with-param>
1298 </xsl:call-template>
1301 <xsl:when test="position()=last()"></xsl:when>
1302 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1309 <xsl:if test="marc:datafield[@tag=780]">
1310 <xsl:for-each select="marc:datafield[@tag=780]">
1311 <xsl:if test="@ind1=0">
1312 <span class="results_summary preceeding_entry">
1314 <xsl:when test="@ind2=0">
1315 <span class="label">Continues:</span>
1317 <xsl:when test="@ind2=1">
1318 <span class="label">Continues in part:</span>
1320 <xsl:when test="@ind2=2">
1321 <span class="label">Supersedes:</span>
1323 <xsl:when test="@ind2=3">
1324 <span class="label">Supersedes in part:</span>
1326 <xsl:when test="@ind2=4">
1327 <span class="label">Formed by the union: ... and: ...</span>
1329 <xsl:when test="@ind2=5">
1330 <span class="label">Absorbed:</span>
1332 <xsl:when test="@ind2=6">
1333 <span class="label">Absorbed in part:</span>
1335 <xsl:when test="@ind2=7">
1336 <span class="label">Separated from:</span>
1339 <xsl:text> </xsl:text>
1340 <xsl:variable name="f780">
1341 <xsl:call-template name="subfieldSelect">
1342 <xsl:with-param name="codes">a_t</xsl:with-param>
1343 </xsl:call-template>
1346 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1347 <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>
1348 <xsl:value-of select="translate($f780, '()', '')"/>
1352 <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>
1353 <xsl:value-of select="translate($f780, '()', '')"/>
1359 <xsl:if test="marc:subfield[@code='n']">
1360 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1368 <xsl:if test="marc:datafield[@tag=785]">
1369 <xsl:for-each select="marc:datafield[@tag=785]">
1370 <xsl:if test="@ind1=0">
1371 <span class="results_summary succeeding_entry">
1373 <xsl:when test="@ind2=0">
1374 <span class="label">Continued by:</span>
1376 <xsl:when test="@ind2=1">
1377 <span class="label">Continued in part by:</span>
1379 <xsl:when test="@ind2=2">
1380 <span class="label">Superseded by:</span>
1382 <xsl:when test="@ind2=3">
1383 <span class="label">Superseded in part by:</span>
1385 <xsl:when test="@ind2=4">
1386 <span class="label">Absorbed by:</span>
1388 <xsl:when test="@ind2=5">
1389 <span class="label">Absorbed in part by:</span>
1391 <xsl:when test="@ind2=6">
1392 <span class="label">Split into .. and ...:</span>
1394 <xsl:when test="@ind2=7">
1395 <span class="label">Merged with ... to form ...</span>
1397 <xsl:when test="@ind2=8">
1398 <span class="label">Changed back to:</span>
1401 <xsl:text> </xsl:text>
1402 <xsl:variable name="f785">
1403 <xsl:call-template name="subfieldSelect">
1404 <xsl:with-param name="codes">a_t</xsl:with-param>
1405 </xsl:call-template>
1409 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1410 <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>
1411 <xsl:value-of select="translate($f785, '()', '')"/>
1415 <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>
1416 <xsl:value-of select="translate($f785, '()', '')"/>
1423 <xsl:if test="marc:subfield[@code='n']">
1424 <span class="results_summary succeeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1432 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
1433 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
1434 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
1435 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
1437 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
1438 <xsl:variable name="openurltext">
1440 <xsl:when test="$OpenURLText != ''">
1441 <xsl:value-of select="$OpenURLText" />
1444 <xsl:text>OpenURL</xsl:text>
1449 <span class="results_summary"><a>
1450 <xsl:attribute name="href">
1451 <xsl:value-of select="$OpenURLResolverURL" />
1453 <xsl:attribute name="title">
1454 <xsl:value-of select="$openurltext" />
1456 <xsl:attribute name="class">
1457 <xsl:text>OpenURL</xsl:text>
1459 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1460 <xsl:attribute name="target">
1461 <xsl:text>_blank</xsl:text>
1465 <xsl:when test="$OpenURLImageLocation != ''">
1467 <xsl:attribute name="src">
1468 <xsl:value-of select="$OpenURLImageLocation" />
1473 <xsl:value-of select="$openurltext" />
1478 <!-- End of OpenURL -->
1480 <xsl:variable name="OPACShowMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACShowMusicalInscripts']" />
1481 <xsl:variable name="OPACPlayMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACPlayMusicalInscripts']" />
1483 <xsl:if test="$OPACShowMusicalInscripts = 1 and marc:datafield[@tag=031]">
1484 <xsl:for-each select="marc:datafield[@tag=031]">
1486 <span class="results_summary musical_inscripts">
1487 <xsl:if test="marc:subfield[@code='u']">
1490 <xsl:attribute name="href">
1491 <xsl:value-of select="marc:subfield[@code='u']"/>
1493 <xsl:text>Audio file</xsl:text>
1497 <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']">
1498 <div class="inscript" data-system="pae">
1499 <xsl:attribute name="data-clef">
1500 <xsl:value-of select="marc:subfield[@code='g']"/>
1502 <xsl:attribute name="data-keysig">
1503 <xsl:value-of select="marc:subfield[@code='n']"/>
1505 <xsl:attribute name="data-timesig">
1506 <xsl:value-of select="marc:subfield[@code='o']"/>
1508 <xsl:attribute name="data-notation">
1509 <xsl:value-of select="marc:subfield[@code='p']"/>
1512 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1513 <div class="audio_controls hide">
1514 <button class="btn play_btn">
1515 <i id="carticon" class="fa fa-play"></i>
1516 <xsl:text> Play this sample</xsl:text>
1523 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1524 <div class="results_summary">
1525 <span class="inscript_audio hide"></span>
1533 <xsl:template name="showAuthor">
1534 <xsl:param name="authorfield" />
1535 <xsl:param name="UseAuthoritiesForTracings" />
1536 <xsl:param name="materialTypeLabel" />
1537 <xsl:param name="theme" />
1538 <xsl:if test="count($authorfield)>0">
1540 <xsl:for-each select="$authorfield">
1542 <xsl:when test="position()>1"/>
1544 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1545 <!--#13382 Changed Additional author to contributor -->
1546 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1549 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1550 <xsl:when test="marc:subfield[@code='n']">
1551 <xsl:text> </xsl:text>
1552 <xsl:call-template name="subfieldSelect">
1553 <xsl:with-param name="codes">n</xsl:with-param>
1554 </xsl:call-template>
1555 <xsl:text> </xsl:text>
1560 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1561 <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>
1564 <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>
1567 <span resource="#record"><span>
1569 <xsl:when test="substring(@tag, 1, 1)='1'">
1571 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1572 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1575 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1578 <xsl:when test="substring(@tag, 2, 1)='0'">
1580 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1581 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1584 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1586 <span property="name">
1588 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1590 <xsl:call-template name="chopPunctuation">
1591 <xsl:with-param name="chopString">
1592 <xsl:call-template name="subfieldSelect">
1593 <xsl:with-param name="codes">
1595 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1596 <xsl:when test="@tag=111">aeq</xsl:when>
1597 <xsl:when test="@tag=110">ab</xsl:when>
1598 <xsl:otherwise>abcjq</xsl:otherwise>
1601 </xsl:call-template>
1603 <xsl:with-param name="punctuation">
1604 <xsl:text>:,;/ </xsl:text>
1606 </xsl:call-template>
1607 <!-- Display only name and title portion in 110 field -->
1608 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1609 <span class="titleportion">
1611 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1612 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1614 <xsl:call-template name="chopPunctuation">
1615 <xsl:with-param name="chopString">
1616 <xsl:call-template name="subfieldSelect">
1617 <xsl:with-param name="codes">cdnt</xsl:with-param>
1618 </xsl:call-template>
1620 </xsl:call-template>
1623 <!-- Display only name and title portion in 111 field -->
1624 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1625 <span class="titleportion">
1627 <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>
1628 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1631 <xsl:call-template name="chopPunctuation">
1632 <xsl:with-param name="chopString">
1633 <xsl:call-template name="subfieldSelect">
1634 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1635 </xsl:call-template>
1637 </xsl:call-template>
1640 <!-- Display only dates in 100 field -->
1641 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1642 <span class="authordates">
1643 <xsl:text>, </xsl:text>
1644 <xsl:call-template name="chopPunctuation">
1645 <xsl:with-param name="chopString">
1646 <xsl:call-template name="subfieldSelect">
1647 <xsl:with-param name="codes">d</xsl:with-param>
1648 </xsl:call-template>
1650 </xsl:call-template>
1654 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1655 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1656 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1657 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1658 <xsl:if test="@tag=710 or @tag=711">
1659 <xsl:call-template name="chopPunctuation">
1660 <xsl:with-param name="chopString">
1661 <xsl:call-template name="subfieldSelect">
1662 <xsl:with-param name="codes">
1664 <xsl:when test="@tag=711">aeq</xsl:when>
1665 <xsl:otherwise>ab</xsl:otherwise>
1668 </xsl:call-template>
1670 <xsl:with-param name="punctuation">
1671 <xsl:text>:,;/ </xsl:text>
1673 </xsl:call-template>
1674 <!-- Display only name and title portion in 711 field -->
1675 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1676 <span class="titleportion">
1678 <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>
1679 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1682 <xsl:call-template name="chopPunctuation">
1683 <xsl:with-param name="chopString">
1684 <xsl:call-template name="subfieldSelect">
1685 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1686 </xsl:call-template>
1688 </xsl:call-template>
1691 <!-- Display only name and title portion in 710 field -->
1692 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1693 <span class="titleportion">
1695 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1696 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1698 <xsl:call-template name="chopPunctuation">
1699 <xsl:with-param name="chopString">
1700 <xsl:call-template name="subfieldSelect">
1701 <xsl:with-param name="codes">cdnt</xsl:with-param>
1702 </xsl:call-template>
1704 </xsl:call-template>
1709 <!-- Display only name portion in 700 field -->
1710 <xsl:if test="@tag=700">
1711 <xsl:call-template name="chopPunctuation">
1712 <xsl:with-param name="chopString">
1713 <xsl:call-template name="subfieldSelect">
1714 <xsl:with-param name="codes">abcq</xsl:with-param>
1715 </xsl:call-template>
1717 </xsl:call-template>
1719 <!-- Display class "authordates" in 700 field -->
1720 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1721 <span class="authordates">
1722 <xsl:text>, </xsl:text>
1723 <xsl:call-template name="chopPunctuation">
1724 <xsl:with-param name="chopString">
1725 <xsl:call-template name="subfieldSelect">
1726 <xsl:with-param name="codes">d</xsl:with-param>
1727 </xsl:call-template>
1729 </xsl:call-template>
1732 <!-- Display class "titleportion" in 700 field -->
1733 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1734 <xsl:if test="@tag=700 and $titleportionfields">
1735 <span class="titleportion">
1736 <xsl:text>. </xsl:text>
1737 <xsl:call-template name="chopPunctuation">
1738 <xsl:with-param name="chopString">
1739 <xsl:call-template name="subfieldSelect">
1740 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1741 </xsl:call-template>
1743 </xsl:call-template>
1749 </span></span></span>
1751 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1752 <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'])">
1754 <span class="relatorcode">
1755 <xsl:text> [</xsl:text>
1757 <xsl:when test="@tag=111 or @tag=711">
1759 <!-- Prefer j over 4 for 111 and 711 -->
1760 <xsl:when test="marc:subfield[@code='j']">
1761 <xsl:for-each select="marc:subfield[@code='j']">
1762 <xsl:value-of select="."/>
1763 <xsl:if test="position() != last()">, </xsl:if>
1767 <xsl:for-each select="marc:subfield[@code=4]">
1768 <xsl:value-of select="."/>
1769 <xsl:if test="position() != last()">, </xsl:if>
1774 <!-- Prefer e over 4 on 100 and 110-->
1775 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1776 <xsl:for-each select="marc:subfield[@code='e']">
1777 <xsl:value-of select="."/>
1778 <xsl:if test="position() != last()">, </xsl:if>
1782 <xsl:for-each select="marc:subfield[@code=4]">
1783 <xsl:value-of select="."/>
1784 <xsl:if test="position() != last()">, </xsl:if>
1788 <xsl:text>]</xsl:text>
1792 <xsl:if test="marc:subfield[@code=9]">
1793 <a class='authlink'>
1794 <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>
1795 <xsl:element name="img">
1796 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
1797 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
1798 <xsl:attribute name="height">15</xsl:attribute>
1799 <xsl:attribute name="width">15</xsl:attribute>
1804 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1811 <xsl:template name="nameABCQ">
1812 <xsl:call-template name="chopPunctuation">
1813 <xsl:with-param name="chopString">
1814 <xsl:call-template name="subfieldSelect">
1815 <xsl:with-param name="codes">abcq</xsl:with-param>
1816 </xsl:call-template>
1818 <xsl:with-param name="punctuation">
1819 <xsl:text>:,;/ </xsl:text>
1821 </xsl:call-template>
1824 <xsl:template name="nameABCDN">
1825 <xsl:call-template name="chopPunctuation">
1826 <xsl:with-param name="chopString">
1827 <xsl:call-template name="subfieldSelect">
1828 <xsl:with-param name="codes">abcdn</xsl:with-param>
1829 </xsl:call-template>
1831 <xsl:with-param name="punctuation">
1832 <xsl:text>:,;/ </xsl:text>
1834 </xsl:call-template>
1837 <xsl:template name="nameACDEQ">
1838 <xsl:call-template name="subfieldSelect">
1839 <xsl:with-param name="codes">acdeq</xsl:with-param>
1840 </xsl:call-template>
1843 <xsl:template name="part">
1844 <xsl:variable name="partNumber">
1845 <xsl:call-template name="specialSubfieldSelect">
1846 <xsl:with-param name="axis">n</xsl:with-param>
1847 <xsl:with-param name="anyCodes">n</xsl:with-param>
1848 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1849 </xsl:call-template>
1851 <xsl:variable name="partName">
1852 <xsl:call-template name="specialSubfieldSelect">
1853 <xsl:with-param name="axis">p</xsl:with-param>
1854 <xsl:with-param name="anyCodes">p</xsl:with-param>
1855 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1856 </xsl:call-template>
1858 <xsl:if test="string-length(normalize-space($partNumber))">
1859 <xsl:call-template name="chopPunctuation">
1860 <xsl:with-param name="chopString" select="$partNumber"/>
1861 </xsl:call-template>
1863 <xsl:if test="string-length(normalize-space($partName))">
1864 <xsl:call-template name="chopPunctuation">
1865 <xsl:with-param name="chopString" select="$partName"/>
1866 </xsl:call-template>
1870 <xsl:template name="specialSubfieldSelect">
1871 <xsl:param name="anyCodes"/>
1872 <xsl:param name="axis"/>
1873 <xsl:param name="beforeCodes"/>
1874 <xsl:param name="afterCodes"/>
1875 <xsl:variable name="str">
1876 <xsl:for-each select="marc:subfield">
1877 <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])">
1878 <xsl:value-of select="text()"/>
1879 <xsl:text> </xsl:text>
1883 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1886 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1887 <xsl:template name="subfieldSelectSubject">
1888 <xsl:param name="codes"/>
1889 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1890 <xsl:param name="subdivCodes"/>
1891 <xsl:param name="subdivDelimiter"/>
1892 <xsl:param name="prefix"/>
1893 <xsl:param name="suffix"/>
1894 <xsl:param name="urlencode"/>
1895 <xsl:variable name="str">
1896 <xsl:for-each select="marc:subfield">
1897 <xsl:if test="contains($codes, @code)">
1898 <xsl:if test="contains($subdivCodes, @code)">
1899 <xsl:value-of select="$subdivDelimiter"/>
1901 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1906 <xsl:when test="$urlencode=1">
1907 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1910 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>