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 -->
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='UseICUStyleQuotes']='1'">{</xsl:when>
37 <xsl:otherwise>"</xsl:otherwise>
40 <xsl:variable name="TracingQuotesRight">
42 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICUStyleQuotes']='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 <h2 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">
163 <span class="results_summary author h3">
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"/>
203 <!-- Publisher or Distributor Number -->
204 <xsl:if test="marc:datafield[@tag=028]">
205 <span class="results_summary publisher_number ">
206 <span class="label">Publisher number: </span>
207 <xsl:for-each select="marc:datafield[@tag=028]">
208 <xsl:call-template name="subfieldSelect">
209 <xsl:with-param name="codes">abq</xsl:with-param>
210 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
216 <xsl:call-template name="show-lang-041"/>
218 <!--Series: Alternate Graphic Representation (MARC 880) -->
219 <xsl:if test="$display880">
220 <xsl:call-template name="m880Select">
221 <xsl:with-param name="basetags">440,490</xsl:with-param>
222 <xsl:with-param name="codes">av</xsl:with-param>
223 <xsl:with-param name="class">results_summary series</xsl:with-param>
224 <xsl:with-param name="label">Series: </xsl:with-param>
225 <xsl:with-param name="index">se</xsl:with-param>
229 <xsl:call-template name="show-series">
230 <xsl:with-param name="searchurl">/cgi-bin/koha/opac-search.pl</xsl:with-param>
231 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
232 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
235 <!-- Analytics information -->
236 <xsl:variable name="leader7_class">
238 <!--xsl:when test="$leader7='a'">analytic_mcp</xsl:when-->
239 <!--xsl:when test="$leader7='b'">analytic_scp</xsl:when-->
240 <xsl:when test="$leader7='c'">analytic_collection</xsl:when>
241 <xsl:when test="$leader7='d'">analytic_subunit</xsl:when>
242 <xsl:when test="$leader7='i'">analytic_ires</xsl:when>
243 <xsl:when test="$leader7='m'">analytic_monograph</xsl:when>
244 <xsl:when test="$leader7='s'">analytic_serial</xsl:when>
245 <xsl:otherwise>analytic_undefined</xsl:otherwise>
249 <xsl:variable name="show_analytics_link" select="marc:variables/marc:variable[@name='show_analytics_link']" />
250 <xsl:if test="$show_analytics_link='1'">
251 <xsl:element name="span">
252 <xsl:attribute name="class">results_summary analytics <xsl:value-of select="$leader7_class"/></xsl:attribute>
253 <span class="label">Analytics: </span>
256 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
257 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+AND+(bib-level:a+OR+bib-level:b)</xsl:attribute>
260 <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>
263 <xsl:text>Show analytics</xsl:text>
268 <!-- Volumes of sets and traced series -->
269 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
270 <span class="results_summary volumes"><span class="label">Volumes: </span>
273 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
274 <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>
277 <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>
280 <xsl:text>Show volumes</xsl:text>
286 <xsl:if test="$leader19='c'">
287 <span class="results_summary set"><span class="label">Set: </span>
288 <xsl:for-each select="marc:datafield[@tag=773]">
291 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
292 <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>
295 <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>
298 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
301 <xsl:when test="position()=last()"></xsl:when>
302 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
308 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
309 <xsl:if test="$display880">
310 <xsl:call-template name="m880Select">
311 <xsl:with-param name="basetags">260</xsl:with-param>
312 <xsl:with-param name="codes">abcg</xsl:with-param>
313 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
314 <xsl:with-param name="label">Publication details: </xsl:with-param>
318 <!-- Publisher info and RDA related info from tags 260, 264 -->
320 <xsl:when test="marc:datafield[@tag=264]">
321 <xsl:call-template name="showRDAtag264">
322 <xsl:with-param name="show_url">1</xsl:with-param>
325 <xsl:when test="marc:datafield[@tag=260]">
326 <span class="results_summary publisher"><span class="label">Publication details: </span>
327 <xsl:for-each select="marc:datafield[@tag=260]">
328 <span property="publisher" typeof="Organization">
329 <xsl:for-each select="marc:subfield[@code='a']">
330 <span class="publisher_place" property="location">
332 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(., true())"/>"</xsl:attribute>
333 <xsl:value-of select="."/>
336 <xsl:if test="position() != last()">
337 <xsl:text> </xsl:text>
340 <xsl:text> </xsl:text>
341 <xsl:if test="marc:subfield[@code='b']">
342 <span property="name" class="publisher_name">
343 <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>
344 <xsl:call-template name="subfieldSelect">
345 <xsl:with-param name="codes">b</xsl:with-param>
351 <xsl:text> </xsl:text>
352 <xsl:for-each select="marc:subfield[@code='c']">
353 <span property="datePublished" class="publisher_date">
355 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(., true())"/>"</xsl:attribute>
356 <xsl:value-of select="."/>
358 <xsl:if test="position() != last()">
359 <xsl:text> </xsl:text>
363 <xsl:text> </xsl:text>
364 <xsl:if test="marc:subfield[@code='g']">
365 <span property="datePublished" class="publisher_date">
366 <xsl:call-template name="chopPunctuation">
367 <xsl:with-param name="chopString">
368 <xsl:call-template name="subfieldSelect">
369 <xsl:with-param name="codes">g</xsl:with-param>
375 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
381 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
382 <xsl:if test="$display880">
383 <xsl:call-template name="m880Select">
384 <xsl:with-param name="basetags">250</xsl:with-param>
385 <xsl:with-param name="codes">ab</xsl:with-param>
386 <xsl:with-param name="class">results_summary edition</xsl:with-param>
387 <xsl:with-param name="label">Edition: </xsl:with-param>
391 <xsl:if test="marc:datafield[@tag=250]">
392 <span class="results_summary edition"><span class="label">Edition: </span>
393 <xsl:for-each select="marc:datafield[@tag=250]">
394 <span property="bookEdition">
395 <xsl:call-template name="chopPunctuation">
396 <xsl:with-param name="chopString">
397 <xsl:call-template name="subfieldSelect">
398 <xsl:with-param name="codes">ab</xsl:with-param>
403 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
408 <!-- Description: Alternate Graphic Representation (MARC 880) -->
409 <xsl:if test="$display880">
410 <xsl:call-template name="m880Select">
411 <xsl:with-param name="basetags">300</xsl:with-param>
412 <xsl:with-param name="codes">abceg</xsl:with-param>
413 <xsl:with-param name="class">results_summary description</xsl:with-param>
414 <xsl:with-param name="label">Description: </xsl:with-param>
418 <xsl:if test="marc:datafield[@tag=300]">
419 <span class="results_summary description"><span class="label">Description: </span>
420 <xsl:for-each select="marc:datafield[@tag=300]">
421 <span property="description">
422 <xsl:call-template name="chopPunctuation">
423 <xsl:with-param name="chopString">
424 <xsl:call-template name="subfieldSelect">
425 <xsl:with-param name="codes">abcefg</xsl:with-param>
430 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
436 <!-- Content Type -->
437 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
438 <span class="results_summary" id="content_type">
439 <xsl:if test="marc:datafield[@tag=336]">
440 <span class="label">Content type: </span>
441 <xsl:for-each select="marc:datafield[@tag=336]">
442 <xsl:call-template name="subfieldSelect">
443 <xsl:with-param name="codes">a</xsl:with-param>
444 <xsl:with-param name="delimeter">, </xsl:with-param>
446 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
449 <xsl:text> </xsl:text>
451 <xsl:if test="marc:datafield[@tag=337]">
452 <span class="label">Media type: </span>
453 <xsl:for-each select="marc:datafield[@tag=337]">
454 <xsl:call-template name="subfieldSelect">
455 <xsl:with-param name="codes">a</xsl:with-param>
456 <xsl:with-param name="delimeter">, </xsl:with-param>
458 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
461 <xsl:text> </xsl:text>
463 <xsl:if test="marc:datafield[@tag=338]">
464 <span class="label">Carrier type: </span>
465 <xsl:for-each select="marc:datafield[@tag=338]">
466 <xsl:call-template name="subfieldSelect">
467 <xsl:with-param name="codes">a</xsl:with-param>
468 <xsl:with-param name="delimeter">, </xsl:with-param>
470 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
476 <!-- 385 - Audience -->
477 <xsl:if test="marc:datafield[@tag=385]">
478 <span class="results_summary audience">
479 <span class="label">Audience: </span>
480 <xsl:for-each select="marc:datafield[@tag=385]">
481 <xsl:if test="marc:subfield[@code='m']">
482 <xsl:call-template name="chopPunctuation">
483 <xsl:with-param name="chopString">
484 <xsl:call-template name="subfieldSelect">
485 <xsl:with-param name="codes">m</xsl:with-param>
489 <xsl:text>: </xsl:text>
491 <xsl:call-template name="chopPunctuation">
492 <xsl:with-param name="chopString">
493 <xsl:call-template name="subfieldSelect">
494 <xsl:with-param name="codes">a</xsl:with-param>
495 <xsl:with-param name="delimeter">, </xsl:with-param>
499 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise></xsl:choose>
504 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
505 <span class="results_summary isbn"><span class="label">ISBN: </span>
506 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
507 <span property="isbn">
508 <xsl:value-of select="."/>
509 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
516 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
517 <span class="results_summary issn"><span class="label">ISSN: </span>
518 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
519 <span property="issn">
520 <xsl:value-of select="."/>
521 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
527 <xsl:if test="marc:datafield[@tag=013]">
528 <span class="results_summary patent_info">
529 <span class="label">Patent information: </span>
530 <xsl:for-each select="marc:datafield[@tag=013]">
531 <xsl:call-template name="subfieldSelect">
532 <xsl:with-param name="codes">acdef</xsl:with-param>
533 <xsl:with-param name="delimeter">, </xsl:with-param>
535 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
540 <xsl:if test="marc:datafield[@tag=088]">
541 <span class="results_summary report_number">
542 <span class="label">Report number: </span>
543 <xsl:for-each select="marc:datafield[@tag=088]">
544 <xsl:call-template name="subfieldSelect">
545 <xsl:with-param name="codes">a</xsl:with-param>
547 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
552 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
553 <xsl:if test="$display880">
554 <xsl:call-template name="m880Select">
555 <xsl:with-param name="basetags">246</xsl:with-param>
556 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
557 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
558 <xsl:with-param name="label">Other title: </xsl:with-param>
562 <xsl:if test="marc:datafield[@tag=246]">
563 <span class="results_summary other_title"><span class="label">Other title: </span>
564 <xsl:for-each select="marc:datafield[@tag=246]">
565 <span property="alternateName">
566 <xsl:call-template name="chopPunctuation">
567 <xsl:with-param name="chopString">
568 <xsl:if test="marc:subfield[@code='i']">
569 <xsl:call-template name="subfieldSelect">
570 <xsl:with-param name="codes">i</xsl:with-param>
573 <xsl:text> </xsl:text>
574 <xsl:call-template name="subfieldSelect">
575 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
579 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
581 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
582 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
583 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
584 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
585 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
586 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
587 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
588 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
589 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
593 <!-- #13386 added separator | -->
594 <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>
600 <xsl:if test="marc:datafield[@tag=242]">
601 <span class="results_summary translated_title"><span class="label">Title translated: </span>
602 <xsl:for-each select="marc:datafield[@tag=242]">
603 <span property="alternateName">
604 <xsl:call-template name="chopPunctuation">
605 <xsl:with-param name="chopString">
606 <xsl:call-template name="subfieldSelect">
607 <xsl:with-param name="codes">abchnp</xsl:with-param>
612 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
617 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
618 <xsl:if test="$display880">
619 <span property="alternateName">
620 <xsl:call-template name="m880Select">
621 <xsl:with-param name="basetags">130,240</xsl:with-param>
622 <xsl:with-param name="codes">adfklmor</xsl:with-param>
623 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
624 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
629 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
630 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
631 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
632 <span property="alternateName">
633 <xsl:if test="marc:subfield[@code='i']">
634 <xsl:call-template name="subfieldSelect">
635 <xsl:with-param name="codes">i</xsl:with-param>
638 <xsl:text> </xsl:text>
639 <xsl:for-each select="marc:subfield">
640 <xsl:if test="contains('adfghklmnoprst',@code)">
641 <xsl:value-of select="text()"/>
642 <xsl:text> </xsl:text>
646 <xsl:if test="position() != last()">
647 <span class="separator"><xsl:text> | </xsl:text></span>
654 <!-- #13382 Added Related works 700$i -->
655 <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']]">
656 <span class="results_summary related_works"><span class="label">Related works: </span>
657 <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']]">
658 <xsl:variable name="str">
659 <xsl:call-template name="subfieldSelect">
660 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
663 <xsl:call-template name="chopPunctuation">
664 <xsl:with-param name="chopString">
665 <xsl:value-of select="$str"/>
668 <!-- add relator code too between brackets-->
669 <xsl:if test="marc:subfield[@code='4' or @code='e']">
670 <span class="relatorcode">
671 <xsl:text> [</xsl:text>
673 <xsl:when test="marc:subfield[@code='e']">
674 <xsl:for-each select="marc:subfield[@code='e']">
675 <xsl:value-of select="."/>
676 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
680 <xsl:for-each select="marc:subfield[@code='4']">
681 <xsl:value-of select="."/>
682 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
686 <xsl:text>]</xsl:text>
690 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
696 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
697 <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'])]">
698 <span class="results_summary contained_works"><span class="label">Contained works: </span>
699 <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'])]">
700 <xsl:variable name="str">
701 <xsl:call-template name="subfieldSelect">
702 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
705 <xsl:call-template name="chopPunctuation">
706 <xsl:with-param name="chopString">
707 <xsl:value-of select="$str"/>
710 <!-- add relator code too between brackets-->
711 <xsl:if test="marc:subfield[@code='4' or @code='e']">
712 <span class="relatorcode">
713 <xsl:text> [</xsl:text>
715 <xsl:when test="marc:subfield[@code='e']">
716 <xsl:for-each select="marc:subfield[@code='e']">
717 <xsl:value-of select="."/>
718 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
722 <xsl:for-each select="marc:subfield[@code='4']">
723 <xsl:value-of select="."/>
724 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
728 <xsl:text>]</xsl:text>
732 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
738 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
739 <span class="results_summary subjects"><span class="label">Subject(s): </span>
740 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
741 <span property="keywords">
743 <xsl:attribute name="class">subject</xsl:attribute>
745 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
746 <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>
748 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
749 <xsl:when test="$TraceSubjectSubdivisions='1'">
750 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
751 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
752 <xsl:with-param name="delimeter"> AND </xsl:with-param>
753 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
754 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
755 <xsl:with-param name="urlencode">1</xsl:with-param>
759 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
761 <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>
764 <xsl:call-template name="chopPunctuation">
765 <xsl:with-param name="chopString">
766 <xsl:call-template name="subfieldSelect">
767 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
768 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
769 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
775 <xsl:if test="marc:subfield[@code=9]">
777 <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>
778 <xsl:element name="i">
779 <xsl:attribute name="class">fa fa-search</xsl:attribute>
784 <xsl:when test="position()=last()"></xsl:when>
785 <xsl:otherwise> | </xsl:otherwise>
793 <xsl:if test="marc:datafield[@tag=655]">
794 <span class="results_summary genre"><span class="label">Genre/Form: </span>
795 <xsl:for-each select="marc:datafield[@tag=655]">
798 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
799 <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>
801 <xsl:when test="$TraceSubjectSubdivisions='1'">
802 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
803 <xsl:with-param name="codes">avxyz</xsl:with-param>
804 <xsl:with-param name="delimeter"> AND </xsl:with-param>
805 <xsl:with-param name="prefix">(index-term-genre<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
806 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
807 <xsl:with-param name="urlencode">1</xsl:with-param>
812 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=index-term-genre<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>
815 <xsl:call-template name="subfieldSelect">
816 <xsl:with-param name="codes">avxyz</xsl:with-param>
817 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
818 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
821 <xsl:if test="marc:subfield[@code=9]">
822 <xsl:text> </xsl:text>
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>
830 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
835 <!-- MARC21 776 Additional Physical Form Entry -->
836 <xsl:if test="marc:datafield[@tag=776]">
837 <span class="results_summary add_physical_form">
838 <span class="label">Additional physical formats: </span>
839 <xsl:for-each select="marc:datafield[@tag=776]">
840 <xsl:variable name="linktext">
842 <xsl:when test="marc:subfield[@code='t']">
843 <xsl:value-of select="marc:subfield[@code='t']"/>
845 <xsl:when test="marc:subfield[@code='a']">
846 <xsl:value-of select="marc:subfield[@code='a']"/>
849 <xsl:text>No title</xsl:text>
853 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
854 <xsl:call-template name="subfieldSelect">
855 <xsl:with-param name="codes">i</xsl:with-param>
857 <xsl:text>: </xsl:text>
860 <xsl:when test="marc:subfield[@code='w']">
862 <xsl:attribute name="href">
863 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
864 <xsl:call-template name="extractControlNumber">
865 <xsl:with-param name="subfieldW">
866 <xsl:value-of select="marc:subfield[@code='w']"/>
870 <xsl:value-of select="$linktext"/>
874 <xsl:value-of select="$linktext"/>
877 <xsl:if test="position() != last()">
878 <xsl:text>; </xsl:text>
884 <!-- MARC21 777 - Issued With Entry -->
885 <xsl:if test="marc:datafield[@tag=777]">
886 <xsl:for-each select="marc:datafield[@tag=777]">
887 <xsl:if test="@ind1 != 1">
888 <span class="results_summary issued_with">
891 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
892 <xsl:value-of select="marc:subfield[@code='i']"/>
895 <xsl:text>Issued with:</xsl:text>
898 <xsl:text> </xsl:text>
900 <xsl:variable name="f777">
901 <xsl:call-template name="chopPunctuation">
902 <xsl:with-param name="chopString">
903 <xsl:call-template name="subfieldSelect">
904 <xsl:with-param name="codes">a_t</xsl:with-param>
910 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
911 <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>
912 <xsl:value-of select="translate($f777, '()', '')"/>
916 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/></xsl:attribute>
917 <xsl:value-of select="$f777"/>
921 <xsl:if test="marc:subfield[@code='g']">
922 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
925 <xsl:if test="marc:subfield[@code='n']">
926 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
932 <!-- DDC classification -->
933 <xsl:if test="marc:datafield[@tag=082]">
934 <span class="results_summary ddc">
935 <span class="label">DDC classification: </span>
936 <xsl:for-each select="marc:datafield[@tag=082]">
937 <xsl:call-template name="subfieldSelect">
938 <xsl:with-param name="codes">a</xsl:with-param>
939 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
942 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
943 <xsl:otherwise> | </xsl:otherwise>
949 <!-- LOC classification -->
950 <xsl:if test="marc:datafield[@tag=050]">
951 <span class="results_summary loc">
952 <span class="label">LOC classification: </span>
953 <xsl:for-each select="marc:datafield[@tag=050]">
954 <xsl:call-template name="subfieldSelect">
955 <xsl:with-param name="codes">ab</xsl:with-param>
956 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
962 <!-- NLM classification -->
963 <xsl:if test="marc:datafield[@tag=060]">
964 <span class="results_summary nlm">
965 <span class="label">NLM classification: </span>
966 <xsl:for-each select="marc:datafield[@tag=060]">
967 <xsl:call-template name="subfieldSelect">
968 <xsl:with-param name="codes">a</xsl:with-param>
969 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
971 <xsl:if test="not(position()=last())"><xsl:text> | </xsl:text></xsl:if>
976 <!-- Other classification -->
977 <xsl:if test="marc:datafield[@tag=084]">
978 <span class="results_summary oc">
979 <span class="label">Other classification: </span>
980 <xsl:for-each select="marc:datafield[@tag=084]">
981 <xsl:call-template name="subfieldSelect">
982 <xsl:with-param name="codes">a</xsl:with-param>
983 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
986 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
987 <xsl:otherwise> | </xsl:otherwise>
994 <!-- Image processing code added here, takes precedence over text links including y3z text -->
995 <xsl:if test="marc:datafield[@tag=856]">
996 <span class="results_summary online_resources"><span class="label">Online resources: </span>
998 <xsl:for-each select="marc:datafield[@tag=856]">
999 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
1000 <li><a property="url">
1002 <xsl:when test="$OPACTrackClicks='track'">
1003 <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>
1005 <xsl:when test="$OPACTrackClicks='anonymous'">
1006 <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>
1009 <xsl:attribute name="href">
1010 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
1012 <xsl:when test="@ind1=7">
1013 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
1015 <xsl:when test="@ind1=1">
1016 <xsl:text>ftp://</xsl:text>
1019 <xsl:text>http://</xsl:text>
1023 <xsl:value-of select="marc:subfield[@code='u']"/>
1027 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1028 <xsl:attribute name="target">_blank</xsl:attribute>
1031 <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')">
1032 <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>
1034 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1035 <xsl:call-template name="subfieldSelect">
1036 <xsl:with-param name="codes">y3z</xsl:with-param>
1037 </xsl:call-template>
1039 <xsl:when test="$URLLinkText!=''">
1040 <xsl:value-of select="$URLLinkText"/>
1043 <xsl:text>Click here to access online</xsl:text>
1053 <xsl:if test="marc:datafield[@tag=530]">
1054 <xsl:for-each select="marc:datafield[@tag=530]">
1055 <span class="results_summary additionalforms">
1056 <xsl:call-template name="subfieldSelect">
1057 <xsl:with-param name="codes">abcd</xsl:with-param>
1058 </xsl:call-template>
1059 <xsl:for-each select="marc:subfield[@code='u']">
1060 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1061 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1062 <xsl:attribute name="target">_blank</xsl:attribute>
1064 <xsl:value-of select="text()"/>
1071 <!-- 505 - Formatted contents note -->
1072 <xsl:if test="marc:datafield[@tag=505]">
1073 <div class="results_summary contents">
1074 <xsl:for-each select="marc:datafield[@tag=505]">
1075 <xsl:if test="position()=1">
1077 <xsl:when test="@ind1=1">
1078 <span class="label">Incomplete contents:</span>
1080 <xsl:when test="@ind1=2">
1081 <span class="label">Partial contents:</span>
1084 <span class="label">Contents:</span>
1088 <div class='contentblock' property='description'>
1090 <xsl:when test="@ind2=0">
1091 <xsl:call-template name="subfieldSelectSpan">
1092 <xsl:with-param name="newline">1</xsl:with-param>
1093 <xsl:with-param name="codes">trug</xsl:with-param>
1094 </xsl:call-template>
1097 <xsl:call-template name="subfieldSelectSpan">
1098 <xsl:with-param name="newline">1</xsl:with-param>
1099 <xsl:with-param name="codes">atrug</xsl:with-param>
1100 </xsl:call-template>
1109 <xsl:if test="marc:datafield[@tag=583 and not(@ind1=0)]">
1110 <span class="results_summary actionnote">
1111 <span class="label">Action note: </span>
1112 <xsl:for-each select="marc:datafield[@tag=583 and not(@ind1=0)]">
1114 <xsl:when test="marc:subfield[@code='z']">
1115 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1118 <xsl:call-template name="subfieldSelect">
1119 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1120 </xsl:call-template>
1123 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1129 <xsl:if test="marc:datafield[@tag=508]">
1130 <span class="results_summary prod_credits">
1131 <span class="label">Production credits: </span>
1132 <xsl:for-each select="marc:datafield[@tag=508]">
1133 <xsl:call-template name="subfieldSelectSpan">
1134 <xsl:with-param name="codes">a</xsl:with-param>
1135 </xsl:call-template>
1136 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1142 <xsl:if test="marc:datafield[@tag=586]">
1143 <span class="results_summary awardsnote">
1144 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1145 <span class="label">Awards: </span>
1147 <xsl:for-each select="marc:datafield[@tag=586]">
1148 <xsl:value-of select="marc:subfield[@code='a']"/>
1149 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1155 <xsl:if test="marc:datafield[@tag=773]">
1156 <xsl:for-each select="marc:datafield[@tag=773]">
1157 <xsl:if test="@ind1 !=1">
1158 <span class="results_summary in"><span class="label">
1160 <xsl:when test="@ind2=' '">
1163 <xsl:when test="@ind2=8">
1164 <xsl:if test="marc:subfield[@code='i']">
1165 <xsl:value-of select="marc:subfield[@code='i']"/>
1170 <xsl:variable name="f773">
1171 <xsl:call-template name="chopPunctuation">
1172 <xsl:with-param name="chopString">
1173 <xsl:call-template name="subfieldSelect">
1174 <xsl:with-param name="codes">a_t</xsl:with-param>
1175 </xsl:call-template>
1177 </xsl:call-template>
1180 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1181 <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>
1182 <xsl:value-of select="translate($f773, '()', '')"/>
1185 <xsl:when test="marc:subfield[@code='0']">
1186 <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>
1187 <xsl:value-of select="$f773"/>
1192 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''), true())"/><xsl:if test="marc:subfield[@code='a']">+AND+au:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'], '()', ''), true())"/></xsl:if></xsl:attribute>
1193 <xsl:value-of select="$f773"/>
1197 <xsl:if test="marc:subfield[@code='g']">
1198 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1202 <xsl:if test="marc:subfield[@code='n']">
1203 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1210 <xsl:for-each select="marc:datafield[@tag=511]">
1211 <span class="results_summary perf_note">
1212 <span class="label">
1213 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1215 <xsl:call-template name="subfieldSelect">
1216 <xsl:with-param name="codes">a</xsl:with-param>
1217 </xsl:call-template>
1221 <xsl:if test="marc:datafield[@tag=502]">
1222 <span class="results_summary diss_note">
1223 <span class="label">Dissertation note: </span>
1224 <xsl:for-each select="marc:datafield[@tag=502]">
1225 <xsl:call-template name="subfieldSelect">
1226 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1227 </xsl:call-template>
1229 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1233 <xsl:for-each select="marc:datafield[@tag=520]">
1234 <span class="results_summary summary"><span class="label">
1236 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1237 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1238 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1239 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1240 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1241 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1244 <xsl:call-template name="subfieldSelect">
1245 <xsl:with-param name="codes">abcu</xsl:with-param>
1246 </xsl:call-template>
1250 <!-- 866 textual holdings -->
1251 <xsl:if test="marc:datafield[@tag=866]">
1252 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1253 <xsl:for-each select="marc:datafield[@tag=866]">
1254 <span class="holdings_note_data">
1255 <xsl:call-template name="subfieldSelect">
1256 <xsl:with-param name="codes">az</xsl:with-param>
1257 </xsl:call-template>
1258 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1264 <!-- 867 textual holdings -->
1265 <xsl:if test="marc:datafield[@tag=867]">
1266 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1267 <xsl:for-each select="marc:datafield[@tag=867]">
1268 <span class="holdings_note_data">
1269 <xsl:call-template name="subfieldSelect">
1270 <xsl:with-param name="codes">az</xsl:with-param>
1271 </xsl:call-template>
1272 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1278 <!-- 868 textual holdings -->
1279 <xsl:if test="marc:datafield[@tag=868]">
1280 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1281 <xsl:for-each select="marc:datafield[@tag=868]">
1282 <span class="holdings_note_data">
1283 <xsl:call-template name="subfieldSelect">
1284 <xsl:with-param name="codes">az</xsl:with-param>
1285 </xsl:call-template>
1286 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1292 <!-- 770 - Supplement/Special issue entry -->
1293 <xsl:if test="marc:datafield[@tag=770]">
1294 <span class="results_summary supplement"><span class="label">Supplement: </span>
1295 <xsl:for-each select="marc:datafield[@tag=770]">
1296 <xsl:if test="marc:subfield[@code='i']">
1297 <span class="770_rel_info">
1298 <xsl:call-template name="subfieldSelect">
1299 <xsl:with-param name="codes">i</xsl:with-param>
1300 </xsl:call-template>
1301 <xsl:text> </xsl:text>
1306 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1307 <xsl:attribute name="href">
1308 /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>
1312 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute>
1316 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1317 <xsl:call-template name="subfieldSelect">
1318 <xsl:with-param name="codes">a_t</xsl:with-param>
1319 </xsl:call-template>
1323 <xsl:text> </xsl:text>
1324 <xsl:call-template name="subfieldSelect">
1325 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1326 </xsl:call-template>
1328 <xsl:when test="position()=last()"></xsl:when>
1329 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1335 <!-- 772 - Supplement parent entry -->
1336 <xsl:if test="marc:datafield[@tag=772]">
1337 <span class="results_summary supplement_parent"><span class="label">Supplement to: </span>
1338 <xsl:for-each select="marc:datafield[@tag=772]">
1339 <xsl:if test="marc:subfield[@code='i']">
1340 <span class="772_rel_info">
1341 <xsl:call-template name="subfieldSelect">
1342 <xsl:with-param name="codes">i</xsl:with-param>
1343 </xsl:call-template>
1344 <xsl:text> </xsl:text>
1349 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1350 <xsl:attribute name="href">
1351 /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>
1355 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute>
1359 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1360 <xsl:call-template name="subfieldSelect">
1361 <xsl:with-param name="codes">a_t</xsl:with-param>
1362 </xsl:call-template>
1366 <xsl:call-template name="subfieldSelect">
1367 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1368 </xsl:call-template>
1370 <xsl:when test="position()=last()"></xsl:when>
1371 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1377 <!-- 775 Other Edition -->
1378 <xsl:if test="marc:datafield[@tag=775]">
1379 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1380 <xsl:for-each select="marc:datafield[@tag=775]">
1381 <xsl:variable name="f775">
1382 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1383 <xsl:with-param name="codes">a_t</xsl:with-param>
1384 </xsl:call-template></xsl:with-param></xsl:call-template>
1386 <xsl:if test="marc:subfield[@code='i']">
1387 <xsl:call-template name="subfieldSelect">
1388 <xsl:with-param name="codes">i</xsl:with-param>
1389 </xsl:call-template>
1390 <xsl:text>: </xsl:text>
1394 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1395 <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>
1398 <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>
1401 <xsl:call-template name="subfieldSelect">
1402 <xsl:with-param name="codes">a_t</xsl:with-param>
1403 </xsl:call-template>
1406 <xsl:when test="position()=last()"></xsl:when>
1407 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1414 <xsl:if test="marc:datafield[@tag=780]">
1415 <xsl:for-each select="marc:datafield[@tag=780]">
1416 <xsl:if test="@ind1=0">
1417 <span class="results_summary preceeding_entry">
1419 <xsl:when test="@ind2=0">
1420 <span class="label">Continues:</span>
1422 <xsl:when test="@ind2=1">
1423 <span class="label">Continues in part:</span>
1425 <xsl:when test="@ind2=2">
1426 <span class="label">Supersedes:</span>
1428 <xsl:when test="@ind2=3">
1429 <span class="label">Supersedes in part:</span>
1431 <xsl:when test="@ind2=4">
1432 <span class="label">Formed by the union: ... and: ...</span>
1434 <xsl:when test="@ind2=5">
1435 <span class="label">Absorbed:</span>
1437 <xsl:when test="@ind2=6">
1438 <span class="label">Absorbed in part:</span>
1440 <xsl:when test="@ind2=7">
1441 <span class="label">Separated from:</span>
1444 <xsl:text> </xsl:text>
1446 <xsl:if test="marc:subfield[@code='i']">
1447 <span class="780_rel_info">
1448 <xsl:value-of select="marc:subfield[@code='i']"/>
1449 <xsl:text> </xsl:text>
1453 <xsl:variable name="f780">
1454 <xsl:call-template name="subfieldSelect">
1455 <xsl:with-param name="codes">a_t</xsl:with-param>
1456 </xsl:call-template>
1460 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1461 <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>
1462 <xsl:value-of select="$f780"/>
1466 <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>
1467 <xsl:value-of select="$f780"/>
1473 <xsl:if test="marc:subfield[@code='n']">
1474 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1482 <xsl:if test="marc:datafield[@tag=785]">
1483 <xsl:for-each select="marc:datafield[@tag=785]">
1484 <xsl:if test="@ind1=0">
1485 <span class="results_summary succeeding_entry">
1487 <xsl:when test="@ind2=0">
1488 <span class="label">Continued by:</span>
1490 <xsl:when test="@ind2=1">
1491 <span class="label">Continued in part by:</span>
1493 <xsl:when test="@ind2=2">
1494 <span class="label">Superseded by:</span>
1496 <xsl:when test="@ind2=3">
1497 <span class="label">Superseded in part by:</span>
1499 <xsl:when test="@ind2=4">
1500 <span class="label">Absorbed by:</span>
1502 <xsl:when test="@ind2=5">
1503 <span class="label">Absorbed in part by:</span>
1505 <xsl:when test="@ind2=6">
1506 <span class="label">Split into .. and ...:</span>
1508 <xsl:when test="@ind2=7">
1509 <span class="label">Merged with ... to form ...</span>
1511 <xsl:when test="@ind2=8">
1512 <span class="label">Changed back to:</span>
1515 <xsl:text> </xsl:text>
1517 <xsl:if test="marc:subfield[@code='i']">
1518 <span class="785_rel_info">
1519 <xsl:value-of select="marc:subfield[@code='i']"/>
1520 <xsl:text> </xsl:text>
1524 <xsl:variable name="f785">
1525 <xsl:call-template name="subfieldSelect">
1526 <xsl:with-param name="codes">a_t</xsl:with-param>
1527 </xsl:call-template>
1531 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1532 <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>
1533 <xsl:value-of select="$f785"/>
1537 <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>
1538 <xsl:value-of select="$f785"/>
1544 <xsl:if test="marc:subfield[@code='n']">
1545 <span class="results_summary succeeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1553 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
1554 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
1555 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
1556 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
1558 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
1559 <xsl:variable name="openurltext">
1561 <xsl:when test="$OpenURLText != ''">
1562 <xsl:value-of select="$OpenURLText" />
1565 <xsl:text>OpenURL</xsl:text>
1570 <span class="results_summary"><a>
1571 <xsl:attribute name="href">
1572 <xsl:value-of select="$OpenURLResolverURL" />
1574 <xsl:attribute name="title">
1575 <xsl:value-of select="$openurltext" />
1577 <xsl:attribute name="class">
1578 <xsl:text>OpenURL</xsl:text>
1580 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1581 <xsl:attribute name="target">
1582 <xsl:text>_blank</xsl:text>
1586 <xsl:when test="$OpenURLImageLocation != ''">
1588 <xsl:attribute name="src">
1589 <xsl:value-of select="$OpenURLImageLocation" />
1594 <xsl:value-of select="$openurltext" />
1599 <!-- End of OpenURL -->
1601 <xsl:variable name="OPACShowMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACShowMusicalInscripts']" />
1602 <xsl:variable name="OPACPlayMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACPlayMusicalInscripts']" />
1604 <xsl:if test="$OPACShowMusicalInscripts = 1 and marc:datafield[@tag=031]">
1605 <xsl:for-each select="marc:datafield[@tag=031]">
1607 <span class="results_summary musical_inscripts">
1608 <xsl:if test="marc:subfield[@code='u']">
1611 <xsl:attribute name="href">
1612 <xsl:value-of select="marc:subfield[@code='u']"/>
1614 <xsl:text>Audio file</xsl:text>
1618 <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']">
1619 <div class="inscript" data-system="pae">
1620 <xsl:attribute name="data-clef">
1621 <xsl:value-of select="marc:subfield[@code='g']"/>
1623 <xsl:attribute name="data-keysig">
1624 <xsl:value-of select="marc:subfield[@code='n']"/>
1626 <xsl:attribute name="data-timesig">
1627 <xsl:value-of select="marc:subfield[@code='o']"/>
1629 <xsl:attribute name="data-notation">
1630 <xsl:value-of select="marc:subfield[@code='p']"/>
1633 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1634 <div class="audio_controls hide">
1635 <button class="btn play_btn">
1636 <i id="carticon" class="fa fa-play"></i>
1637 <xsl:text> Play this sample</xsl:text>
1644 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1645 <div class="results_summary">
1646 <span class="inscript_audio hide"></span>
1654 <xsl:template name="showAuthor">
1655 <xsl:param name="authorfield" />
1656 <xsl:param name="UseAuthoritiesForTracings" />
1657 <xsl:param name="materialTypeLabel" />
1658 <xsl:param name="theme" />
1659 <xsl:if test="count($authorfield)>0">
1660 <span class="results_summary author h3">
1661 <xsl:for-each select="$authorfield">
1663 <xsl:when test="position()>1"/>
1665 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1666 <!--#13382 Changed Additional author to contributor -->
1667 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1670 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1671 <xsl:when test="marc:subfield[@code='n']">
1672 <xsl:text> </xsl:text>
1673 <xsl:call-template name="subfieldSelect">
1674 <xsl:with-param name="codes">n</xsl:with-param>
1675 </xsl:call-template>
1676 <xsl:text> </xsl:text>
1681 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1682 <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>
1685 <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>
1688 <xsl:attribute name="class">contributors</xsl:attribute>
1689 <span resource="#record"><span>
1691 <xsl:when test="substring(@tag, 1, 1)='1'">
1693 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1694 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1697 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1700 <xsl:when test="substring(@tag, 2, 1)='0'">
1702 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1703 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1706 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1708 <span property="name">
1710 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1712 <xsl:call-template name="chopPunctuation">
1713 <xsl:with-param name="chopString">
1714 <xsl:call-template name="subfieldSelect">
1715 <xsl:with-param name="codes">
1717 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1718 <xsl:when test="@tag=111">aeq</xsl:when>
1719 <xsl:when test="@tag=110">ab</xsl:when>
1720 <xsl:otherwise>abcjq</xsl:otherwise>
1723 </xsl:call-template>
1725 <xsl:with-param name="punctuation">
1726 <xsl:text>:,;/ </xsl:text>
1728 </xsl:call-template>
1729 <!-- Display only name and title portion in 110 field -->
1730 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1731 <span class="titleportion">
1733 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1734 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1736 <xsl:call-template name="chopPunctuation">
1737 <xsl:with-param name="chopString">
1738 <xsl:call-template name="subfieldSelect">
1739 <xsl:with-param name="codes">cdnt</xsl:with-param>
1740 </xsl:call-template>
1742 </xsl:call-template>
1745 <!-- Display only name and title portion in 111 field -->
1746 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1747 <span class="titleportion">
1749 <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>
1750 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1753 <xsl:call-template name="chopPunctuation">
1754 <xsl:with-param name="chopString">
1755 <xsl:call-template name="subfieldSelect">
1756 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1757 </xsl:call-template>
1759 </xsl:call-template>
1762 <!-- Display only dates in 100 field -->
1763 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1764 <span class="authordates">
1765 <xsl:text>, </xsl:text>
1766 <xsl:call-template name="chopPunctuation">
1767 <xsl:with-param name="chopString">
1768 <xsl:call-template name="subfieldSelect">
1769 <xsl:with-param name="codes">d</xsl:with-param>
1770 </xsl:call-template>
1772 </xsl:call-template>
1776 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1777 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1778 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1779 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1780 <xsl:if test="@tag=710 or @tag=711">
1781 <xsl:call-template name="chopPunctuation">
1782 <xsl:with-param name="chopString">
1783 <xsl:call-template name="subfieldSelect">
1784 <xsl:with-param name="codes">
1786 <xsl:when test="@tag=711">aeq</xsl:when>
1787 <xsl:otherwise>ab</xsl:otherwise>
1790 </xsl:call-template>
1792 <xsl:with-param name="punctuation">
1793 <xsl:text>:,;/ </xsl:text>
1795 </xsl:call-template>
1796 <!-- Display only name and title portion in 711 field -->
1797 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1798 <span class="titleportion">
1800 <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>
1801 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1804 <xsl:call-template name="chopPunctuation">
1805 <xsl:with-param name="chopString">
1806 <xsl:call-template name="subfieldSelect">
1807 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1808 </xsl:call-template>
1810 </xsl:call-template>
1813 <!-- Display only name and title portion in 710 field -->
1814 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1815 <span class="titleportion">
1817 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1818 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1820 <xsl:call-template name="chopPunctuation">
1821 <xsl:with-param name="chopString">
1822 <xsl:call-template name="subfieldSelect">
1823 <xsl:with-param name="codes">cdnt</xsl:with-param>
1824 </xsl:call-template>
1826 </xsl:call-template>
1831 <!-- Display only name portion in 700 field -->
1832 <xsl:if test="@tag=700">
1833 <xsl:call-template name="chopPunctuation">
1834 <xsl:with-param name="chopString">
1835 <xsl:call-template name="subfieldSelect">
1836 <xsl:with-param name="codes">abcq</xsl:with-param>
1837 </xsl:call-template>
1839 </xsl:call-template>
1841 <!-- Display class "authordates" in 700 field -->
1842 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1843 <span class="authordates">
1844 <xsl:text>, </xsl:text>
1845 <xsl:call-template name="chopPunctuation">
1846 <xsl:with-param name="chopString">
1847 <xsl:call-template name="subfieldSelect">
1848 <xsl:with-param name="codes">d</xsl:with-param>
1849 </xsl:call-template>
1851 </xsl:call-template>
1854 <!-- Display class "titleportion" in 700 field -->
1855 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1856 <xsl:if test="@tag=700 and $titleportionfields">
1857 <span class="titleportion">
1858 <xsl:text>. </xsl:text>
1859 <xsl:call-template name="chopPunctuation">
1860 <xsl:with-param name="chopString">
1861 <xsl:call-template name="subfieldSelect">
1862 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1863 </xsl:call-template>
1865 </xsl:call-template>
1871 </span></span></span>
1873 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1874 <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'])">
1876 <span class="relatorcode">
1877 <xsl:text> [</xsl:text>
1879 <xsl:when test="@tag=111 or @tag=711">
1881 <!-- Prefer j over 4 for 111 and 711 -->
1882 <xsl:when test="marc:subfield[@code='j']">
1883 <xsl:for-each select="marc:subfield[@code='j']">
1884 <xsl:value-of select="."/>
1885 <xsl:if test="position() != last()">, </xsl:if>
1889 <xsl:for-each select="marc:subfield[@code=4]">
1890 <xsl:value-of select="."/>
1891 <xsl:if test="position() != last()">, </xsl:if>
1896 <!-- Prefer e over 4 on 100 and 110-->
1897 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1898 <xsl:for-each select="marc:subfield[@code='e']">
1899 <xsl:value-of select="."/>
1900 <xsl:if test="position() != last()">, </xsl:if>
1904 <xsl:for-each select="marc:subfield[@code=4]">
1905 <xsl:value-of select="."/>
1906 <xsl:if test="position() != last()">, </xsl:if>
1910 <xsl:text>]</xsl:text>
1914 <xsl:if test="marc:subfield[@code=9]">
1915 <a class='authlink'>
1916 <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>
1917 <xsl:element name="i">
1918 <xsl:attribute name="class">fa fa-search</xsl:attribute>
1923 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1930 <xsl:template name="nameABCQ">
1931 <xsl:call-template name="chopPunctuation">
1932 <xsl:with-param name="chopString">
1933 <xsl:call-template name="subfieldSelect">
1934 <xsl:with-param name="codes">abcq</xsl:with-param>
1935 </xsl:call-template>
1937 <xsl:with-param name="punctuation">
1938 <xsl:text>:,;/ </xsl:text>
1940 </xsl:call-template>
1943 <xsl:template name="nameABCDN">
1944 <xsl:call-template name="chopPunctuation">
1945 <xsl:with-param name="chopString">
1946 <xsl:call-template name="subfieldSelect">
1947 <xsl:with-param name="codes">abcdn</xsl:with-param>
1948 </xsl:call-template>
1950 <xsl:with-param name="punctuation">
1951 <xsl:text>:,;/ </xsl:text>
1953 </xsl:call-template>
1956 <xsl:template name="nameACDEQ">
1957 <xsl:call-template name="subfieldSelect">
1958 <xsl:with-param name="codes">acdeq</xsl:with-param>
1959 </xsl:call-template>
1962 <xsl:template name="specialSubfieldSelect">
1963 <xsl:param name="anyCodes"/>
1964 <xsl:param name="axis"/>
1965 <xsl:param name="beforeCodes"/>
1966 <xsl:param name="afterCodes"/>
1967 <xsl:variable name="str">
1968 <xsl:for-each select="marc:subfield">
1969 <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])">
1970 <xsl:value-of select="text()"/>
1971 <xsl:text> </xsl:text>
1975 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1978 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1979 <xsl:template name="subfieldSelectSubject">
1980 <xsl:param name="codes"/>
1981 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1982 <xsl:param name="subdivCodes"/>
1983 <xsl:param name="subdivDelimiter"/>
1984 <xsl:param name="prefix"/>
1985 <xsl:param name="suffix"/>
1986 <xsl:param name="urlencode"/>
1987 <xsl:variable name="str">
1988 <xsl:for-each select="marc:subfield">
1989 <xsl:if test="contains($codes, @code)">
1990 <xsl:if test="contains($subdivCodes, @code)">
1991 <xsl:value-of select="$subdivDelimiter"/>
1993 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1998 <xsl:when test="$urlencode=1">
1999 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
2002 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>