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="AuthorLinkSortBy" select="marc:sysprefs/marc:syspref[@name='AuthorLinkSortBy']"/>
30 <xsl:variable name="AuthorLinkSortOrder" select="marc:sysprefs/marc:syspref[@name='AuthorLinkSortOrder']"/>
31 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
32 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
33 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
34 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
35 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
36 <xsl:variable name="TracingQuotesLeft">
38 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICUStyleQuotes']='1'">{</xsl:when>
39 <xsl:otherwise>"</xsl:otherwise>
42 <xsl:variable name="TracingQuotesRight">
44 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICUStyleQuotes']='1'">}</xsl:when>
45 <xsl:otherwise>"</xsl:otherwise>
48 <xsl:variable name="leader" select="marc:leader"/>
49 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
50 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
51 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
52 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
53 <xsl:variable name="materialTypeCode">
55 <xsl:when test="$leader19='a'">ST</xsl:when>
56 <xsl:when test="$leader6='a'">
58 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
59 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
60 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
63 <xsl:when test="$leader6='t'">BK</xsl:when>
64 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
65 <xsl:when test="$leader6='m'">CF</xsl:when>
66 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
67 <xsl:when test="$leader6='g'">VM</xsl:when>
68 <xsl:when test="$leader6='k'">PK</xsl:when>
69 <xsl:when test="$leader6='r'">OB</xsl:when>
70 <xsl:when test="$leader6='i'">MU</xsl:when>
71 <xsl:when test="$leader6='j'">MU</xsl:when>
72 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
75 <xsl:variable name="materialTypeLabel">
77 <xsl:when test="$leader19='a'">Set</xsl:when>
78 <xsl:when test="$leader6='a'">
80 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Text</xsl:when>
81 <xsl:when test="$leader7='i' or $leader7='s'">
83 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
84 <xsl:otherwise>Series</xsl:otherwise>
87 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
90 <xsl:when test="$leader6='t'">Text</xsl:when>
91 <xsl:when test="$leader6='o'">Kit</xsl:when>
92 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
93 <xsl:when test="$leader6='m'">Computer file</xsl:when>
94 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
95 <xsl:when test="$leader6='g'">Film</xsl:when>
96 <xsl:when test="$leader6='k'">Picture</xsl:when>
97 <xsl:when test="$leader6='r'">Object</xsl:when>
98 <xsl:when test="$leader6='j'">Music</xsl:when>
99 <xsl:when test="$leader6='i'">Sound</xsl:when>
100 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
104 <!-- Schema.org type -->
105 <xsl:variable name="schemaOrgType">
107 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
108 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
109 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
110 <xsl:otherwise>CreativeWork</xsl:otherwise>
114 <!-- Wrapper div for our schema.org object -->
115 <xsl:element name="div">
116 <xsl:attribute name="class"><xsl:value-of select="'record'" /></xsl:attribute>
117 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
118 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
119 <xsl:attribute name="resource">#record</xsl:attribute>
121 <!-- Title Statement -->
122 <!-- Alternate Graphic Representation (MARC 880) -->
123 <xsl:if test="$display880">
124 <h2 class="title" property="alternateName">
125 <xsl:call-template name="m880Select">
126 <xsl:with-param name="basetags">245</xsl:with-param>
127 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
133 <xsl:if test="marc:datafield[@tag=245]">
134 <h1 class="title" property="name">
135 <xsl:for-each select="marc:datafield[@tag=245]">
136 <xsl:call-template name="subfieldSelect">
137 <xsl:with-param name="codes">a</xsl:with-param>
139 <xsl:text> </xsl:text>
140 <!-- 13381 add additional subfields-->
141 <!-- bug17625 adding f and g subfields -->
142 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
144 <xsl:when test="@code='h'">
145 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
146 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
148 <xsl:when test="@code='c'">
149 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
150 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
153 <xsl:apply-templates/>
154 <xsl:text> </xsl:text>
163 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
164 <xsl:if test="$display880">
165 <span class="results_summary author h3">
166 <xsl:call-template name="m880Select">
167 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
168 <xsl:with-param name="codes">abc</xsl:with-param>
169 <xsl:with-param name="index">au</xsl:with-param>
170 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
175 <!--#13382 Added Author Statement to separate Authors and Contributors -->
176 <xsl:call-template name="showAuthor">
177 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=100 or @tag=110 or @tag=111)]"/>
178 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
179 <xsl:with-param name="AuthorLinkSortOrder" select="$AuthorLinkSortOrder"/>
180 <xsl:with-param name="AuthorLinkSortBy" select="$AuthorLinkSortBy"/>
181 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
182 <xsl:with-param name="theme" select="$theme"/>
185 <xsl:call-template name="showAuthor">
186 <!-- #13382 suppress 700$i and 7xx/@ind2=2 -->
187 <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'])]"/>
188 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
189 <xsl:with-param name="AuthorLinkSortOrder" select="$AuthorLinkSortOrder"/>
190 <xsl:with-param name="AuthorLinkSortBy" select="$AuthorLinkSortBy"/>
191 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
192 <xsl:with-param name="theme" select="$theme"/>
195 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
196 <xsl:if test="$materialTypeCode!=''">
197 <span class="results_summary type"><span class="label">Material type: </span>
198 <xsl:element name="img">
199 <xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute>
200 <xsl:attribute name="alt"><xsl:value-of select="$materialTypeLabel"/></xsl:attribute>
201 <xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute>
203 <xsl:value-of select="$materialTypeLabel"/>
209 <!-- Publisher or Distributor Number -->
210 <xsl:if test="marc:datafield[@tag=028]">
211 <span class="results_summary publisher_number ">
212 <span class="label">Publisher number: </span>
213 <xsl:for-each select="marc:datafield[@tag=028]">
214 <xsl:call-template name="subfieldSelect">
215 <xsl:with-param name="codes">abq</xsl:with-param>
216 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
222 <xsl:call-template name="show-lang-041"/>
224 <!--Series: Alternate Graphic Representation (MARC 880) -->
225 <xsl:if test="$display880">
226 <xsl:call-template name="m880Select">
227 <xsl:with-param name="basetags">440,490</xsl:with-param>
228 <xsl:with-param name="codes">av</xsl:with-param>
229 <xsl:with-param name="class">results_summary series</xsl:with-param>
230 <xsl:with-param name="label">Series: </xsl:with-param>
231 <xsl:with-param name="index">se</xsl:with-param>
235 <xsl:call-template name="show-series">
236 <xsl:with-param name="searchurl">/cgi-bin/koha/opac-search.pl</xsl:with-param>
237 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
238 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
241 <!-- Analytics information -->
242 <xsl:variable name="leader7_class">
244 <!--xsl:when test="$leader7='a'">analytic_mcp</xsl:when-->
245 <!--xsl:when test="$leader7='b'">analytic_scp</xsl:when-->
246 <xsl:when test="$leader7='c'">analytic_collection</xsl:when>
247 <xsl:when test="$leader7='d'">analytic_subunit</xsl:when>
248 <xsl:when test="$leader7='i'">analytic_ires</xsl:when>
249 <xsl:when test="$leader7='m'">analytic_monograph</xsl:when>
250 <xsl:when test="$leader7='s'">analytic_serial</xsl:when>
251 <xsl:otherwise>analytic_undefined</xsl:otherwise>
255 <xsl:variable name="show_analytics_link" select="marc:variables/marc:variable[@name='show_analytics_link']" />
256 <xsl:if test="$show_analytics_link='1'">
257 <xsl:element name="span">
258 <xsl:attribute name="class">results_summary analytics <xsl:value-of select="$leader7_class"/></xsl:attribute>
259 <span class="label">Analytics: </span>
262 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
263 <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>
266 <xsl:variable name="title_query">
267 <xsl:value-of select="'Host-item:('"/>
268 <xsl:call-template name="quote_search_term">
269 <xsl:with-param name="term"><xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='a']"/></xsl:with-param>
271 <xsl:text>)</xsl:text>
273 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($title_query, true())"/></xsl:attribute>
276 <xsl:text>Show analytics</xsl:text>
281 <!-- Volumes of sets and traced series -->
282 <xsl:variable name="show_volumes_link" select="marc:variables/marc:variable[@name='show_volumes_link']" />
283 <xsl:variable name="title" select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())" />
284 <xsl:if test="$show_volumes_link='1' and ($materialTypeCode='ST' or substring($controlField008,22,1)='m')">
285 <span class="results_summary volumes"><span class="label">Volumes: </span>
288 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
289 <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>
292 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:"<xsl:value-of select="$title"/>"+OR+host-item,phr="<xsl:value-of select="$title"/>"+NOT+(bib-level:a+OR+bib-level:b)</xsl:attribute>
295 <xsl:text>Show volumes</xsl:text>
301 <xsl:if test="$leader19='c'">
302 <span class="results_summary set"><span class="label">Set: </span>
303 <xsl:for-each select="marc:datafield[@tag=773]">
306 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
307 <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>
310 <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>
313 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
316 <xsl:when test="position()=last()"></xsl:when>
317 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
323 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
324 <xsl:if test="$display880">
325 <xsl:call-template name="m880Select">
326 <xsl:with-param name="basetags">260,264</xsl:with-param>
327 <xsl:with-param name="codes">abcg</xsl:with-param>
328 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
329 <xsl:with-param name="label">Publication details: </xsl:with-param>
333 <!-- Publisher info and RDA related info from tags 260, 264 -->
335 <xsl:when test="marc:datafield[@tag=264]">
336 <xsl:call-template name="showRDAtag264">
337 <xsl:with-param name="show_url">1</xsl:with-param>
340 <xsl:when test="marc:datafield[@tag=260]">
341 <span class="results_summary publisher"><span class="label">Publication details: </span>
342 <xsl:for-each select="marc:datafield[@tag=260]">
343 <xsl:for-each select="marc:subfield">
344 <xsl:if test="@code='a'">
345 <span class="publisher_place" property="location">
347 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
348 <xsl:value-of select="current()"/>
352 <xsl:if test="@code='b'">
353 <span property="publisher" typeof="Organization">
354 <span property="name" class="publisher_name">
355 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
356 <xsl:value-of select="current()"/>
361 <xsl:if test="@code='c'">
362 <span property="datePublished" class="publisher_date">
364 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
365 <xsl:value-of select="current()"/>
369 <xsl:if test="@code='g'">
370 <span property="datePublished" class="publisher_date">
371 <xsl:call-template name="chopPunctuation">
372 <xsl:with-param name="chopString">
373 <xsl:value-of select="current()"/>
378 <xsl:if test="position() != last()">
379 <xsl:text> </xsl:text>
382 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
388 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
389 <xsl:if test="$display880">
390 <xsl:call-template name="m880Select">
391 <xsl:with-param name="basetags">250</xsl:with-param>
392 <xsl:with-param name="codes">ab</xsl:with-param>
393 <xsl:with-param name="class">results_summary edition</xsl:with-param>
394 <xsl:with-param name="label">Edition: </xsl:with-param>
398 <xsl:if test="marc:datafield[@tag=250]">
399 <span class="results_summary edition"><span class="label">Edition: </span>
400 <xsl:for-each select="marc:datafield[@tag=250]">
401 <span property="bookEdition">
402 <xsl:call-template name="chopPunctuation">
403 <xsl:with-param name="chopString">
404 <xsl:call-template name="subfieldSelect">
405 <xsl:with-param name="codes">ab</xsl:with-param>
410 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
415 <!-- Description: Alternate Graphic Representation (MARC 880) -->
416 <xsl:if test="$display880">
417 <xsl:call-template name="m880Select">
418 <xsl:with-param name="basetags">300</xsl:with-param>
419 <xsl:with-param name="codes">abceg</xsl:with-param>
420 <xsl:with-param name="class">results_summary description</xsl:with-param>
421 <xsl:with-param name="label">Description: </xsl:with-param>
425 <xsl:if test="marc:datafield[@tag=300]">
426 <span class="results_summary description"><span class="label">Description: </span>
427 <xsl:for-each select="marc:datafield[@tag=300]">
428 <span property="description">
429 <xsl:call-template name="chopPunctuation">
430 <xsl:with-param name="chopString">
431 <xsl:call-template name="subfieldSelect">
432 <xsl:with-param name="codes">abcefg</xsl:with-param>
437 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
443 <!-- Content Type -->
444 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
445 <span class="results_summary" id="content_type">
446 <xsl:if test="marc:datafield[@tag=336]">
447 <span class="label">Content type: </span>
448 <ul class="resource_list">
449 <xsl:for-each select="marc:datafield[@tag=336]">
451 <xsl:call-template name="subfieldSelect">
452 <xsl:with-param name="codes">a</xsl:with-param>
453 <xsl:with-param name="delimeter">, </xsl:with-param>
459 <xsl:text> </xsl:text>
461 <xsl:if test="marc:datafield[@tag=337]">
462 <span class="label">Media type: </span>
463 <ul class="resource_list">
464 <xsl:for-each select="marc:datafield[@tag=337]">
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>
474 <xsl:text> </xsl:text>
476 <xsl:if test="marc:datafield[@tag=338]">
477 <span class="label">Carrier type: </span>
478 <ul class="resource_list">
479 <xsl:for-each select="marc:datafield[@tag=338]">
481 <xsl:call-template name="subfieldSelect">
482 <xsl:with-param name="codes">a</xsl:with-param>
483 <xsl:with-param name="delimeter">, </xsl:with-param>
492 <!-- 385 - Audience -->
493 <xsl:if test="marc:datafield[@tag=385]">
494 <span class="results_summary audience">
495 <span class="label">Audience: </span>
496 <ul class="resource_list">
497 <xsl:for-each select="marc:datafield[@tag=385]">
499 <xsl:if test="marc:subfield[@code='m']">
500 <xsl:call-template name="chopPunctuation">
501 <xsl:with-param name="chopString">
502 <xsl:call-template name="subfieldSelect">
503 <xsl:with-param name="codes">m</xsl:with-param>
507 <xsl:text>: </xsl:text>
509 <xsl:call-template name="chopPunctuation">
510 <xsl:with-param name="chopString">
511 <xsl:call-template name="subfieldSelect">
512 <xsl:with-param name="codes">a</xsl:with-param>
513 <xsl:with-param name="delimeter">, </xsl:with-param>
523 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
524 <span class="results_summary isbn"><span class="label">ISBN: </span>
525 <ul class="resource_list">
526 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
528 <span property="isbn">
529 <xsl:value-of select="."/>
538 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
539 <span class="results_summary issn"><span class="label">ISSN: </span>
540 <ul class="resource_list">
541 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
543 <span property="issn">
544 <xsl:value-of select="."/>
552 <xsl:if test="marc:datafield[@tag=013]">
553 <span class="results_summary patent_info">
554 <span class="label">Patent information: </span>
555 <xsl:for-each select="marc:datafield[@tag=013]">
556 <xsl:call-template name="subfieldSelect">
557 <xsl:with-param name="codes">acdef</xsl:with-param>
558 <xsl:with-param name="delimeter">, </xsl:with-param>
560 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
565 <xsl:if test="marc:datafield[@tag=088]">
566 <span class="results_summary report_number">
567 <span class="label">Report number: </span>
568 <xsl:for-each select="marc:datafield[@tag=088]">
569 <xsl:call-template name="subfieldSelect">
570 <xsl:with-param name="codes">a</xsl:with-param>
572 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
577 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
578 <xsl:if test="$display880">
579 <xsl:call-template name="m880Select">
580 <xsl:with-param name="basetags">246</xsl:with-param>
581 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
582 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
583 <xsl:with-param name="label">Other title: </xsl:with-param>
587 <xsl:if test="marc:datafield[@tag=246]">
588 <span class="results_summary other_title">
589 <span class="label">Other title: </span>
590 <ul class="resource_list">
591 <xsl:for-each select="marc:datafield[@tag=246]">
593 <span property="alternateName">
594 <xsl:call-template name="chopPunctuation">
595 <xsl:with-param name="chopString">
596 <xsl:if test="marc:subfield[@code='i']">
597 <xsl:call-template name="subfieldSelect">
598 <xsl:with-param name="codes">i</xsl:with-param>
601 <xsl:text> </xsl:text>
602 <xsl:call-template name="subfieldSelect">
603 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
607 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
609 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
610 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
611 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
612 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
613 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
614 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
615 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
616 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
617 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
628 <xsl:if test="marc:datafield[@tag=242]">
629 <span class="results_summary translated_title"><span class="label">Title translated: </span>
630 <xsl:for-each select="marc:datafield[@tag=242]">
631 <span property="alternateName">
632 <xsl:call-template name="chopPunctuation">
633 <xsl:with-param name="chopString">
634 <xsl:call-template name="subfieldSelect">
635 <xsl:with-param name="codes">abchnp</xsl:with-param>
640 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
645 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
646 <xsl:if test="$display880">
647 <span property="alternateName">
648 <xsl:call-template name="m880Select">
649 <xsl:with-param name="basetags">130,240</xsl:with-param>
650 <xsl:with-param name="codes">adfklmor</xsl:with-param>
651 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
652 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
657 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
658 <span class="results_summary uniform_titles">
659 <span class="label">Uniform titles: </span>
660 <ul class="resource_list">
661 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
663 <span property="alternateName">
664 <xsl:if test="marc:subfield[@code='i']">
665 <xsl:call-template name="subfieldSelect">
666 <xsl:with-param name="codes">i</xsl:with-param>
669 <xsl:text> </xsl:text>
670 <xsl:for-each select="marc:subfield">
671 <xsl:if test="contains('adfghklmnoprst',@code)">
672 <xsl:value-of select="text()"/>
673 <xsl:text> </xsl:text>
684 <!-- #13382 Added Related works 700$i -->
685 <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']]">
686 <span class="results_summary related_works">
687 <span class="label">Related works: </span>
688 <ul class="resource_list">
689 <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']]">
691 <xsl:variable name="str">
692 <xsl:call-template name="subfieldSelect">
693 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
696 <xsl:call-template name="chopPunctuation">
697 <xsl:with-param name="chopString">
698 <xsl:value-of select="$str"/>
701 <!-- add relator code too between brackets-->
702 <xsl:if test="marc:subfield[@code='4' or @code='e']">
703 <span class="relatorcode">
704 <xsl:text> [</xsl:text>
706 <xsl:when test="marc:subfield[@code='e']">
707 <xsl:for-each select="marc:subfield[@code='e']">
708 <xsl:value-of select="."/>
709 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
713 <xsl:for-each select="marc:subfield[@code='4']">
714 <xsl:value-of select="."/>
715 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
719 <xsl:text>]</xsl:text>
728 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
729 <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'])]">
730 <span class="results_summary contained_works">
731 <span class="label">Contained works: </span>
732 <ul class="resource_list">
733 <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'])]">
735 <xsl:variable name="str">
736 <xsl:call-template name="subfieldSelect">
737 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
740 <xsl:call-template name="chopPunctuation">
741 <xsl:with-param name="chopString">
742 <xsl:value-of select="$str"/>
745 <!-- add relator code too between brackets-->
746 <xsl:if test="marc:subfield[@code='4' or @code='e']">
747 <span class="relatorcode">
748 <xsl:text> [</xsl:text>
750 <xsl:when test="marc:subfield[@code='e']">
751 <xsl:for-each select="marc:subfield[@code='e']">
752 <xsl:value-of select="."/>
753 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
757 <xsl:for-each select="marc:subfield[@code='4']">
758 <xsl:value-of select="."/>
759 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
763 <xsl:text>]</xsl:text>
772 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
773 <span class="results_summary subjects">
774 <span class="label">Subject(s): </span>
775 <ul class="resource_list">
776 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
778 <span property="keywords">
780 <xsl:attribute name="class">subject</xsl:attribute>
782 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
783 <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>
785 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
786 <xsl:when test="$TraceSubjectSubdivisions='1'">
787 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
788 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
789 <xsl:with-param name="delimeter"> AND </xsl:with-param>
790 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
791 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
792 <xsl:with-param name="urlencode">1</xsl:with-param>
796 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
798 <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>
801 <xsl:call-template name="chopPunctuation">
802 <xsl:with-param name="chopString">
803 <xsl:call-template name="subfieldSelect">
804 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
805 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
806 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
812 <xsl:if test="marc:subfield[@code=9]">
814 <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>
815 <xsl:element name="i">
816 <xsl:attribute name="class">fa fa-search</xsl:attribute>
827 <xsl:if test="marc:datafield[@tag=655]">
828 <span class="results_summary genre">
829 <span class="label">Genre/Form: </span>
830 <ul class="resource_list">
831 <xsl:for-each select="marc:datafield[@tag=655]">
835 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
836 <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>
838 <xsl:when test="$TraceSubjectSubdivisions='1'">
839 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
840 <xsl:with-param name="codes">avxyz</xsl:with-param>
841 <xsl:with-param name="delimeter"> AND </xsl:with-param>
842 <xsl:with-param name="prefix">(index-term-genre<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
843 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
844 <xsl:with-param name="urlencode">1</xsl:with-param>
849 <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>
852 <xsl:call-template name="subfieldSelect">
853 <xsl:with-param name="codes">avxyz</xsl:with-param>
854 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
855 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
858 <xsl:if test="marc:subfield[@code=9]">
859 <xsl:text> </xsl:text>
861 <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>
862 <xsl:element name="i">
863 <xsl:attribute name="class">fa fa-search</xsl:attribute>
873 <!-- MARC21 776 Additional Physical Form Entry -->
874 <xsl:if test="marc:datafield[@tag=776]">
875 <span class="results_summary add_physical_form">
876 <span class="label">Additional physical formats: </span>
877 <xsl:for-each select="marc:datafield[@tag=776]">
878 <xsl:variable name="linktext">
880 <xsl:when test="marc:subfield[@code='t']">
881 <xsl:value-of select="marc:subfield[@code='t']"/>
883 <xsl:when test="marc:subfield[@code='a']">
884 <xsl:value-of select="marc:subfield[@code='a']"/>
887 <xsl:text>No title</xsl:text>
891 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
892 <xsl:call-template name="subfieldSelect">
893 <xsl:with-param name="codes">i</xsl:with-param>
895 <xsl:text>: </xsl:text>
898 <xsl:when test="marc:subfield[@code='w']">
900 <xsl:attribute name="href">
901 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
902 <xsl:call-template name="extractControlNumber">
903 <xsl:with-param name="subfieldW">
904 <xsl:value-of select="marc:subfield[@code='w']"/>
908 <xsl:value-of select="$linktext"/>
912 <xsl:value-of select="$linktext"/>
915 <xsl:if test="position() != last()">
916 <xsl:text>; </xsl:text>
922 <!-- MARC21 777 - Issued With Entry -->
923 <xsl:if test="marc:datafield[@tag=777]">
924 <xsl:for-each select="marc:datafield[@tag=777]">
925 <xsl:if test="@ind1 != 1">
926 <span class="results_summary issued_with">
929 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
930 <xsl:value-of select="marc:subfield[@code='i']"/>
933 <xsl:text>Issued with:</xsl:text>
936 <xsl:text> </xsl:text>
938 <xsl:variable name="f777">
939 <xsl:call-template name="chopPunctuation">
940 <xsl:with-param name="chopString">
941 <xsl:call-template name="subfieldSelect">
942 <xsl:with-param name="codes">a_t</xsl:with-param>
948 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
949 <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>
950 <xsl:value-of select="translate($f777, '()', '')"/>
954 <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>
955 <xsl:value-of select="$f777"/>
959 <xsl:if test="marc:subfield[@code='g']">
960 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
963 <xsl:if test="marc:subfield[@code='n']">
964 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
970 <!-- DDC classification -->
971 <xsl:if test="marc:datafield[@tag=082]">
972 <span class="results_summary ddc">
973 <span class="label">DDC classification: </span>
974 <ul class="resource_list">
975 <xsl:for-each select="marc:datafield[@tag=082]">
977 <xsl:call-template name="subfieldSelect">
978 <xsl:with-param name="codes">a2b</xsl:with-param>
979 <xsl:with-param name="delimeter"><xsl:text> </xsl:text></xsl:with-param>
987 <!-- LOC classification -->
988 <xsl:if test="marc:datafield[@tag=050]">
989 <span class="results_summary loc">
990 <span class="label">LOC classification: </span>
991 <ul class="resource_list">
992 <xsl:for-each select="marc:datafield[@tag=050]">
994 <xsl:call-template name="subfieldSelect">
995 <xsl:with-param name="codes">ab</xsl:with-param>
996 <xsl:with-param name="delimeter"><xsl:text> </xsl:text></xsl:with-param>
1004 <!-- NLM classification -->
1005 <xsl:if test="marc:datafield[@tag=060]">
1006 <span class="results_summary nlm">
1007 <span class="label">NLM classification: </span>
1008 <ul class="resource_list">
1009 <xsl:for-each select="marc:datafield[@tag=060]">
1011 <xsl:call-template name="subfieldSelect">
1012 <xsl:with-param name="codes">a</xsl:with-param>
1013 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
1014 </xsl:call-template>
1021 <!-- Other classification -->
1022 <xsl:if test="marc:datafield[@tag=084]">
1023 <span class="results_summary oc">
1024 <span class="label">Other classification: </span>
1025 <ul class="resource_list">
1026 <xsl:for-each select="marc:datafield[@tag=084]">
1028 <xsl:call-template name="subfieldSelect">
1029 <xsl:with-param name="codes">a</xsl:with-param>
1030 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
1031 </xsl:call-template>
1039 <!-- Image processing code added here, takes precedence over text links including y3z text -->
1040 <xsl:if test="marc:datafield[@tag=856]">
1041 <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']">
1042 <span class="results_summary online_resources">
1043 <span class="label">Online resources: </span>
1044 <xsl:for-each select="marc:datafield[@tag=856]">
1045 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
1048 <xsl:when test="$OPACTrackClicks='track'">
1049 <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>
1051 <xsl:when test="$OPACTrackClicks='anonymous'">
1052 <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>
1055 <xsl:attribute name="href">
1056 <xsl:call-template name="AddMissingProtocol">
1057 <xsl:with-param name="resourceLocation" select="marc:subfield[@code='u']"/>
1058 <xsl:with-param name="indicator1" select="@ind1"/>
1059 <xsl:with-param name="accessMethod" select="marc:subfield[@code='2']"/>
1060 </xsl:call-template>
1061 <xsl:value-of select="marc:subfield[@code='u']"/>
1063 <xsl:if test="not(marc:subfield[@code='u'])">
1064 <xsl:attribute name="style">pointer-events: none; color: #202020;</xsl:attribute>
1068 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1069 <xsl:attribute name="target">_blank</xsl:attribute>
1072 <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')">
1073 <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>
1075 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z'] and marc:subfield[@code='u']">
1076 <xsl:call-template name="subfieldSelect">
1077 <xsl:with-param name="codes">y3z</xsl:with-param>
1078 </xsl:call-template>
1080 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
1082 <xsl:when test="$URLLinkText!=''">
1083 <xsl:value-of select="$URLLinkText"/>
1085 <xsl:when test="marc:subfield[@code='u']">
1086 <xsl:text>Click here to access online</xsl:text>
1093 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1094 <xsl:when test="(marc:subfield[@code='y'] or marc:subfield[@code='3'] or marc:subfield[@code='z'] or marc:subfield[@code='u']) and marc:subfield[@code='u']"><xsl:text> | </xsl:text></xsl:when>
1101 <!-- 787 Other Relationship Entry -->
1102 <xsl:if test="marc:datafield[@tag=787]">
1103 <span class="results_summary other_relationship_entry"><span class="label">Other related works: </span>
1104 <xsl:for-each select="marc:datafield[@tag=787]">
1105 <span class="other_relationship_entry">
1106 <xsl:if test="marc:subfield[@code='i']">
1107 <xsl:call-template name="subfieldSelect">
1108 <xsl:with-param name="codes">i</xsl:with-param>
1109 </xsl:call-template>
1110 <xsl:text> </xsl:text>
1113 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1115 <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>
1116 <xsl:call-template name="subfieldSelect">
1117 <xsl:with-param name="codes">a_t</xsl:with-param>
1118 </xsl:call-template>
1122 <xsl:variable name="relation_query">
1123 <xsl:text>ti,phr:(</xsl:text>
1124 <xsl:call-template name="quote_search_term">
1125 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1126 </xsl:call-template>
1127 <xsl:text>)</xsl:text>
1128 <xsl:if test="marc:subfield[@code='a']">
1129 <xsl:text> AND au:(</xsl:text>
1130 <xsl:call-template name="quote_search_term">
1131 <xsl:with-param name="term">
1132 <xsl:value-of select="marc:subfield[@code='a']"/>
1134 </xsl:call-template>
1135 <xsl:text>)</xsl:text>
1139 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1140 <xsl:call-template name="subfieldSelect">
1141 <xsl:with-param name="codes">a_t</xsl:with-param>
1142 </xsl:call-template>
1147 <xsl:when test="position()=last()"></xsl:when>
1148 <xsl:otherwise><span class="separator"><xsl:text>; </xsl:text></span></xsl:otherwise>
1156 <xsl:if test="marc:datafield[@tag=530]">
1157 <span class="results_summary additionalforms">
1158 <span class="label">Available additional physical forms:</span>
1159 <ul class="resource_list">
1160 <xsl:for-each select="marc:datafield[@tag=530]">
1162 <xsl:call-template name="subfieldSelect">
1163 <xsl:with-param name="codes">abcd</xsl:with-param>
1164 </xsl:call-template>
1165 <xsl:if test="marc:subfield[@code='u']">
1166 <xsl:for-each select="marc:subfield[@code='u']">
1167 <xsl:text> </xsl:text>
1169 <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1170 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1171 <xsl:attribute name="target">_blank</xsl:attribute>
1173 <xsl:value-of select="text()"/>
1183 <!-- 505 - Formatted contents note -->
1184 <xsl:if test="marc:datafield[@tag=505]">
1185 <div class="results_summary contents">
1186 <xsl:for-each select="marc:datafield[@tag=505]">
1187 <xsl:if test="position()=1">
1189 <xsl:when test="@ind1=1">
1190 <span class="label">Incomplete contents:</span>
1192 <xsl:when test="@ind1=2">
1193 <span class="label">Partial contents:</span>
1196 <span class="label">Contents:</span>
1200 <div class='contentblock' property='description'>
1202 <xsl:when test="@ind2=0">
1203 <xsl:call-template name="subfieldSelectSpan">
1204 <xsl:with-param name="newline">1</xsl:with-param>
1205 <xsl:with-param name="codes">trug</xsl:with-param>
1206 </xsl:call-template>
1209 <xsl:call-template name="subfieldSelectSpan">
1210 <xsl:with-param name="newline">1</xsl:with-param>
1211 <xsl:with-param name="codes">atrug</xsl:with-param>
1212 </xsl:call-template>
1221 <xsl:if test="marc:datafield[@tag=583 and not(@ind1=0)]">
1222 <span class="results_summary actionnote">
1223 <span class="label">Action note: </span>
1224 <ul class="resource_list">
1225 <xsl:for-each select="marc:datafield[@tag=583 and not(@ind1=0)]">
1228 <xsl:when test="marc:subfield[@code='z']">
1229 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1232 <xsl:call-template name="subfieldSelect">
1233 <xsl:with-param name="codes">abcdefghijklnou</xsl:with-param>
1234 </xsl:call-template>
1244 <xsl:if test="marc:datafield[@tag=508]">
1245 <span class="results_summary prod_credits">
1246 <span class="label">Production credits: </span>
1247 <ul class="resource_list">
1248 <xsl:for-each select="marc:datafield[@tag=508]">
1250 <xsl:call-template name="subfieldSelectSpan">
1251 <xsl:with-param name="codes">a</xsl:with-param>
1252 </xsl:call-template>
1260 <xsl:if test="marc:datafield[@tag=586]">
1261 <span class="results_summary awardsnote">
1262 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1263 <span class="label">Awards: </span>
1265 <ul class="resource_list">
1266 <xsl:for-each select="marc:datafield[@tag=586]">
1268 <xsl:value-of select="marc:subfield[@code='a']"/>
1275 <xsl:call-template name="host-item-entries">
1276 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
1277 </xsl:call-template>
1279 <xsl:for-each select="marc:datafield[@tag=511]">
1280 <span class="results_summary perf_note">
1281 <span class="label">
1282 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1284 <xsl:call-template name="subfieldSelect">
1285 <xsl:with-param name="codes">a</xsl:with-param>
1286 </xsl:call-template>
1290 <xsl:if test="marc:datafield[@tag=502]">
1291 <span class="results_summary diss_note">
1292 <span class="label">Dissertation note: </span>
1293 <xsl:for-each select="marc:datafield[@tag=502]">
1294 <xsl:call-template name="subfieldSelect">
1295 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1296 </xsl:call-template>
1298 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1302 <!-- 520 - Summary, etc. -->
1303 <xsl:for-each select="marc:datafield[@tag=520]">
1304 <span class="results_summary summary">
1305 <span class="label">
1307 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1308 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1309 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1310 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1311 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1312 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1315 <xsl:call-template name="subfieldSelect">
1316 <xsl:with-param name="codes">abc</xsl:with-param>
1317 </xsl:call-template>
1318 <xsl:if test="marc:subfield[@code='u']">
1319 <xsl:for-each select="marc:subfield[@code='u']">
1320 <xsl:text> </xsl:text>
1322 <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1323 <xsl:value-of select="text()"/>
1330 <!-- Content Warning -->
1331 <xsl:variable name="ContentWarningField" select="marc:sysprefs/marc:syspref[@name='ContentWarningField']"/>
1332 <xsl:if test="marc:datafield[@tag=$ContentWarningField]">
1333 <span class="results_summary content_warning">
1334 <span class="label">Content warning: </span>
1335 <xsl:for-each select="marc:datafield[@tag=$ContentWarningField]">
1337 <xsl:when test="marc:subfield[@code='u']">
1339 <xsl:attribute name="href">
1340 <xsl:value-of select="marc:subfield[@code='u']"/>
1343 <xsl:when test="marc:subfield[@code='a']">
1344 <xsl:value-of select="marc:subfield[@code='a']"/>
1347 <xsl:value-of select="marc:subfield[@code='u']"/>
1351 <xsl:text> </xsl:text>
1353 <xsl:when test="not(marc:subfield[@code='u']) and marc:subfield[@code='a']">
1354 <xsl:value-of select="marc:subfield[@code='a']"/><xsl:text> </xsl:text>
1357 <xsl:call-template name="subfieldSelect">
1358 <xsl:with-param name="codes">bcdefghijklmnopqrstvwyz</xsl:with-param>
1359 </xsl:call-template>
1360 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1365 <!-- 866 textual holdings -->
1366 <xsl:if test="marc:datafield[@tag=866]">
1367 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1368 <xsl:for-each select="marc:datafield[@tag=866]">
1369 <span class="holdings_note_data">
1370 <xsl:call-template name="subfieldSelect">
1371 <xsl:with-param name="codes">az</xsl:with-param>
1372 </xsl:call-template>
1373 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1379 <!-- 867 textual holdings -->
1380 <xsl:if test="marc:datafield[@tag=867]">
1381 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1382 <xsl:for-each select="marc:datafield[@tag=867]">
1383 <span class="holdings_note_data">
1384 <xsl:call-template name="subfieldSelect">
1385 <xsl:with-param name="codes">az</xsl:with-param>
1386 </xsl:call-template>
1387 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1393 <!-- 868 textual holdings -->
1394 <xsl:if test="marc:datafield[@tag=868]">
1395 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1396 <xsl:for-each select="marc:datafield[@tag=868]">
1397 <span class="holdings_note_data">
1398 <xsl:call-template name="subfieldSelect">
1399 <xsl:with-param name="codes">az</xsl:with-param>
1400 </xsl:call-template>
1401 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1407 <!-- 765 - Original language entry -->
1408 <xsl:for-each select="marc:datafield[@tag=765]">
1409 <span class="results_summary original_language_entry">
1411 <xsl:when test="@ind2!=8 or not(marc:subfield[@code='i'])">
1412 <!-- fallback to this label too if 765$i is empty -->
1413 <span class="label">Translation of: </span>
1416 <span class="label">
1417 <xsl:value-of select="marc:subfield[@code='i']"/>
1418 <xsl:text>: </xsl:text>
1422 <span class="original_language_entry_data">
1423 <xsl:variable name="href">
1424 <!-- call template to get href of search URL -->
1425 <xsl:call-template name="GetCnumSearchURL">
1426 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
1427 <xsl:with-param name="opac_url" select="1"/>
1428 </xsl:call-template>
1430 <xsl:variable name="f765">
1431 <xsl:call-template name="subfieldSelect">
1432 <xsl:with-param name="codes">tad</xsl:with-param>
1433 <xsl:with-param name="delimeter">, </xsl:with-param>
1434 </xsl:call-template>
1437 <xsl:when test="$href">
1439 <xsl:attribute name="href"><xsl:value-of select="$href"/></xsl:attribute>
1440 <xsl:value-of select="$f765"/>
1444 <xsl:value-of select="$f765"/>
1450 <!-- End of 765 - Original language entry -->
1452 <!-- 770 - Supplement/Special issue entry -->
1453 <xsl:if test="marc:datafield[@tag=770]">
1454 <span class="results_summary supplement">
1455 <span class="label">Supplement: </span>
1456 <ul class="resource_list">
1457 <xsl:for-each select="marc:datafield[@tag=770]">
1459 <xsl:if test="marc:subfield[@code='i']">
1460 <span class="770_rel_info">
1461 <xsl:call-template name="subfieldSelect">
1462 <xsl:with-param name="codes">i</xsl:with-param>
1463 </xsl:call-template>
1464 <xsl:text> </xsl:text>
1469 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1470 <xsl:attribute name="href">
1471 /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>
1475 <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>
1479 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1480 <xsl:call-template name="subfieldSelect">
1481 <xsl:with-param name="codes">a_t</xsl:with-param>
1482 </xsl:call-template>
1486 <xsl:text> </xsl:text>
1487 <xsl:call-template name="subfieldSelect">
1488 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1489 </xsl:call-template>
1496 <!-- 772 - Supplement parent entry -->
1497 <xsl:if test="marc:datafield[@tag=772]">
1498 <span class="results_summary supplement_parent">
1499 <span class="label">Supplement to: </span>
1500 <ul class="resource_list">
1501 <xsl:for-each select="marc:datafield[@tag=772]">
1503 <xsl:if test="marc:subfield[@code='i']">
1504 <span class="772_rel_info">
1505 <xsl:call-template name="subfieldSelect">
1506 <xsl:with-param name="codes">i</xsl:with-param>
1507 </xsl:call-template>
1508 <xsl:text> </xsl:text>
1513 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1514 <xsl:attribute name="href">
1515 /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>
1519 <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>
1523 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1524 <xsl:call-template name="subfieldSelect">
1525 <xsl:with-param name="codes">a_t</xsl:with-param>
1526 </xsl:call-template>
1530 <xsl:call-template name="subfieldSelect">
1531 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1532 </xsl:call-template>
1539 <!-- 775 Other Edition -->
1540 <xsl:if test="marc:datafield[@tag=775]">
1541 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1542 <xsl:for-each select="marc:datafield[@tag=775]">
1544 <xsl:variable name="relation_query">
1545 <xsl:text>ti,phr:(</xsl:text>
1546 <xsl:call-template name="quote_search_term">
1547 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1548 </xsl:call-template>
1549 <xsl:text>)</xsl:text>
1550 <xsl:if test="marc:subfield[@code='a']">
1551 <xsl:text> AND au:(</xsl:text>
1552 <xsl:call-template name="quote_search_term">
1553 <xsl:with-param name="term">
1554 <xsl:value-of select="marc:subfield[@code='a']"/>
1556 </xsl:call-template>
1557 <xsl:text>)</xsl:text>
1561 <xsl:if test="marc:subfield[@code='i']">
1562 <xsl:call-template name="subfieldSelect">
1563 <xsl:with-param name="codes">i</xsl:with-param>
1564 </xsl:call-template>
1565 <xsl:text> </xsl:text>
1569 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1570 <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>
1573 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1576 <xsl:call-template name="subfieldSelect">
1577 <xsl:with-param name="codes">a_t</xsl:with-param>
1578 </xsl:call-template>
1581 <xsl:when test="position()=last()"></xsl:when>
1582 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1589 <xsl:if test="marc:datafield[@tag=780]">
1590 <xsl:for-each select="marc:datafield[@tag=780]">
1591 <xsl:if test="@ind1=0">
1592 <span class="results_summary preceeding_entry">
1594 <xsl:when test="@ind2=0">
1595 <span class="label">Continues:</span>
1597 <xsl:when test="@ind2=1">
1598 <span class="label">Continues in part:</span>
1600 <xsl:when test="@ind2=2">
1601 <span class="label">Supersedes:</span>
1603 <xsl:when test="@ind2=3">
1604 <span class="label">Supersedes in part:</span>
1606 <xsl:when test="@ind2=4">
1607 <span class="label">Formed by the union: ... and: ...</span>
1609 <xsl:when test="@ind2=5">
1610 <span class="label">Absorbed:</span>
1612 <xsl:when test="@ind2=6">
1613 <span class="label">Absorbed in part:</span>
1615 <xsl:when test="@ind2=7">
1616 <span class="label">Separated from:</span>
1619 <xsl:text> </xsl:text>
1621 <xsl:if test="marc:subfield[@code='i']">
1622 <span class="780_rel_info">
1623 <xsl:value-of select="marc:subfield[@code='i']"/>
1624 <xsl:text> </xsl:text>
1628 <xsl:variable name="relation_query">
1629 <xsl:text>ti,phr:(</xsl:text>
1630 <xsl:call-template name="quote_search_term">
1631 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1632 </xsl:call-template>
1633 <xsl:text>)</xsl:text>
1634 <xsl:if test="marc:subfield[@code='a']">
1635 <xsl:text> AND au:(</xsl:text>
1636 <xsl:call-template name="quote_search_term">
1637 <xsl:with-param name="term">
1638 <xsl:value-of select="marc:subfield[@code='a']"/>
1640 </xsl:call-template>
1641 <xsl:text>)</xsl:text>
1646 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1648 <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>
1649 <xsl:call-template name="subfieldSelect">
1650 <xsl:with-param name="codes">a_t</xsl:with-param>
1651 </xsl:call-template>
1656 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1657 <xsl:call-template name="subfieldSelect">
1658 <xsl:with-param name="codes">a_t</xsl:with-param>
1659 </xsl:call-template>
1665 <xsl:if test="marc:subfield[@code='n']">
1666 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1674 <xsl:if test="marc:datafield[@tag=785]">
1675 <xsl:for-each select="marc:datafield[@tag=785]">
1676 <xsl:if test="@ind1=0">
1677 <span class="results_summary succeeding_entry">
1679 <xsl:when test="@ind2=0">
1680 <span class="label">Continued by:</span>
1682 <xsl:when test="@ind2=1">
1683 <span class="label">Continued in part by:</span>
1685 <xsl:when test="@ind2=2">
1686 <span class="label">Superseded by:</span>
1688 <xsl:when test="@ind2=3">
1689 <span class="label">Superseded in part by:</span>
1691 <xsl:when test="@ind2=4">
1692 <span class="label">Absorbed by:</span>
1694 <xsl:when test="@ind2=5">
1695 <span class="label">Absorbed in part by:</span>
1697 <xsl:when test="@ind2=6">
1698 <span class="label">Split into .. and ...:</span>
1700 <xsl:when test="@ind2=7">
1701 <span class="label">Merged with ... to form ...</span>
1703 <xsl:when test="@ind2=8">
1704 <span class="label">Changed back to:</span>
1707 <xsl:text> </xsl:text>
1709 <xsl:if test="marc:subfield[@code='i']">
1710 <span class="785_rel_info">
1711 <xsl:value-of select="marc:subfield[@code='i']"/>
1712 <xsl:text> </xsl:text>
1716 <xsl:variable name="relation_query">
1717 <xsl:text>ti,phr:(</xsl:text>
1718 <xsl:call-template name="quote_search_term">
1719 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1720 </xsl:call-template>
1721 <xsl:text>)</xsl:text>
1722 <xsl:if test="marc:subfield[@code='a']">
1723 <xsl:text> AND au:(</xsl:text>
1724 <xsl:call-template name="quote_search_term">
1725 <xsl:with-param name="term">
1726 <xsl:value-of select="marc:subfield[@code='a']"/>
1728 </xsl:call-template>
1729 <xsl:text>)</xsl:text>
1734 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1735 <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>
1736 <xsl:call-template name="subfieldSelect">
1737 <xsl:with-param name="codes">a_t</xsl:with-param>
1738 </xsl:call-template>
1743 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1744 <xsl:call-template name="subfieldSelect">
1745 <xsl:with-param name="codes">a_t</xsl:with-param>
1746 </xsl:call-template>
1752 <xsl:if test="marc:subfield[@code='n']">
1753 <span class="results_summary succeeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1761 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
1762 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
1763 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
1764 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
1766 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
1767 <xsl:variable name="openurltext">
1769 <xsl:when test="$OpenURLText != ''">
1770 <xsl:value-of select="$OpenURLText" />
1773 <xsl:text>OpenURL</xsl:text>
1778 <span class="results_summary"><a>
1779 <xsl:attribute name="href">
1780 <xsl:value-of select="$OpenURLResolverURL" />
1782 <xsl:attribute name="title">
1783 <xsl:value-of select="$openurltext" />
1785 <xsl:attribute name="class">
1786 <xsl:text>OpenURL</xsl:text>
1788 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1789 <xsl:attribute name="target">
1790 <xsl:text>_blank</xsl:text>
1794 <xsl:when test="$OpenURLImageLocation != ''">
1796 <xsl:attribute name="src">
1797 <xsl:value-of select="$OpenURLImageLocation" />
1802 <xsl:value-of select="$openurltext" />
1807 <!-- End of OpenURL -->
1809 <xsl:variable name="OPACShowMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACShowMusicalInscripts']" />
1810 <xsl:variable name="OPACPlayMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACPlayMusicalInscripts']" />
1812 <xsl:if test="$OPACShowMusicalInscripts = 1 and marc:datafield[@tag=031]">
1813 <xsl:for-each select="marc:datafield[@tag=031]">
1815 <span class="results_summary musical_inscripts">
1816 <xsl:if test="marc:subfield[@code='u']">
1819 <xsl:attribute name="href">
1820 <xsl:value-of select="marc:subfield[@code='u']"/>
1822 <xsl:text>Audio file</xsl:text>
1826 <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']">
1827 <div class="inscript" data-system="pae">
1828 <xsl:attribute name="data-clef">
1829 <xsl:value-of select="marc:subfield[@code='g']"/>
1831 <xsl:attribute name="data-keysig">
1832 <xsl:value-of select="marc:subfield[@code='n']"/>
1834 <xsl:attribute name="data-timesig">
1835 <xsl:value-of select="marc:subfield[@code='o']"/>
1837 <xsl:attribute name="data-notation">
1838 <xsl:value-of select="marc:subfield[@code='p']"/>
1841 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1842 <div class="audio_controls hide">
1843 <button class="btn play_btn">
1844 <i id="carticon" class="fa fa-play"></i>
1845 <xsl:text> Play this sample</xsl:text>
1852 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1853 <div class="results_summary">
1854 <span class="inscript_audio hide"></span>
1862 <xsl:template name="showAuthor">
1863 <xsl:param name="authorfield" />
1864 <xsl:param name="UseAuthoritiesForTracings" />
1865 <xsl:param name="AuthorLinkSortBy"/>
1866 <xsl:param name="AuthorLinkSortOrder"/>
1867 <xsl:param name="materialTypeLabel" />
1868 <xsl:param name="theme" />
1869 <xsl:if test="count($authorfield)>0">
1870 <span class="results_summary author h3">
1871 <xsl:for-each select="$authorfield">
1873 <xsl:when test="position()>1"/>
1875 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1876 <!--#13382 Changed Additional author to contributor -->
1877 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1880 <ul class="resource_list">
1881 <xsl:for-each select="$authorfield">
1884 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1885 <xsl:when test="marc:subfield[@code='n']">
1886 <xsl:text> </xsl:text>
1887 <xsl:call-template name="subfieldSelect">
1888 <xsl:with-param name="codes">n</xsl:with-param>
1889 </xsl:call-template>
1890 <xsl:text> </xsl:text>
1895 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1896 <xsl:attribute name="href">
1897 <xsl:text>/cgi-bin/koha/opac-search.pl?q=an:</xsl:text>
1898 <xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/>
1899 <xsl:if test="$AuthorLinkSortBy!='default'">
1900 <xsl:text>&sort_by=</xsl:text>
1901 <xsl:value-of select="$AuthorLinkSortBy"/>
1902 <xsl:text>_</xsl:text>
1903 <xsl:value-of select="$AuthorLinkSortOrder" />
1908 <xsl:attribute name="href">
1909 <xsl:text>/cgi-bin/koha/opac-search.pl?q=au:"</xsl:text>
1910 <xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>
1911 <xsl:text>"</xsl:text>
1912 <xsl:if test="$AuthorLinkSortBy!='default'">
1913 <xsl:text>&sort_by=</xsl:text>
1914 <xsl:value-of select="$AuthorLinkSortBy"/>
1915 <xsl:text>_</xsl:text>
1916 <xsl:value-of select="$AuthorLinkSortOrder" />
1921 <xsl:attribute name="class">contributors</xsl:attribute>
1922 <span resource="#record"><span>
1924 <xsl:when test="substring(@tag, 1, 1)='1'">
1926 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1927 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1930 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1933 <xsl:when test="substring(@tag, 2, 1)='0'">
1935 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1936 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1939 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1941 <span property="name">
1943 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1945 <xsl:call-template name="chopPunctuation">
1946 <xsl:with-param name="chopString">
1947 <xsl:call-template name="subfieldSelect">
1948 <xsl:with-param name="codes">
1950 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1951 <xsl:when test="@tag=111">aeq</xsl:when>
1952 <xsl:when test="@tag=110">ab</xsl:when>
1953 <xsl:otherwise>abcjq</xsl:otherwise>
1956 </xsl:call-template>
1958 <xsl:with-param name="punctuation">
1959 <xsl:text>:,;/ </xsl:text>
1961 </xsl:call-template>
1962 <!-- Display only name and title portion in 110 field -->
1963 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1964 <span class="titleportion">
1966 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1967 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1969 <xsl:call-template name="chopPunctuation">
1970 <xsl:with-param name="chopString">
1971 <xsl:call-template name="subfieldSelect">
1972 <xsl:with-param name="codes">cdnt</xsl:with-param>
1973 </xsl:call-template>
1975 </xsl:call-template>
1978 <!-- Display only name and title portion in 111 field -->
1979 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1980 <span class="titleportion">
1982 <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>
1983 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1986 <xsl:call-template name="chopPunctuation">
1987 <xsl:with-param name="chopString">
1988 <xsl:call-template name="subfieldSelect">
1989 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1990 </xsl:call-template>
1992 </xsl:call-template>
1995 <!-- Display only dates in 100 field -->
1996 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1997 <span class="authordates">
1998 <xsl:text>, </xsl:text>
1999 <xsl:call-template name="chopPunctuation">
2000 <xsl:with-param name="chopString">
2001 <xsl:call-template name="subfieldSelect">
2002 <xsl:with-param name="codes">d</xsl:with-param>
2003 </xsl:call-template>
2005 </xsl:call-template>
2009 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
2010 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
2011 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
2012 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
2013 <xsl:if test="@tag=710 or @tag=711">
2014 <xsl:call-template name="chopPunctuation">
2015 <xsl:with-param name="chopString">
2016 <xsl:call-template name="subfieldSelect">
2017 <xsl:with-param name="codes">
2019 <xsl:when test="@tag=711">aeq</xsl:when>
2020 <xsl:otherwise>ab</xsl:otherwise>
2023 </xsl:call-template>
2025 <xsl:with-param name="punctuation">
2026 <xsl:text>:,;/ </xsl:text>
2028 </xsl:call-template>
2029 <!-- Display only name and title portion in 711 field -->
2030 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
2031 <span class="titleportion">
2033 <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>
2034 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
2037 <xsl:call-template name="chopPunctuation">
2038 <xsl:with-param name="chopString">
2039 <xsl:call-template name="subfieldSelect">
2040 <xsl:with-param name="codes">cdgnt</xsl:with-param>
2041 </xsl:call-template>
2043 </xsl:call-template>
2046 <!-- Display only name and title portion in 710 field -->
2047 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
2048 <span class="titleportion">
2050 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
2051 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
2053 <xsl:call-template name="chopPunctuation">
2054 <xsl:with-param name="chopString">
2055 <xsl:call-template name="subfieldSelect">
2056 <xsl:with-param name="codes">cdnt</xsl:with-param>
2057 </xsl:call-template>
2059 </xsl:call-template>
2064 <!-- Display only name portion in 700 field -->
2065 <xsl:if test="@tag=700">
2066 <xsl:call-template name="chopPunctuation">
2067 <xsl:with-param name="chopString">
2068 <xsl:call-template name="subfieldSelect">
2069 <xsl:with-param name="codes">abcq</xsl:with-param>
2070 </xsl:call-template>
2072 </xsl:call-template>
2074 <!-- Display class "authordates" in 700 field -->
2075 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
2076 <span class="authordates">
2077 <xsl:text>, </xsl:text>
2078 <xsl:call-template name="chopPunctuation">
2079 <xsl:with-param name="chopString">
2080 <xsl:call-template name="subfieldSelect">
2081 <xsl:with-param name="codes">d</xsl:with-param>
2082 </xsl:call-template>
2084 </xsl:call-template>
2087 <!-- Display class "titleportion" in 700 field -->
2088 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
2089 <xsl:if test="@tag=700 and $titleportionfields">
2090 <span class="titleportion">
2091 <xsl:text>. </xsl:text>
2092 <xsl:call-template name="chopPunctuation">
2093 <xsl:with-param name="chopString">
2094 <xsl:call-template name="subfieldSelect">
2095 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
2096 </xsl:call-template>
2098 </xsl:call-template>
2104 </span></span></span>
2106 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
2107 <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'])">
2109 <span class="relatorcode">
2110 <xsl:text> [</xsl:text>
2112 <xsl:when test="@tag=111 or @tag=711">
2114 <!-- Prefer j over 4 for 111 and 711 -->
2115 <xsl:when test="marc:subfield[@code='j']">
2116 <xsl:for-each select="marc:subfield[@code='j']">
2117 <xsl:value-of select="."/>
2118 <xsl:if test="position() != last()">, </xsl:if>
2122 <xsl:for-each select="marc:subfield[@code=4]">
2123 <xsl:value-of select="."/>
2124 <xsl:if test="position() != last()">, </xsl:if>
2129 <!-- Prefer e over 4 on 100 and 110-->
2130 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
2131 <xsl:for-each select="marc:subfield[@code='e']">
2132 <xsl:value-of select="."/>
2133 <xsl:if test="position() != last()">, </xsl:if>
2137 <xsl:for-each select="marc:subfield[@code=4]">
2138 <xsl:value-of select="."/>
2139 <xsl:if test="position() != last()">, </xsl:if>
2143 <xsl:text>]</xsl:text>
2147 <xsl:if test="marc:subfield[@code=9]">
2148 <a class='authlink'>
2149 <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>
2150 <xsl:element name="i">
2151 <xsl:attribute name="class">fa fa-search</xsl:attribute>
2162 <xsl:template name="nameABCQ">
2163 <xsl:call-template name="chopPunctuation">
2164 <xsl:with-param name="chopString">
2165 <xsl:call-template name="subfieldSelect">
2166 <xsl:with-param name="codes">abcq</xsl:with-param>
2167 </xsl:call-template>
2169 <xsl:with-param name="punctuation">
2170 <xsl:text>:,;/ </xsl:text>
2172 </xsl:call-template>
2175 <xsl:template name="nameABCDN">
2176 <xsl:call-template name="chopPunctuation">
2177 <xsl:with-param name="chopString">
2178 <xsl:call-template name="subfieldSelect">
2179 <xsl:with-param name="codes">abcdn</xsl:with-param>
2180 </xsl:call-template>
2182 <xsl:with-param name="punctuation">
2183 <xsl:text>:,;/ </xsl:text>
2185 </xsl:call-template>
2188 <xsl:template name="nameACDEQ">
2189 <xsl:call-template name="subfieldSelect">
2190 <xsl:with-param name="codes">acdeq</xsl:with-param>
2191 </xsl:call-template>
2194 <xsl:template name="specialSubfieldSelect">
2195 <xsl:param name="anyCodes"/>
2196 <xsl:param name="axis"/>
2197 <xsl:param name="beforeCodes"/>
2198 <xsl:param name="afterCodes"/>
2199 <xsl:variable name="str">
2200 <xsl:for-each select="marc:subfield">
2201 <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])">
2202 <xsl:value-of select="text()"/>
2203 <xsl:text> </xsl:text>
2207 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
2210 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
2211 <xsl:template name="subfieldSelectSubject">
2212 <xsl:param name="codes"/>
2213 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
2214 <xsl:param name="subdivCodes"/>
2215 <xsl:param name="subdivDelimiter"/>
2216 <xsl:param name="prefix"/>
2217 <xsl:param name="suffix"/>
2218 <xsl:param name="urlencode"/>
2219 <xsl:variable name="str">
2220 <xsl:for-each select="marc:subfield">
2221 <xsl:if test="contains($codes, @code)">
2222 <xsl:if test="contains($subdivCodes, @code)">
2223 <xsl:value-of select="$subdivDelimiter"/>
2225 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
2230 <xsl:when test="$urlencode=1">
2231 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
2234 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>