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 <xsl:for-each select="marc:subfield">
329 <xsl:if test="@code='a'">
330 <span property="publisher" typeof="Organization">
331 <span class="publisher_place" property="location">
333 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
334 <xsl:value-of select="current()"/>
338 <xsl:if test="position() != last()">
339 <xsl:text> </xsl:text>
341 <xsl:text> </xsl:text>
343 <xsl:if test="@code='b'">
344 <span property="name" class="publisher_name">
345 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(current(), true())"/></xsl:attribute>
346 <xsl:value-of select="current()"/>
349 <xsl:text> </xsl:text>
351 <xsl:if test="@code='c'">
352 <span property="datePublished" class="publisher_date">
354 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
355 <xsl:value-of select="current()"/>
357 <xsl:if test="position() != last()">
358 <xsl:text> </xsl:text>
361 <xsl:text> </xsl:text>
363 <xsl:if test="@code='g'">
364 <span property="datePublished" class="publisher_date">
365 <xsl:call-template name="chopPunctuation">
366 <xsl:with-param name="chopString">
367 <xsl:value-of select="current()"/>
373 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
379 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
380 <xsl:if test="$display880">
381 <xsl:call-template name="m880Select">
382 <xsl:with-param name="basetags">250</xsl:with-param>
383 <xsl:with-param name="codes">ab</xsl:with-param>
384 <xsl:with-param name="class">results_summary edition</xsl:with-param>
385 <xsl:with-param name="label">Edition: </xsl:with-param>
389 <xsl:if test="marc:datafield[@tag=250]">
390 <span class="results_summary edition"><span class="label">Edition: </span>
391 <xsl:for-each select="marc:datafield[@tag=250]">
392 <span property="bookEdition">
393 <xsl:call-template name="chopPunctuation">
394 <xsl:with-param name="chopString">
395 <xsl:call-template name="subfieldSelect">
396 <xsl:with-param name="codes">ab</xsl:with-param>
401 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
406 <!-- Description: Alternate Graphic Representation (MARC 880) -->
407 <xsl:if test="$display880">
408 <xsl:call-template name="m880Select">
409 <xsl:with-param name="basetags">300</xsl:with-param>
410 <xsl:with-param name="codes">abceg</xsl:with-param>
411 <xsl:with-param name="class">results_summary description</xsl:with-param>
412 <xsl:with-param name="label">Description: </xsl:with-param>
416 <xsl:if test="marc:datafield[@tag=300]">
417 <span class="results_summary description"><span class="label">Description: </span>
418 <xsl:for-each select="marc:datafield[@tag=300]">
419 <span property="description">
420 <xsl:call-template name="chopPunctuation">
421 <xsl:with-param name="chopString">
422 <xsl:call-template name="subfieldSelect">
423 <xsl:with-param name="codes">abcefg</xsl:with-param>
428 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
434 <!-- Content Type -->
435 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
436 <span class="results_summary" id="content_type">
437 <xsl:if test="marc:datafield[@tag=336]">
438 <span class="label">Content type: </span>
439 <ul class="resource_list">
440 <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>
450 <xsl:text> </xsl:text>
452 <xsl:if test="marc:datafield[@tag=337]">
453 <span class="label">Media type: </span>
454 <ul class="resource_list">
455 <xsl:for-each select="marc:datafield[@tag=337]">
457 <xsl:call-template name="subfieldSelect">
458 <xsl:with-param name="codes">a</xsl:with-param>
459 <xsl:with-param name="delimeter">, </xsl:with-param>
465 <xsl:text> </xsl:text>
467 <xsl:if test="marc:datafield[@tag=338]">
468 <span class="label">Carrier type: </span>
469 <ul class="resource_list">
470 <xsl:for-each select="marc:datafield[@tag=338]">
472 <xsl:call-template name="subfieldSelect">
473 <xsl:with-param name="codes">a</xsl:with-param>
474 <xsl:with-param name="delimeter">, </xsl:with-param>
483 <!-- 385 - Audience -->
484 <xsl:if test="marc:datafield[@tag=385]">
485 <span class="results_summary audience">
486 <span class="label">Audience: </span>
487 <ul class="resource_list">
488 <xsl:for-each select="marc:datafield[@tag=385]">
490 <xsl:if test="marc:subfield[@code='m']">
491 <xsl:call-template name="chopPunctuation">
492 <xsl:with-param name="chopString">
493 <xsl:call-template name="subfieldSelect">
494 <xsl:with-param name="codes">m</xsl:with-param>
498 <xsl:text>: </xsl:text>
500 <xsl:call-template name="chopPunctuation">
501 <xsl:with-param name="chopString">
502 <xsl:call-template name="subfieldSelect">
503 <xsl:with-param name="codes">a</xsl:with-param>
504 <xsl:with-param name="delimeter">, </xsl:with-param>
514 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
515 <span class="results_summary isbn"><span class="label">ISBN: </span>
516 <ul class="resource_list">
517 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
519 <span property="isbn">
520 <xsl:value-of select="."/>
529 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
530 <span class="results_summary issn"><span class="label">ISSN: </span>
531 <ul class="resource_list">
532 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
534 <span property="issn">
535 <xsl:value-of select="."/>
543 <xsl:if test="marc:datafield[@tag=013]">
544 <span class="results_summary patent_info">
545 <span class="label">Patent information: </span>
546 <xsl:for-each select="marc:datafield[@tag=013]">
547 <xsl:call-template name="subfieldSelect">
548 <xsl:with-param name="codes">acdef</xsl:with-param>
549 <xsl:with-param name="delimeter">, </xsl:with-param>
551 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
556 <xsl:if test="marc:datafield[@tag=088]">
557 <span class="results_summary report_number">
558 <span class="label">Report number: </span>
559 <xsl:for-each select="marc:datafield[@tag=088]">
560 <xsl:call-template name="subfieldSelect">
561 <xsl:with-param name="codes">a</xsl:with-param>
563 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
568 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
569 <xsl:if test="$display880">
570 <xsl:call-template name="m880Select">
571 <xsl:with-param name="basetags">246</xsl:with-param>
572 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
573 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
574 <xsl:with-param name="label">Other title: </xsl:with-param>
578 <xsl:if test="marc:datafield[@tag=246]">
579 <span class="results_summary other_title">
580 <span class="label">Other title: </span>
581 <ul class="resource_list">
582 <xsl:for-each select="marc:datafield[@tag=246]">
584 <span property="alternateName">
585 <xsl:call-template name="chopPunctuation">
586 <xsl:with-param name="chopString">
587 <xsl:if test="marc:subfield[@code='i']">
588 <xsl:call-template name="subfieldSelect">
589 <xsl:with-param name="codes">i</xsl:with-param>
592 <xsl:text> </xsl:text>
593 <xsl:call-template name="subfieldSelect">
594 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
598 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
600 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
601 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
602 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
603 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
604 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
605 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
606 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
607 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
608 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
619 <xsl:if test="marc:datafield[@tag=242]">
620 <span class="results_summary translated_title"><span class="label">Title translated: </span>
621 <xsl:for-each select="marc:datafield[@tag=242]">
622 <span property="alternateName">
623 <xsl:call-template name="chopPunctuation">
624 <xsl:with-param name="chopString">
625 <xsl:call-template name="subfieldSelect">
626 <xsl:with-param name="codes">abchnp</xsl:with-param>
631 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
636 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
637 <xsl:if test="$display880">
638 <span property="alternateName">
639 <xsl:call-template name="m880Select">
640 <xsl:with-param name="basetags">130,240</xsl:with-param>
641 <xsl:with-param name="codes">adfklmor</xsl:with-param>
642 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
643 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
648 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
649 <span class="results_summary uniform_titles">
650 <span class="label">Uniform titles: </span>
651 <ul class="resource_list">
652 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
654 <span property="alternateName">
655 <xsl:if test="marc:subfield[@code='i']">
656 <xsl:call-template name="subfieldSelect">
657 <xsl:with-param name="codes">i</xsl:with-param>
660 <xsl:text> </xsl:text>
661 <xsl:for-each select="marc:subfield">
662 <xsl:if test="contains('adfghklmnoprst',@code)">
663 <xsl:value-of select="text()"/>
664 <xsl:text> </xsl:text>
675 <!-- #13382 Added Related works 700$i -->
676 <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']]">
677 <span class="results_summary related_works">
678 <span class="label">Related works: </span>
679 <ul class="resource_list">
680 <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']]">
682 <xsl:variable name="str">
683 <xsl:call-template name="subfieldSelect">
684 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
687 <xsl:call-template name="chopPunctuation">
688 <xsl:with-param name="chopString">
689 <xsl:value-of select="$str"/>
692 <!-- add relator code too between brackets-->
693 <xsl:if test="marc:subfield[@code='4' or @code='e']">
694 <span class="relatorcode">
695 <xsl:text> [</xsl:text>
697 <xsl:when test="marc:subfield[@code='e']">
698 <xsl:for-each select="marc:subfield[@code='e']">
699 <xsl:value-of select="."/>
700 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
704 <xsl:for-each select="marc:subfield[@code='4']">
705 <xsl:value-of select="."/>
706 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
710 <xsl:text>]</xsl:text>
719 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
720 <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'])]">
721 <span class="results_summary contained_works">
722 <span class="label">Contained works: </span>
723 <ul class="resource_list">
724 <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'])]">
726 <xsl:variable name="str">
727 <xsl:call-template name="subfieldSelect">
728 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
731 <xsl:call-template name="chopPunctuation">
732 <xsl:with-param name="chopString">
733 <xsl:value-of select="$str"/>
736 <!-- add relator code too between brackets-->
737 <xsl:if test="marc:subfield[@code='4' or @code='e']">
738 <span class="relatorcode">
739 <xsl:text> [</xsl:text>
741 <xsl:when test="marc:subfield[@code='e']">
742 <xsl:for-each select="marc:subfield[@code='e']">
743 <xsl:value-of select="."/>
744 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
748 <xsl:for-each select="marc:subfield[@code='4']">
749 <xsl:value-of select="."/>
750 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
754 <xsl:text>]</xsl:text>
763 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
764 <span class="results_summary subjects">
765 <span class="label">Subject(s): </span>
766 <ul class="resource_list">
767 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
769 <span property="keywords">
771 <xsl:attribute name="class">subject</xsl:attribute>
773 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
774 <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>
776 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
777 <xsl:when test="$TraceSubjectSubdivisions='1'">
778 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
779 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
780 <xsl:with-param name="delimeter"> AND </xsl:with-param>
781 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
782 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
783 <xsl:with-param name="urlencode">1</xsl:with-param>
787 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
789 <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>
792 <xsl:call-template name="chopPunctuation">
793 <xsl:with-param name="chopString">
794 <xsl:call-template name="subfieldSelect">
795 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
796 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
797 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
803 <xsl:if test="marc:subfield[@code=9]">
805 <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>
806 <xsl:element name="i">
807 <xsl:attribute name="class">fa fa-search</xsl:attribute>
818 <xsl:if test="marc:datafield[@tag=655]">
819 <span class="results_summary genre">
820 <span class="label">Genre/Form: </span>
821 <ul class="resource_list">
822 <xsl:for-each select="marc:datafield[@tag=655]">
826 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
827 <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>
829 <xsl:when test="$TraceSubjectSubdivisions='1'">
830 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
831 <xsl:with-param name="codes">avxyz</xsl:with-param>
832 <xsl:with-param name="delimeter"> AND </xsl:with-param>
833 <xsl:with-param name="prefix">(index-term-genre<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
834 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
835 <xsl:with-param name="urlencode">1</xsl:with-param>
840 <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>
843 <xsl:call-template name="subfieldSelect">
844 <xsl:with-param name="codes">avxyz</xsl:with-param>
845 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
846 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
849 <xsl:if test="marc:subfield[@code=9]">
850 <xsl:text> </xsl:text>
852 <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>
853 <xsl:element name="i">
854 <xsl:attribute name="class">fa fa-search</xsl:attribute>
864 <!-- MARC21 776 Additional Physical Form Entry -->
865 <xsl:if test="marc:datafield[@tag=776]">
866 <span class="results_summary add_physical_form">
867 <span class="label">Additional physical formats: </span>
868 <xsl:for-each select="marc:datafield[@tag=776]">
869 <xsl:variable name="linktext">
871 <xsl:when test="marc:subfield[@code='t']">
872 <xsl:value-of select="marc:subfield[@code='t']"/>
874 <xsl:when test="marc:subfield[@code='a']">
875 <xsl:value-of select="marc:subfield[@code='a']"/>
878 <xsl:text>No title</xsl:text>
882 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
883 <xsl:call-template name="subfieldSelect">
884 <xsl:with-param name="codes">i</xsl:with-param>
886 <xsl:text>: </xsl:text>
889 <xsl:when test="marc:subfield[@code='w']">
891 <xsl:attribute name="href">
892 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
893 <xsl:call-template name="extractControlNumber">
894 <xsl:with-param name="subfieldW">
895 <xsl:value-of select="marc:subfield[@code='w']"/>
899 <xsl:value-of select="$linktext"/>
903 <xsl:value-of select="$linktext"/>
906 <xsl:if test="position() != last()">
907 <xsl:text>; </xsl:text>
913 <!-- MARC21 777 - Issued With Entry -->
914 <xsl:if test="marc:datafield[@tag=777]">
915 <xsl:for-each select="marc:datafield[@tag=777]">
916 <xsl:if test="@ind1 != 1">
917 <span class="results_summary issued_with">
920 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
921 <xsl:value-of select="marc:subfield[@code='i']"/>
924 <xsl:text>Issued with:</xsl:text>
927 <xsl:text> </xsl:text>
929 <xsl:variable name="f777">
930 <xsl:call-template name="chopPunctuation">
931 <xsl:with-param name="chopString">
932 <xsl:call-template name="subfieldSelect">
933 <xsl:with-param name="codes">a_t</xsl:with-param>
939 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
940 <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>
941 <xsl:value-of select="translate($f777, '()', '')"/>
945 <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>
946 <xsl:value-of select="$f777"/>
950 <xsl:if test="marc:subfield[@code='g']">
951 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
954 <xsl:if test="marc:subfield[@code='n']">
955 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
961 <!-- DDC classification -->
962 <xsl:if test="marc:datafield[@tag=082]">
963 <span class="results_summary ddc">
964 <span class="label">DDC classification: </span>
965 <ul class="resource_list">
966 <xsl:for-each select="marc:datafield[@tag=082]">
968 <xsl:call-template name="subfieldSelect">
969 <xsl:with-param name="codes">a2b</xsl:with-param>
970 <xsl:with-param name="delimeter"><xsl:text> </xsl:text></xsl:with-param>
978 <!-- LOC classification -->
979 <xsl:if test="marc:datafield[@tag=050]">
980 <span class="results_summary loc">
981 <span class="label">LOC classification: </span>
982 <ul class="resource_list">
983 <xsl:for-each select="marc:datafield[@tag=050]">
985 <xsl:call-template name="subfieldSelect">
986 <xsl:with-param name="codes">ab</xsl:with-param>
987 <xsl:with-param name="delimeter"><xsl:text> </xsl:text></xsl:with-param>
995 <!-- NLM classification -->
996 <xsl:if test="marc:datafield[@tag=060]">
997 <span class="results_summary nlm">
998 <span class="label">NLM classification: </span>
999 <ul class="resource_list">
1000 <xsl:for-each select="marc:datafield[@tag=060]">
1002 <xsl:call-template name="subfieldSelect">
1003 <xsl:with-param name="codes">a</xsl:with-param>
1004 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
1005 </xsl:call-template>
1012 <!-- Other classification -->
1013 <xsl:if test="marc:datafield[@tag=084]">
1014 <span class="results_summary oc">
1015 <span class="label">Other classification: </span>
1016 <ul class="resource_list">
1017 <xsl:for-each select="marc:datafield[@tag=084]">
1019 <xsl:call-template name="subfieldSelect">
1020 <xsl:with-param name="codes">a</xsl:with-param>
1021 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
1022 </xsl:call-template>
1030 <!-- Image processing code added here, takes precedence over text links including y3z text -->
1031 <xsl:if test="marc:datafield[@tag=856]">
1032 <span class="results_summary online_resources">
1033 <span class="label">Online resources: </span>
1034 <ul class="resource_list">
1035 <xsl:for-each select="marc:datafield[@tag=856]">
1036 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
1040 <xsl:when test="$OPACTrackClicks='track'">
1041 <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>
1043 <xsl:when test="$OPACTrackClicks='anonymous'">
1044 <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>
1047 <xsl:attribute name="href">
1048 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
1050 <xsl:when test="@ind1=7">
1051 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
1053 <xsl:when test="@ind1=1">
1054 <xsl:text>ftp://</xsl:text>
1057 <xsl:text>http://</xsl:text>
1061 <xsl:value-of select="marc:subfield[@code='u']"/>
1065 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1066 <xsl:attribute name="target">_blank</xsl:attribute>
1069 <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')">
1070 <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>
1072 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1073 <xsl:call-template name="subfieldSelect">
1074 <xsl:with-param name="codes">y3z</xsl:with-param>
1075 </xsl:call-template>
1077 <xsl:when test="$URLLinkText!=''">
1078 <xsl:value-of select="$URLLinkText"/>
1081 <xsl:text>Click here to access online</xsl:text>
1092 <xsl:if test="marc:datafield[@tag=530]">
1093 <xsl:for-each select="marc:datafield[@tag=530]">
1094 <span class="results_summary additionalforms">
1095 <xsl:call-template name="subfieldSelect">
1096 <xsl:with-param name="codes">abcd</xsl:with-param>
1097 </xsl:call-template>
1098 <xsl:for-each select="marc:subfield[@code='u']">
1099 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1100 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1101 <xsl:attribute name="target">_blank</xsl:attribute>
1103 <xsl:value-of select="text()"/>
1110 <!-- 505 - Formatted contents note -->
1111 <xsl:if test="marc:datafield[@tag=505]">
1112 <div class="results_summary contents">
1113 <xsl:for-each select="marc:datafield[@tag=505]">
1114 <xsl:if test="position()=1">
1116 <xsl:when test="@ind1=1">
1117 <span class="label">Incomplete contents:</span>
1119 <xsl:when test="@ind1=2">
1120 <span class="label">Partial contents:</span>
1123 <span class="label">Contents:</span>
1127 <div class='contentblock' property='description'>
1129 <xsl:when test="@ind2=0">
1130 <xsl:call-template name="subfieldSelectSpan">
1131 <xsl:with-param name="newline">1</xsl:with-param>
1132 <xsl:with-param name="codes">trug</xsl:with-param>
1133 </xsl:call-template>
1136 <xsl:call-template name="subfieldSelectSpan">
1137 <xsl:with-param name="newline">1</xsl:with-param>
1138 <xsl:with-param name="codes">atrug</xsl:with-param>
1139 </xsl:call-template>
1148 <xsl:if test="marc:datafield[@tag=583 and not(@ind1=0)]">
1149 <span class="results_summary actionnote">
1150 <span class="label">Action note: </span>
1151 <ul class="resource_list">
1152 <xsl:for-each select="marc:datafield[@tag=583 and not(@ind1=0)]">
1155 <xsl:when test="marc:subfield[@code='z']">
1156 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1159 <xsl:call-template name="subfieldSelect">
1160 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1161 </xsl:call-template>
1171 <xsl:if test="marc:datafield[@tag=508]">
1172 <span class="results_summary prod_credits">
1173 <span class="label">Production credits: </span>
1174 <ul class="resource_list">
1175 <xsl:for-each select="marc:datafield[@tag=508]">
1177 <xsl:call-template name="subfieldSelectSpan">
1178 <xsl:with-param name="codes">a</xsl:with-param>
1179 </xsl:call-template>
1187 <xsl:if test="marc:datafield[@tag=586]">
1188 <span class="results_summary awardsnote">
1189 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1190 <span class="label">Awards: </span>
1192 <ul class="resource_list">
1193 <xsl:for-each select="marc:datafield[@tag=586]">
1195 <xsl:value-of select="marc:subfield[@code='a']"/>
1203 <xsl:if test="marc:datafield[@tag=773]">
1204 <xsl:for-each select="marc:datafield[@tag=773]">
1205 <xsl:if test="@ind1 !=1">
1206 <span class="results_summary in"><span class="label">
1208 <xsl:when test="@ind2=' '">
1211 <xsl:when test="@ind2=8">
1212 <xsl:if test="marc:subfield[@code='i']">
1213 <xsl:value-of select="marc:subfield[@code='i']"/>
1218 <xsl:variable name="f773">
1219 <xsl:call-template name="chopPunctuation">
1220 <xsl:with-param name="chopString">
1221 <xsl:call-template name="subfieldSelect">
1222 <xsl:with-param name="codes">a_t</xsl:with-param>
1223 </xsl:call-template>
1225 </xsl:call-template>
1228 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1229 <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>
1230 <xsl:value-of select="translate($f773, '()', '')"/>
1233 <xsl:when test="marc:subfield[@code='0']">
1234 <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>
1235 <xsl:value-of select="$f773"/>
1240 <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>
1241 <xsl:value-of select="$f773"/>
1245 <xsl:if test="marc:subfield[@code='g']">
1246 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1250 <xsl:if test="marc:subfield[@code='n']">
1251 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1258 <xsl:for-each select="marc:datafield[@tag=511]">
1259 <span class="results_summary perf_note">
1260 <span class="label">
1261 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1263 <xsl:call-template name="subfieldSelect">
1264 <xsl:with-param name="codes">a</xsl:with-param>
1265 </xsl:call-template>
1269 <xsl:if test="marc:datafield[@tag=502]">
1270 <span class="results_summary diss_note">
1271 <span class="label">Dissertation note: </span>
1272 <xsl:for-each select="marc:datafield[@tag=502]">
1273 <xsl:call-template name="subfieldSelect">
1274 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1275 </xsl:call-template>
1277 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1281 <xsl:for-each select="marc:datafield[@tag=520]">
1282 <span class="results_summary summary"><span class="label">
1284 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1285 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1286 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1287 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1288 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1289 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1292 <xsl:call-template name="subfieldSelect">
1293 <xsl:with-param name="codes">abcu</xsl:with-param>
1294 </xsl:call-template>
1298 <!-- 866 textual holdings -->
1299 <xsl:if test="marc:datafield[@tag=866]">
1300 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1301 <xsl:for-each select="marc:datafield[@tag=866]">
1302 <span class="holdings_note_data">
1303 <xsl:call-template name="subfieldSelect">
1304 <xsl:with-param name="codes">az</xsl:with-param>
1305 </xsl:call-template>
1306 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1312 <!-- 867 textual holdings -->
1313 <xsl:if test="marc:datafield[@tag=867]">
1314 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1315 <xsl:for-each select="marc:datafield[@tag=867]">
1316 <span class="holdings_note_data">
1317 <xsl:call-template name="subfieldSelect">
1318 <xsl:with-param name="codes">az</xsl:with-param>
1319 </xsl:call-template>
1320 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1326 <!-- 868 textual holdings -->
1327 <xsl:if test="marc:datafield[@tag=868]">
1328 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1329 <xsl:for-each select="marc:datafield[@tag=868]">
1330 <span class="holdings_note_data">
1331 <xsl:call-template name="subfieldSelect">
1332 <xsl:with-param name="codes">az</xsl:with-param>
1333 </xsl:call-template>
1334 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1340 <!-- 770 - Supplement/Special issue entry -->
1341 <xsl:if test="marc:datafield[@tag=770]">
1342 <span class="results_summary supplement">
1343 <span class="label">Supplement: </span>
1344 <ul class="resource_list">
1345 <xsl:for-each select="marc:datafield[@tag=770]">
1347 <xsl:if test="marc:subfield[@code='i']">
1348 <span class="770_rel_info">
1349 <xsl:call-template name="subfieldSelect">
1350 <xsl:with-param name="codes">i</xsl:with-param>
1351 </xsl:call-template>
1352 <xsl:text> </xsl:text>
1357 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1358 <xsl:attribute name="href">
1359 /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>
1363 <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>
1367 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1368 <xsl:call-template name="subfieldSelect">
1369 <xsl:with-param name="codes">a_t</xsl:with-param>
1370 </xsl:call-template>
1374 <xsl:text> </xsl:text>
1375 <xsl:call-template name="subfieldSelect">
1376 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1377 </xsl:call-template>
1384 <!-- 772 - Supplement parent entry -->
1385 <xsl:if test="marc:datafield[@tag=772]">
1386 <span class="results_summary supplement_parent">
1387 <span class="label">Supplement to: </span>
1388 <ul class="resource_list">
1389 <xsl:for-each select="marc:datafield[@tag=772]">
1391 <xsl:if test="marc:subfield[@code='i']">
1392 <span class="772_rel_info">
1393 <xsl:call-template name="subfieldSelect">
1394 <xsl:with-param name="codes">i</xsl:with-param>
1395 </xsl:call-template>
1396 <xsl:text> </xsl:text>
1401 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1402 <xsl:attribute name="href">
1403 /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>
1407 <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>
1411 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1412 <xsl:call-template name="subfieldSelect">
1413 <xsl:with-param name="codes">a_t</xsl:with-param>
1414 </xsl:call-template>
1418 <xsl:call-template name="subfieldSelect">
1419 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1420 </xsl:call-template>
1427 <!-- 775 Other Edition -->
1428 <xsl:if test="marc:datafield[@tag=775]">
1429 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1430 <xsl:for-each select="marc:datafield[@tag=775]">
1431 <xsl:variable name="f775">
1432 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1433 <xsl:with-param name="codes">a_t</xsl:with-param>
1434 </xsl:call-template></xsl:with-param></xsl:call-template>
1436 <xsl:if test="marc:subfield[@code='i']">
1437 <xsl:call-template name="subfieldSelect">
1438 <xsl:with-param name="codes">i</xsl:with-param>
1439 </xsl:call-template>
1440 <xsl:text>: </xsl:text>
1444 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1445 <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>
1448 <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>
1451 <xsl:call-template name="subfieldSelect">
1452 <xsl:with-param name="codes">a_t</xsl:with-param>
1453 </xsl:call-template>
1456 <xsl:when test="position()=last()"></xsl:when>
1457 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1464 <xsl:if test="marc:datafield[@tag=780]">
1465 <xsl:for-each select="marc:datafield[@tag=780]">
1466 <xsl:if test="@ind1=0">
1467 <span class="results_summary preceeding_entry">
1469 <xsl:when test="@ind2=0">
1470 <span class="label">Continues:</span>
1472 <xsl:when test="@ind2=1">
1473 <span class="label">Continues in part:</span>
1475 <xsl:when test="@ind2=2">
1476 <span class="label">Supersedes:</span>
1478 <xsl:when test="@ind2=3">
1479 <span class="label">Supersedes in part:</span>
1481 <xsl:when test="@ind2=4">
1482 <span class="label">Formed by the union: ... and: ...</span>
1484 <xsl:when test="@ind2=5">
1485 <span class="label">Absorbed:</span>
1487 <xsl:when test="@ind2=6">
1488 <span class="label">Absorbed in part:</span>
1490 <xsl:when test="@ind2=7">
1491 <span class="label">Separated from:</span>
1494 <xsl:text> </xsl:text>
1496 <xsl:if test="marc:subfield[@code='i']">
1497 <span class="780_rel_info">
1498 <xsl:value-of select="marc:subfield[@code='i']"/>
1499 <xsl:text> </xsl:text>
1503 <xsl:variable name="f780">
1504 <xsl:call-template name="subfieldSelect">
1505 <xsl:with-param name="codes">a_t</xsl:with-param>
1506 </xsl:call-template>
1510 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1511 <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>
1512 <xsl:value-of select="$f780"/>
1516 <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>
1517 <xsl:value-of select="$f780"/>
1523 <xsl:if test="marc:subfield[@code='n']">
1524 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1532 <xsl:if test="marc:datafield[@tag=785]">
1533 <xsl:for-each select="marc:datafield[@tag=785]">
1534 <xsl:if test="@ind1=0">
1535 <span class="results_summary succeeding_entry">
1537 <xsl:when test="@ind2=0">
1538 <span class="label">Continued by:</span>
1540 <xsl:when test="@ind2=1">
1541 <span class="label">Continued in part by:</span>
1543 <xsl:when test="@ind2=2">
1544 <span class="label">Superseded by:</span>
1546 <xsl:when test="@ind2=3">
1547 <span class="label">Superseded in part by:</span>
1549 <xsl:when test="@ind2=4">
1550 <span class="label">Absorbed by:</span>
1552 <xsl:when test="@ind2=5">
1553 <span class="label">Absorbed in part by:</span>
1555 <xsl:when test="@ind2=6">
1556 <span class="label">Split into .. and ...:</span>
1558 <xsl:when test="@ind2=7">
1559 <span class="label">Merged with ... to form ...</span>
1561 <xsl:when test="@ind2=8">
1562 <span class="label">Changed back to:</span>
1565 <xsl:text> </xsl:text>
1567 <xsl:if test="marc:subfield[@code='i']">
1568 <span class="785_rel_info">
1569 <xsl:value-of select="marc:subfield[@code='i']"/>
1570 <xsl:text> </xsl:text>
1574 <xsl:variable name="f785">
1575 <xsl:call-template name="subfieldSelect">
1576 <xsl:with-param name="codes">a_t</xsl:with-param>
1577 </xsl:call-template>
1581 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1582 <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>
1583 <xsl:value-of select="$f785"/>
1587 <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>
1588 <xsl:value-of select="$f785"/>
1594 <xsl:if test="marc:subfield[@code='n']">
1595 <span class="results_summary succeeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1603 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
1604 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
1605 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
1606 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
1608 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
1609 <xsl:variable name="openurltext">
1611 <xsl:when test="$OpenURLText != ''">
1612 <xsl:value-of select="$OpenURLText" />
1615 <xsl:text>OpenURL</xsl:text>
1620 <span class="results_summary"><a>
1621 <xsl:attribute name="href">
1622 <xsl:value-of select="$OpenURLResolverURL" />
1624 <xsl:attribute name="title">
1625 <xsl:value-of select="$openurltext" />
1627 <xsl:attribute name="class">
1628 <xsl:text>OpenURL</xsl:text>
1630 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1631 <xsl:attribute name="target">
1632 <xsl:text>_blank</xsl:text>
1636 <xsl:when test="$OpenURLImageLocation != ''">
1638 <xsl:attribute name="src">
1639 <xsl:value-of select="$OpenURLImageLocation" />
1644 <xsl:value-of select="$openurltext" />
1649 <!-- End of OpenURL -->
1651 <xsl:variable name="OPACShowMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACShowMusicalInscripts']" />
1652 <xsl:variable name="OPACPlayMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACPlayMusicalInscripts']" />
1654 <xsl:if test="$OPACShowMusicalInscripts = 1 and marc:datafield[@tag=031]">
1655 <xsl:for-each select="marc:datafield[@tag=031]">
1657 <span class="results_summary musical_inscripts">
1658 <xsl:if test="marc:subfield[@code='u']">
1661 <xsl:attribute name="href">
1662 <xsl:value-of select="marc:subfield[@code='u']"/>
1664 <xsl:text>Audio file</xsl:text>
1668 <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']">
1669 <div class="inscript" data-system="pae">
1670 <xsl:attribute name="data-clef">
1671 <xsl:value-of select="marc:subfield[@code='g']"/>
1673 <xsl:attribute name="data-keysig">
1674 <xsl:value-of select="marc:subfield[@code='n']"/>
1676 <xsl:attribute name="data-timesig">
1677 <xsl:value-of select="marc:subfield[@code='o']"/>
1679 <xsl:attribute name="data-notation">
1680 <xsl:value-of select="marc:subfield[@code='p']"/>
1683 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1684 <div class="audio_controls hide">
1685 <button class="btn play_btn">
1686 <i id="carticon" class="fa fa-play"></i>
1687 <xsl:text> Play this sample</xsl:text>
1694 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1695 <div class="results_summary">
1696 <span class="inscript_audio hide"></span>
1704 <xsl:template name="showAuthor">
1705 <xsl:param name="authorfield" />
1706 <xsl:param name="UseAuthoritiesForTracings" />
1707 <xsl:param name="materialTypeLabel" />
1708 <xsl:param name="theme" />
1709 <xsl:if test="count($authorfield)>0">
1710 <span class="results_summary author h3">
1711 <xsl:for-each select="$authorfield">
1713 <xsl:when test="position()>1"/>
1715 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1716 <!--#13382 Changed Additional author to contributor -->
1717 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1720 <ul class="resource_list">
1721 <xsl:for-each select="$authorfield">
1724 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1725 <xsl:when test="marc:subfield[@code='n']">
1726 <xsl:text> </xsl:text>
1727 <xsl:call-template name="subfieldSelect">
1728 <xsl:with-param name="codes">n</xsl:with-param>
1729 </xsl:call-template>
1730 <xsl:text> </xsl:text>
1735 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1736 <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>
1739 <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>
1742 <xsl:attribute name="class">contributors</xsl:attribute>
1743 <span resource="#record"><span>
1745 <xsl:when test="substring(@tag, 1, 1)='1'">
1747 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1748 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1751 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1754 <xsl:when test="substring(@tag, 2, 1)='0'">
1756 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1757 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1760 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1762 <span property="name">
1764 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1766 <xsl:call-template name="chopPunctuation">
1767 <xsl:with-param name="chopString">
1768 <xsl:call-template name="subfieldSelect">
1769 <xsl:with-param name="codes">
1771 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1772 <xsl:when test="@tag=111">aeq</xsl:when>
1773 <xsl:when test="@tag=110">ab</xsl:when>
1774 <xsl:otherwise>abcjq</xsl:otherwise>
1777 </xsl:call-template>
1779 <xsl:with-param name="punctuation">
1780 <xsl:text>:,;/ </xsl:text>
1782 </xsl:call-template>
1783 <!-- Display only name and title portion in 110 field -->
1784 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1785 <span class="titleportion">
1787 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1788 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1790 <xsl:call-template name="chopPunctuation">
1791 <xsl:with-param name="chopString">
1792 <xsl:call-template name="subfieldSelect">
1793 <xsl:with-param name="codes">cdnt</xsl:with-param>
1794 </xsl:call-template>
1796 </xsl:call-template>
1799 <!-- Display only name and title portion in 111 field -->
1800 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1801 <span class="titleportion">
1803 <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>
1804 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1807 <xsl:call-template name="chopPunctuation">
1808 <xsl:with-param name="chopString">
1809 <xsl:call-template name="subfieldSelect">
1810 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1811 </xsl:call-template>
1813 </xsl:call-template>
1816 <!-- Display only dates in 100 field -->
1817 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1818 <span class="authordates">
1819 <xsl:text>, </xsl:text>
1820 <xsl:call-template name="chopPunctuation">
1821 <xsl:with-param name="chopString">
1822 <xsl:call-template name="subfieldSelect">
1823 <xsl:with-param name="codes">d</xsl:with-param>
1824 </xsl:call-template>
1826 </xsl:call-template>
1830 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1831 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1832 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1833 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1834 <xsl:if test="@tag=710 or @tag=711">
1835 <xsl:call-template name="chopPunctuation">
1836 <xsl:with-param name="chopString">
1837 <xsl:call-template name="subfieldSelect">
1838 <xsl:with-param name="codes">
1840 <xsl:when test="@tag=711">aeq</xsl:when>
1841 <xsl:otherwise>ab</xsl:otherwise>
1844 </xsl:call-template>
1846 <xsl:with-param name="punctuation">
1847 <xsl:text>:,;/ </xsl:text>
1849 </xsl:call-template>
1850 <!-- Display only name and title portion in 711 field -->
1851 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1852 <span class="titleportion">
1854 <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>
1855 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1858 <xsl:call-template name="chopPunctuation">
1859 <xsl:with-param name="chopString">
1860 <xsl:call-template name="subfieldSelect">
1861 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1862 </xsl:call-template>
1864 </xsl:call-template>
1867 <!-- Display only name and title portion in 710 field -->
1868 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1869 <span class="titleportion">
1871 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1872 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1874 <xsl:call-template name="chopPunctuation">
1875 <xsl:with-param name="chopString">
1876 <xsl:call-template name="subfieldSelect">
1877 <xsl:with-param name="codes">cdnt</xsl:with-param>
1878 </xsl:call-template>
1880 </xsl:call-template>
1885 <!-- Display only name portion in 700 field -->
1886 <xsl:if test="@tag=700">
1887 <xsl:call-template name="chopPunctuation">
1888 <xsl:with-param name="chopString">
1889 <xsl:call-template name="subfieldSelect">
1890 <xsl:with-param name="codes">abcq</xsl:with-param>
1891 </xsl:call-template>
1893 </xsl:call-template>
1895 <!-- Display class "authordates" in 700 field -->
1896 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1897 <span class="authordates">
1898 <xsl:text>, </xsl:text>
1899 <xsl:call-template name="chopPunctuation">
1900 <xsl:with-param name="chopString">
1901 <xsl:call-template name="subfieldSelect">
1902 <xsl:with-param name="codes">d</xsl:with-param>
1903 </xsl:call-template>
1905 </xsl:call-template>
1908 <!-- Display class "titleportion" in 700 field -->
1909 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1910 <xsl:if test="@tag=700 and $titleportionfields">
1911 <span class="titleportion">
1912 <xsl:text>. </xsl:text>
1913 <xsl:call-template name="chopPunctuation">
1914 <xsl:with-param name="chopString">
1915 <xsl:call-template name="subfieldSelect">
1916 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1917 </xsl:call-template>
1919 </xsl:call-template>
1925 </span></span></span>
1927 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1928 <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'])">
1930 <span class="relatorcode">
1931 <xsl:text> [</xsl:text>
1933 <xsl:when test="@tag=111 or @tag=711">
1935 <!-- Prefer j over 4 for 111 and 711 -->
1936 <xsl:when test="marc:subfield[@code='j']">
1937 <xsl:for-each select="marc:subfield[@code='j']">
1938 <xsl:value-of select="."/>
1939 <xsl:if test="position() != last()">, </xsl:if>
1943 <xsl:for-each select="marc:subfield[@code=4]">
1944 <xsl:value-of select="."/>
1945 <xsl:if test="position() != last()">, </xsl:if>
1950 <!-- Prefer e over 4 on 100 and 110-->
1951 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1952 <xsl:for-each select="marc:subfield[@code='e']">
1953 <xsl:value-of select="."/>
1954 <xsl:if test="position() != last()">, </xsl:if>
1958 <xsl:for-each select="marc:subfield[@code=4]">
1959 <xsl:value-of select="."/>
1960 <xsl:if test="position() != last()">, </xsl:if>
1964 <xsl:text>]</xsl:text>
1968 <xsl:if test="marc:subfield[@code=9]">
1969 <a class='authlink'>
1970 <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>
1971 <xsl:element name="i">
1972 <xsl:attribute name="class">fa fa-search</xsl:attribute>
1983 <xsl:template name="nameABCQ">
1984 <xsl:call-template name="chopPunctuation">
1985 <xsl:with-param name="chopString">
1986 <xsl:call-template name="subfieldSelect">
1987 <xsl:with-param name="codes">abcq</xsl:with-param>
1988 </xsl:call-template>
1990 <xsl:with-param name="punctuation">
1991 <xsl:text>:,;/ </xsl:text>
1993 </xsl:call-template>
1996 <xsl:template name="nameABCDN">
1997 <xsl:call-template name="chopPunctuation">
1998 <xsl:with-param name="chopString">
1999 <xsl:call-template name="subfieldSelect">
2000 <xsl:with-param name="codes">abcdn</xsl:with-param>
2001 </xsl:call-template>
2003 <xsl:with-param name="punctuation">
2004 <xsl:text>:,;/ </xsl:text>
2006 </xsl:call-template>
2009 <xsl:template name="nameACDEQ">
2010 <xsl:call-template name="subfieldSelect">
2011 <xsl:with-param name="codes">acdeq</xsl:with-param>
2012 </xsl:call-template>
2015 <xsl:template name="specialSubfieldSelect">
2016 <xsl:param name="anyCodes"/>
2017 <xsl:param name="axis"/>
2018 <xsl:param name="beforeCodes"/>
2019 <xsl:param name="afterCodes"/>
2020 <xsl:variable name="str">
2021 <xsl:for-each select="marc:subfield">
2022 <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])">
2023 <xsl:value-of select="text()"/>
2024 <xsl:text> </xsl:text>
2028 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
2031 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
2032 <xsl:template name="subfieldSelectSubject">
2033 <xsl:param name="codes"/>
2034 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
2035 <xsl:param name="subdivCodes"/>
2036 <xsl:param name="subdivDelimiter"/>
2037 <xsl:param name="prefix"/>
2038 <xsl:param name="suffix"/>
2039 <xsl:param name="urlencode"/>
2040 <xsl:variable name="str">
2041 <xsl:for-each select="marc:subfield">
2042 <xsl:if test="contains($codes, @code)">
2043 <xsl:if test="contains($subdivCodes, @code)">
2044 <xsl:value-of select="$subdivDelimiter"/>
2046 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
2051 <xsl:when test="$urlencode=1">
2052 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
2055 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>