1 <?xml version="1.0" encoding="UTF-8"?>
5 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
6 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
7 <xsl:stylesheet version="1.0"
8 xmlns:marc="http://www.loc.gov/MARC21/slim"
9 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 xmlns:str="http://exslt.org/strings"
11 exclude-result-prefixes="marc str">
12 <xsl:import href="MARC21slimUtils.xsl"/>
13 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
18 <xsl:template match="marc:record">
20 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
21 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
25 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
26 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
27 <xsl:variable name="AuthorLinkSortBy" select="marc:sysprefs/marc:syspref[@name='AuthorLinkSortBy']"/>
28 <xsl:variable name="AuthorLinkSortOrder" select="marc:sysprefs/marc:syspref[@name='AuthorLinkSortOrder']"/>
29 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
30 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
31 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
32 <xsl:variable name="OpacSuppression" select="marc:sysprefs/marc:syspref[@name='OpacSuppression']"/>
33 <xsl:variable name="TracingQuotesLeft">
35 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICUStyleQuotes']='1'">{</xsl:when>
36 <xsl:otherwise>"</xsl:otherwise>
39 <xsl:variable name="TracingQuotesRight">
41 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICUStyleQuotes']='1'">}</xsl:when>
42 <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 <!-- Title Statement -->
103 <!-- Alternate Graphic Representation (MARC 880) -->
104 <xsl:if test="$display880">
106 <xsl:call-template name="m880Select">
107 <xsl:with-param name="basetags">245</xsl:with-param>
108 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
114 <xsl:if test="marc:datafield[@tag=245]">
115 <h1 class="title" property="name">
116 <xsl:for-each select="marc:datafield[@tag=245]">
117 <xsl:call-template name="subfieldSelect">
118 <xsl:with-param name="codes">a</xsl:with-param>
120 <xsl:text> </xsl:text>
121 <!-- 13381 add additional subfields-->
122 <!-- bz 17625 adding subfields f and g -->
123 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
125 <xsl:when test="@code='h'">
126 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
127 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
129 <xsl:when test="@code='c'">
130 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
131 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
134 <xsl:apply-templates/>
135 <xsl:text> </xsl:text>
143 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
144 <xsl:if test="$display880">
146 <xsl:call-template name="m880Select">
147 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
148 <xsl:with-param name="codes">abc</xsl:with-param>
149 <xsl:with-param name="index">au</xsl:with-param>
150 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
151 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
156 <!-- Author Statement -->
157 <xsl:call-template name="showAuthor">
158 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
159 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
160 <xsl:with-param name="AuthorLinkSortOrder" select="$AuthorLinkSortOrder"/>
161 <xsl:with-param name="AuthorLinkSortBy" select="$AuthorLinkSortBy"/>
164 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
165 <xsl:call-template name="showAuthor">
166 <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'])]"/>
167 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
168 <xsl:with-param name="AuthorLinkSortOrder" select="$AuthorLinkSortOrder"/>
169 <xsl:with-param name="AuthorLinkSortBy" select="$AuthorLinkSortBy"/>
172 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
173 <span class="results_summary type"><span class="label">Material type: </span>
174 <xsl:element name="img"><xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
175 <xsl:text> </xsl:text>
176 <xsl:value-of select="$materialTypeLabel"/>
180 <xsl:call-template name="show-lang-041"/>
182 <!--Series: Alternate Graphic Representation (MARC 880) -->
183 <xsl:if test="$display880">
184 <xsl:call-template name="m880Select">
185 <xsl:with-param name="basetags">440,490</xsl:with-param>
186 <xsl:with-param name="codes">av</xsl:with-param>
187 <xsl:with-param name="class">results_summary series</xsl:with-param>
188 <xsl:with-param name="label">Series: </xsl:with-param>
189 <xsl:with-param name="index">se</xsl:with-param>
193 <xsl:call-template name="show-series">
194 <xsl:with-param name="searchurl">/cgi-bin/koha/catalogue/search.pl</xsl:with-param>
195 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
196 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
199 <!-- Analytics information -->
200 <xsl:variable name="leader7_class">
202 <!--xsl:when test="$leader7='a'">analytic_mcp</xsl:when-->
203 <!--xsl:when test="$leader7='b'">analytic_scp</xsl:when-->
204 <xsl:when test="$leader7='c'">analytic_collection</xsl:when>
205 <xsl:when test="$leader7='d'">analytic_subunit</xsl:when>
206 <xsl:when test="$leader7='i'">analytic_ires</xsl:when>
207 <xsl:when test="$leader7='m'">analytic_monograph</xsl:when>
208 <xsl:when test="$leader7='s'">analytic_serial</xsl:when>
209 <xsl:otherwise>analytic_undefined</xsl:otherwise>
213 <xsl:variable name="show_analytics_link" select="marc:variables/marc:variable[@name='show_analytics_link']" />
214 <xsl:if test="$show_analytics_link='1'">
215 <xsl:element name="span">
216 <xsl:attribute name="class">results_summary analytics <xsl:value-of select="$leader7_class"/></xsl:attribute>
217 <span class="label">Analytics: </span>
220 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
221 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
224 <xsl:variable name="title_query">
225 <xsl:value-of select="'Host-item:('"/>
226 <xsl:call-template name="quote_search_term">
227 <xsl:with-param name="term"><xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='a']"/></xsl:with-param>
229 <xsl:text>)</xsl:text>
231 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($title_query, true())"/></xsl:attribute>
234 <xsl:text>Show analytics</xsl:text>
239 <!-- Volumes of sets and traced series -->
240 <xsl:variable name="show_volumes_link" select="marc:variables/marc:variable[@name='show_volumes_link']" />
241 <xsl:variable name="title" select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())" />
242 <xsl:if test="$show_volumes_link='1' and ($materialTypeCode='ST' or substring($controlField008,22,1)='m')">
243 <span class="results_summary volumes"><span class="label">Volumes: </span>
246 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
247 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
250 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=title-series,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>
253 <xsl:text>Show volumes</xsl:text>
259 <xsl:if test="$leader19='c'">
260 <span class="results_summary set"><span class="label">Set: </span>
261 <xsl:for-each select="marc:datafield[@tag=773]">
264 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
265 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
268 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
271 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
274 <xsl:when test="position()=last()"></xsl:when>
275 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
281 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
282 <xsl:if test="$display880">
283 <xsl:call-template name="m880Select">
284 <xsl:with-param name="basetags">260,264</xsl:with-param>
285 <xsl:with-param name="codes">abcg</xsl:with-param>
286 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
287 <xsl:with-param name="label">Publication details: </xsl:with-param>
291 <!-- Publisher info and RDA related info from tags 260, 264 -->
293 <xsl:when test="marc:datafield[@tag=264]">
294 <xsl:call-template name="showRDAtag264">
295 <xsl:with-param name="show_url">1</xsl:with-param>
298 <xsl:when test="marc:datafield[@tag=260]">
299 <span class="results_summary publisher"><span class="label">Publication details: </span>
300 <xsl:for-each select="marc:datafield[@tag=260]">
301 <xsl:for-each select="marc:subfield">
302 <xsl:if test="@code='a'">
304 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
305 <xsl:value-of select="current()"/>
308 <xsl:if test="@code='b'">
310 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
311 <xsl:value-of select="current()"/>
314 <xsl:if test="@code='c'">
316 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
317 <xsl:value-of select="current()"/>
320 <xsl:if test="@code='g'">
321 <xsl:call-template name="chopPunctuation">
322 <xsl:with-param name="chopString">
323 <xsl:value-of select="current()"/>
327 <xsl:if test="position() != last()">
328 <xsl:text> </xsl:text>
331 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
337 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
338 <xsl:if test="$display880">
339 <xsl:call-template name="m880Select">
340 <xsl:with-param name="basetags">250</xsl:with-param>
341 <xsl:with-param name="codes">ab</xsl:with-param>
342 <xsl:with-param name="class">results_summary edition</xsl:with-param>
343 <xsl:with-param name="label">Edition: </xsl:with-param>
347 <xsl:if test="marc:datafield[@tag=250]">
348 <span class="results_summary edition"><span class="label">Edition: </span>
349 <xsl:for-each select="marc:datafield[@tag=250]">
350 <xsl:call-template name="chopPunctuation">
351 <xsl:with-param name="chopString">
352 <xsl:call-template name="subfieldSelect">
353 <xsl:with-param name="codes">ab</xsl:with-param>
357 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
362 <!-- Description: Alternate Graphic Representation (MARC 880) -->
363 <xsl:if test="$display880">
364 <xsl:call-template name="m880Select">
365 <xsl:with-param name="basetags">300</xsl:with-param>
366 <xsl:with-param name="codes">abceg</xsl:with-param>
367 <xsl:with-param name="class">results_summary description</xsl:with-param>
368 <xsl:with-param name="label">Description: </xsl:with-param>
372 <xsl:if test="marc:datafield[@tag=300]">
373 <span class="results_summary description"><span class="label">Description: </span>
374 <xsl:for-each select="marc:datafield[@tag=300]">
375 <xsl:call-template name="chopPunctuation">
376 <xsl:with-param name="chopString">
377 <xsl:call-template name="subfieldSelect">
378 <xsl:with-param name="codes">abcefg</xsl:with-param>
382 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
387 <!-- Content Type -->
388 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
389 <span class="results_summary" id="content_type">
390 <xsl:if test="marc:datafield[@tag=336]">
391 <span class="label">Content type: </span>
392 <xsl:for-each select="marc:datafield[@tag=336]">
393 <xsl:call-template name="subfieldSelect">
394 <xsl:with-param name="codes">a</xsl:with-param>
395 <xsl:with-param name="delimeter">, </xsl:with-param>
397 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
400 <xsl:text> </xsl:text>
402 <xsl:if test="marc:datafield[@tag=337]">
403 <span class="label">Media type: </span>
404 <xsl:for-each select="marc:datafield[@tag=337]">
405 <xsl:call-template name="subfieldSelect">
406 <xsl:with-param name="codes">a</xsl:with-param>
407 <xsl:with-param name="delimeter">, </xsl:with-param>
409 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
412 <xsl:text> </xsl:text>
414 <xsl:if test="marc:datafield[@tag=338]">
415 <span class="label">Carrier type: </span>
416 <xsl:for-each select="marc:datafield[@tag=338]">
417 <xsl:call-template name="subfieldSelect">
418 <xsl:with-param name="codes">a</xsl:with-param>
419 <xsl:with-param name="delimeter">, </xsl:with-param>
421 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
427 <!-- 385 - Audience -->
428 <xsl:if test="marc:datafield[@tag=385]">
429 <span class="results_summary audience">
430 <span class="label">Audience: </span>
431 <xsl:for-each select="marc:datafield[@tag=385]">
432 <xsl:if test="marc:subfield[@code='m']">
433 <xsl:call-template name="chopPunctuation">
434 <xsl:with-param name="chopString">
435 <xsl:call-template name="subfieldSelect">
436 <xsl:with-param name="codes">m</xsl:with-param>
440 <xsl:text>: </xsl:text>
442 <xsl:call-template name="chopPunctuation">
443 <xsl:with-param name="chopString">
444 <xsl:call-template name="subfieldSelect">
445 <xsl:with-param name="codes">a</xsl:with-param>
446 <xsl:with-param name="delimeter">, </xsl:with-param>
450 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise></xsl:choose>
455 <xsl:call-template name="showISBNISSN"/>
457 <xsl:if test="marc:datafield[@tag=013]">
458 <span class="results_summary patent_info">
459 <span class="label">Patent information: </span>
460 <xsl:for-each select="marc:datafield[@tag=013]">
461 <xsl:call-template name="subfieldSelect">
462 <xsl:with-param name="codes">acdef</xsl:with-param>
463 <xsl:with-param name="delimeter">, </xsl:with-param>
465 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
470 <xsl:if test="marc:datafield[@tag=088]">
471 <span class="results_summary report_number">
472 <span class="label">Report number: </span>
473 <xsl:for-each select="marc:datafield[@tag=088]">
474 <xsl:call-template name="subfieldSelect">
475 <xsl:with-param name="codes">a</xsl:with-param>
477 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
482 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
483 <xsl:if test="$display880">
484 <xsl:call-template name="m880Select">
485 <xsl:with-param name="basetags">246</xsl:with-param>
486 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
487 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
488 <xsl:with-param name="label">Other title: </xsl:with-param>
492 <xsl:if test="marc:datafield[@tag=246]">
493 <span class="results_summary other_title"><span class="label">Other title: </span>
494 <xsl:for-each select="marc:datafield[@tag=246]">
495 <xsl:if test="marc:subfield[@code='i']">
496 <xsl:call-template name="subfieldSelect">
497 <xsl:with-param name="codes">i</xsl:with-param>
500 <xsl:text> </xsl:text>
501 <xsl:call-template name="chopPunctuation">
502 <xsl:with-param name="chopString">
503 <xsl:call-template name="subfieldSelect">
504 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
508 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
510 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
511 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
512 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
513 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
514 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
515 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
516 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
517 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
518 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
521 <!-- #13386 added separator | -->
522 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose>
527 <xsl:if test="marc:datafield[@tag=242]">
528 <span class="results_summary translated_title"><span class="label">Title translated: </span>
529 <xsl:for-each select="marc:datafield[@tag=242]">
530 <xsl:call-template name="chopPunctuation">
531 <xsl:with-param name="chopString">
532 <xsl:call-template name="subfieldSelect">
533 <xsl:with-param name="codes">abchnp</xsl:with-param>
537 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
542 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
543 <xsl:if test="$display880">
544 <xsl:call-template name="m880Select">
545 <xsl:with-param name="basetags">130,240</xsl:with-param>
546 <xsl:with-param name="codes">adfklmor</xsl:with-param>
547 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
548 <xsl:with-param name="label">Uniform title: </xsl:with-param>
552 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
553 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
554 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
555 <xsl:if test="marc:subfield[@code='i']">
556 <xsl:call-template name="subfieldSelect">
557 <xsl:with-param name="codes">i</xsl:with-param>
560 <xsl:text> </xsl:text>
561 <xsl:for-each select="marc:subfield">
562 <xsl:if test="contains('adfghklmnoprst',@code)">
563 <xsl:value-of select="text()"/>
564 <xsl:text> </xsl:text>
567 <xsl:if test="position() != last()">
568 <span class="separator"><xsl:text> | </xsl:text></span>
574 <!-- #13382 Added Related works 700$i -->
575 <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']]">
576 <span class="results_summary related_works"><span class="label">Related works: </span>
577 <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']]">
578 <xsl:variable name="str">
579 <xsl:call-template name="subfieldSelect">
580 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
583 <xsl:call-template name="chopPunctuation">
584 <xsl:with-param name="chopString">
585 <xsl:value-of select="$str"/>
588 <!-- add relator code too between brackets-->
589 <xsl:if test="marc:subfield[@code='4' or @code='e']">
590 <span class="relatorcode">
591 <xsl:text> [</xsl:text>
593 <xsl:when test="marc:subfield[@code='e']">
594 <xsl:for-each select="marc:subfield[@code='e']">
595 <xsl:value-of select="."/>
596 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
600 <xsl:for-each select="marc:subfield[@code='4']">
601 <xsl:value-of select="."/>
602 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
606 <xsl:text>]</xsl:text>
610 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
616 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
617 <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'])]">
618 <span class="results_summary contained_works"><span class="label">Contained works: </span>
619 <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'])]">
620 <xsl:variable name="str">
621 <xsl:call-template name="subfieldSelect">
622 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
625 <xsl:call-template name="chopPunctuation">
626 <xsl:with-param name="chopString">
627 <xsl:value-of select="$str"/>
630 <!-- add relator code too between brackets-->
631 <xsl:if test="marc:subfield[@code='4' or @code='e']">
632 <span class="relatorcode">
633 <xsl:text> [</xsl:text>
635 <xsl:when test="marc:subfield[@code='e']">
636 <xsl:for-each select="marc:subfield[@code='e']">
637 <xsl:value-of select="."/>
638 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
642 <xsl:for-each select="marc:subfield[@code='4']">
643 <xsl:value-of select="."/>
644 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
648 <xsl:text>]</xsl:text>
652 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
659 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
660 <span class="results_summary subjects"><span class="label">Subject(s): </span>
661 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
664 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
665 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
666 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
668 <xsl:when test="$TraceSubjectSubdivisions='1'">
669 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
670 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
671 <xsl:with-param name="delimeter"> AND </xsl:with-param>
672 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
673 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
674 <xsl:with-param name="urlencode">1</xsl:with-param>
679 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
681 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
685 <xsl:call-template name="chopPunctuation">
686 <xsl:with-param name="chopString">
687 <xsl:call-template name="subfieldSelect">
688 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
689 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
690 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
696 <xsl:if test="marc:subfield[@code=9]">
697 <xsl:call-template name="showAuthlink">
698 <xsl:with-param name="authid"><xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:with-param>
703 <xsl:when test="position()=last()"></xsl:when>
704 <xsl:otherwise> | </xsl:otherwise>
712 <xsl:if test="marc:datafield[@tag=655]">
713 <span class="results_summary genre"><span class="label">Genre/Form: </span>
714 <xsl:for-each select="marc:datafield[@tag=655]">
717 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
718 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
720 <xsl:when test="$TraceSubjectSubdivisions='1'">
721 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
722 <xsl:with-param name="codes">avxyz</xsl:with-param>
723 <xsl:with-param name="delimeter"> AND </xsl:with-param>
724 <xsl:with-param name="prefix">(index-term-genre<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
725 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
726 <xsl:with-param name="urlencode">1</xsl:with-param>
731 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=index-term-genre<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
734 <xsl:call-template name="subfieldSelect">
735 <xsl:with-param name="codes">avxyz</xsl:with-param>
736 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
737 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
742 <xsl:if test="marc:subfield[@code=9]">
743 <xsl:call-template name="showAuthlink">
744 <xsl:with-param name="authid"><xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:with-param>
747 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
752 <!-- MARC21 776 Additional Physical Form Entry -->
753 <xsl:if test="marc:datafield[@tag=776]">
754 <span class="results_summary add_physical_form">
755 <span class="label">Additional physical formats: </span>
756 <xsl:for-each select="marc:datafield[@tag=776]">
757 <xsl:variable name="linktext">
759 <xsl:when test="marc:subfield[@code='t']">
760 <xsl:value-of select="marc:subfield[@code='t']"/>
762 <xsl:when test="marc:subfield[@code='a']">
763 <xsl:value-of select="marc:subfield[@code='a']"/>
766 <xsl:text>No title</xsl:text>
770 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
771 <xsl:call-template name="subfieldSelect">
772 <xsl:with-param name="codes">i</xsl:with-param>
774 <xsl:text>: </xsl:text>
777 <xsl:when test="marc:subfield[@code='w']">
779 <xsl:attribute name="href">
780 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
781 <xsl:call-template name="extractControlNumber">
782 <xsl:with-param name="subfieldW">
783 <xsl:value-of select="marc:subfield[@code='w']"/>
787 <xsl:value-of select="$linktext"/>
791 <xsl:value-of select="$linktext"/>
794 <xsl:if test="position() != last()">
795 <xsl:text>; </xsl:text>
801 <!-- MARC21 777 - Issued With Entry -->
802 <xsl:if test="marc:datafield[@tag=777]">
803 <xsl:for-each select="marc:datafield[@tag=777]">
804 <xsl:if test="@ind1 != 1">
805 <span class="results_summary issued_with">
808 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
809 <xsl:value-of select="marc:subfield[@code='i']"/>
812 <xsl:text>Issued with:</xsl:text>
815 <xsl:text> </xsl:text>
817 <xsl:variable name="f777">
818 <xsl:call-template name="chopPunctuation">
819 <xsl:with-param name="chopString">
820 <xsl:call-template name="subfieldSelect">
821 <xsl:with-param name="codes">a_t</xsl:with-param>
827 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
828 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
829 <xsl:value-of select="translate($f777, '()', '')"/>
833 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/></xsl:attribute>
834 <xsl:value-of select="$f777"/>
838 <xsl:if test="marc:subfield[@code='g']">
839 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
842 <xsl:if test="marc:subfield[@code='n']">
843 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
849 <!-- Publisher or Distributor Number -->
850 <xsl:if test="marc:datafield[@tag=028]">
851 <span class="results_summary publisher_number ">
852 <span class="label">Publisher number: </span>
853 <xsl:for-each select="marc:datafield[@tag=028]">
854 <xsl:call-template name="subfieldSelect">
855 <xsl:with-param name="codes">abq</xsl:with-param>
856 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
862 <!-- DDC classification -->
863 <xsl:if test="marc:datafield[@tag=082]">
864 <span class="results_summary ddc">
865 <span class="label">DDC classification: </span>
866 <xsl:for-each select="marc:datafield[@tag=082]">
867 <xsl:call-template name="subfieldSelect">
868 <xsl:with-param name="codes">a</xsl:with-param>
869 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
872 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
873 <xsl:otherwise> | </xsl:otherwise>
879 <!-- LOC classification -->
880 <xsl:if test="marc:datafield[@tag=050]">
881 <span class="results_summary loc">
882 <span class="label">LOC classification: </span>
883 <xsl:for-each select="marc:datafield[@tag=050]">
884 <xsl:call-template name="subfieldSelect">
885 <xsl:with-param name="codes">ab</xsl:with-param>
886 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
892 <!-- NLM classification -->
893 <xsl:if test="marc:datafield[@tag=060]">
894 <span class="results_summary nlm">
895 <span class="label">NLM classification: </span>
896 <xsl:for-each select="marc:datafield[@tag=060]">
897 <xsl:call-template name="subfieldSelect">
898 <xsl:with-param name="codes">a</xsl:with-param>
899 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
901 <xsl:if test="not(position()=last())"><xsl:text> | </xsl:text></xsl:if>
906 <!-- Other classification -->
907 <xsl:if test="marc:datafield[@tag=084]">
908 <span class="results_summary oc">
909 <span class="label">Other classification: </span>
910 <xsl:for-each select="marc:datafield[@tag=084]">
911 <xsl:call-template name="subfieldSelect">
912 <xsl:with-param name="codes">a</xsl:with-param>
913 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
916 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
917 <xsl:otherwise> | </xsl:otherwise>
923 <xsl:if test="marc:datafield[@tag=856]">
924 <xsl:if test="marc:datafield[@tag=856]/marc:subfield[@code='u']">
925 <span class="results_summary online_resources">
926 <span class="label">Online resources: </span>
927 <xsl:for-each select="marc:datafield[@tag=856]">
928 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
930 <xsl:attribute name="href">
931 <xsl:call-template name="AddMissingProtocol">
932 <xsl:with-param name="resourceLocation" select="marc:subfield[@code='u']"/>
933 <xsl:with-param name="indicator1" select="@ind1"/>
934 <xsl:with-param name="accessMethod" select="marc:subfield[@code='2']"/>
936 <xsl:value-of select="marc:subfield[@code='u']"/>
938 <xsl:if test="not(marc:subfield[@code='u'])">
939 <xsl:attribute name="style">pointer-events: none; color: #202020;</xsl:attribute>
942 <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')">
943 <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="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
945 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z'] and marc:subfield[@code='u']">
946 <xsl:call-template name="subfieldSelect">
947 <xsl:with-param name="codes">y3z</xsl:with-param>
950 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
952 <xsl:when test="$URLLinkText!=''">
953 <xsl:value-of select="$URLLinkText"/>
955 <xsl:when test="marc:subfield[@code='u']">
956 <xsl:text>Click here to access online</xsl:text>
963 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
964 <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>
971 <!-- 505 - Formatted contents note -->
972 <xsl:if test="marc:datafield[@tag=505]">
973 <div class="results_summary contents">
975 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
976 <span class="label">Contents:</span>
978 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
979 <span class="label">Incomplete contents:</span>
981 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
982 <span class="label">Partial contents:</span>
985 <xsl:for-each select="marc:datafield[@tag=505]">
986 <div class='contentblock'>
988 <xsl:when test="@ind2=0">
989 <xsl:call-template name="subfieldSelectSpan">
990 <xsl:with-param name="newline">1</xsl:with-param>
991 <xsl:with-param name="codes">trug</xsl:with-param>
995 <xsl:call-template name="subfieldSelectSpan">
996 <xsl:with-param name="newline">1</xsl:with-param>
997 <xsl:with-param name="codes">atrug</xsl:with-param>
1007 <xsl:if test="marc:datafield[@tag=586]">
1008 <span class="results_summary awardsnote">
1009 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1010 <span class="label">Awards: </span>
1012 <xsl:for-each select="marc:datafield[@tag=586]">
1013 <xsl:value-of select="marc:subfield[@code='a']"/>
1014 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1020 <xsl:if test="marc:datafield[@tag=508]">
1021 <span class="results_summary prod_credits">
1022 <span class="label">Production credits: </span>
1023 <xsl:for-each select="marc:datafield[@tag=508]">
1024 <xsl:call-template name="subfieldSelectSpan">
1025 <xsl:with-param name="codes">a</xsl:with-param>
1026 </xsl:call-template>
1027 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1033 <xsl:if test="marc:datafield[@tag=583]">
1034 <span class="results_summary actionnote">
1035 <span class="label">Action note: </span>
1036 <xsl:for-each select="marc:datafield[@tag=583]">
1038 <xsl:when test="marc:subfield[@code='z']">
1039 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1042 <xsl:call-template name="subfieldSelect">
1043 <xsl:with-param name="codes">abcdefghijklnoux</xsl:with-param>
1044 </xsl:call-template>
1047 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1052 <xsl:call-template name="host-item-entries">
1053 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
1054 </xsl:call-template>
1056 <xsl:if test="marc:datafield[@tag=502]">
1057 <span class="results_summary diss_note">
1058 <span class="label">Dissertation note: </span>
1059 <xsl:for-each select="marc:datafield[@tag=502]">
1060 <xsl:call-template name="subfieldSelect">
1061 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1062 </xsl:call-template>
1064 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1069 <xsl:if test="marc:datafield[@tag=530]">
1070 <span class="results_summary additionalforms">
1071 <span class="label">Available additional physical forms:</span>
1072 <xsl:for-each select="marc:datafield[@tag=530]">
1073 <xsl:call-template name="subfieldSelect">
1074 <xsl:with-param name="codes">abcd</xsl:with-param>
1075 </xsl:call-template>
1076 <xsl:if test="marc:subfield[@code='u']">
1077 <xsl:for-each select="marc:subfield[@code='u']">
1078 <xsl:text> </xsl:text>
1080 <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1081 <xsl:value-of select="text()"/>
1085 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1090 <!-- 520 - Summary, etc. -->
1091 <xsl:for-each select="marc:datafield[@tag=520]">
1092 <span class="results_summary summary">
1093 <span class="label">
1095 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1096 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1097 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1098 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1099 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1100 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1103 <xsl:call-template name="subfieldSelect">
1104 <xsl:with-param name="codes">abc</xsl:with-param>
1105 </xsl:call-template>
1106 <xsl:if test="marc:subfield[@code='u']">
1107 <xsl:for-each select="marc:subfield[@code='u']">
1108 <xsl:text> </xsl:text>
1110 <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1111 <xsl:value-of select="text()"/>
1118 <!-- Content Warning -->
1119 <xsl:variable name="ContentWarningField" select="marc:sysprefs/marc:syspref[@name='ContentWarningField']"/>
1120 <xsl:if test="marc:datafield[@tag=$ContentWarningField]">
1121 <span class="results_summary content_warning">
1122 <span class="label">Content warning: </span>
1123 <xsl:for-each select="marc:datafield[@tag=$ContentWarningField]">
1125 <xsl:when test="marc:subfield[@code='u']">
1127 <xsl:attribute name="href">
1128 <xsl:value-of select="marc:subfield[@code='u']"/>
1131 <xsl:when test="marc:subfield[@code='a']">
1132 <xsl:value-of select="marc:subfield[@code='a']"/>
1135 <xsl:value-of select="marc:subfield[@code='u']"/>
1139 <xsl:text> </xsl:text>
1141 <xsl:when test="not(marc:subfield[@code='u']) and marc:subfield[@code='a']">
1142 <xsl:value-of select="marc:subfield[@code='a']"/><xsl:text> </xsl:text>
1145 <xsl:call-template name="subfieldSelect">
1146 <xsl:with-param name="codes">bcdefghijklmnopqrstvwxyz</xsl:with-param>
1147 </xsl:call-template>
1148 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1153 <!-- 866 textual holdings -->
1154 <xsl:if test="marc:datafield[@tag=866]">
1155 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1156 <xsl:for-each select="marc:datafield[@tag=866]">
1157 <span class="holdings_note_data">
1158 <xsl:call-template name="subfieldSelect">
1159 <xsl:with-param name="codes">axz</xsl:with-param>
1160 </xsl:call-template>
1161 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1167 <!-- 867 textual holdings -->
1168 <xsl:if test="marc:datafield[@tag=867]">
1169 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1170 <xsl:for-each select="marc:datafield[@tag=867]">
1171 <span class="holdings_note_data">
1172 <xsl:call-template name="subfieldSelect">
1173 <xsl:with-param name="codes">axz</xsl:with-param>
1174 </xsl:call-template>
1175 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1181 <!-- 868 textual holdings -->
1182 <xsl:if test="marc:datafield[@tag=868]">
1183 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1184 <xsl:for-each select="marc:datafield[@tag=868]">
1185 <span class="holdings_note_data">
1186 <xsl:call-template name="subfieldSelect">
1187 <xsl:with-param name="codes">axz</xsl:with-param>
1188 </xsl:call-template>
1189 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1195 <!-- 765 - Original language entry -->
1196 <xsl:for-each select="marc:datafield[@tag=765]">
1197 <span class="results_summary original_language_entry">
1199 <xsl:when test="@ind2!=8 or not(marc:subfield[@code='i'])">
1200 <!-- fallback to this label too if 765$i is empty -->
1201 <span class="label">Translation of: </span>
1204 <span class="label">
1205 <xsl:value-of select="marc:subfield[@code='i']"/>
1206 <xsl:text>: </xsl:text>
1210 <span class="original_language_entry_data">
1211 <xsl:variable name="href">
1212 <!-- call template to get href of search URL -->
1213 <xsl:call-template name="GetCnumSearchURL">
1214 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
1215 <xsl:with-param name="opac_url" select="0"/>
1216 </xsl:call-template>
1218 <xsl:variable name="f765">
1219 <xsl:call-template name="subfieldSelect">
1220 <xsl:with-param name="codes">tad</xsl:with-param>
1221 <xsl:with-param name="delimeter">, </xsl:with-param>
1222 </xsl:call-template>
1225 <xsl:when test="$href">
1227 <xsl:attribute name="href"><xsl:value-of select="$href"/></xsl:attribute>
1228 <xsl:value-of select="$f765"/>
1232 <xsl:value-of select="$f765"/>
1238 <!-- End of 765 - Original language entry -->
1240 <!-- 770 - Supplement/Special issue entry -->
1241 <xsl:if test="marc:datafield[@tag=770]">
1242 <span class="results_summary supplement"><span class="label">Supplement: </span>
1243 <xsl:for-each select="marc:datafield[@tag=770]">
1244 <xsl:if test="marc:subfield[@code='i']">
1245 <span class="770_rel_info">
1246 <xsl:call-template name="subfieldSelect">
1247 <xsl:with-param name="codes">i</xsl:with-param>
1248 </xsl:call-template>
1249 <xsl:text> </xsl:text>
1254 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1255 <xsl:attribute name="href">
1256 /cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template>
1260 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute>
1264 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1265 <xsl:call-template name="subfieldSelect">
1266 <xsl:with-param name="codes">a_t</xsl:with-param>
1267 </xsl:call-template>
1271 <xsl:text> </xsl:text>
1272 <xsl:call-template name="subfieldSelect">
1273 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1274 </xsl:call-template>
1276 <xsl:when test="position()=last()"></xsl:when>
1277 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1283 <!-- 772 - Supplement parent entry -->
1284 <xsl:if test="marc:datafield[@tag=772]">
1285 <span class="results_summary supplement_parent"><span class="label">Supplement to: </span>
1286 <xsl:for-each select="marc:datafield[@tag=772]">
1287 <xsl:if test="marc:subfield[@code='i']">
1288 <span class="772_rel_info">
1289 <xsl:call-template name="subfieldSelect">
1290 <xsl:with-param name="codes">i</xsl:with-param>
1291 </xsl:call-template>
1292 <xsl:text> </xsl:text>
1297 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1298 <xsl:attribute name="href">
1299 /cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template>
1303 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='t'], '()', ''),true())"/></xsl:attribute>
1307 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1308 <xsl:call-template name="subfieldSelect">
1309 <xsl:with-param name="codes">a_t</xsl:with-param>
1310 </xsl:call-template>
1314 <xsl:call-template name="subfieldSelect">
1315 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1316 </xsl:call-template>
1318 <xsl:when test="position()=last()"></xsl:when>
1319 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1325 <!-- 775 Other Edition -->
1326 <xsl:if test="marc:datafield[@tag=775]">
1327 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1328 <xsl:for-each select="marc:datafield[@tag=775]">
1330 <xsl:variable name="relation_query">
1331 <xsl:text>ti,phr:(</xsl:text>
1332 <xsl:call-template name="quote_search_term">
1333 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1334 </xsl:call-template>
1335 <xsl:text>)</xsl:text>
1336 <xsl:if test="marc:subfield[@code='a']">
1337 <xsl:text> AND au:(</xsl:text>
1338 <xsl:call-template name="quote_search_term">
1339 <xsl:with-param name="term">
1340 <xsl:value-of select="marc:subfield[@code='a']"/>
1342 </xsl:call-template>
1343 <xsl:text>)</xsl:text>
1347 <xsl:if test="marc:subfield[@code='i']">
1348 <xsl:call-template name="subfieldSelect">
1349 <xsl:with-param name="codes">i</xsl:with-param>
1350 </xsl:call-template>
1351 <xsl:text> </xsl:text>
1355 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1356 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1359 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1362 <xsl:call-template name="subfieldSelect">
1363 <xsl:with-param name="codes">a_t</xsl:with-param>
1364 </xsl:call-template>
1367 <xsl:when test="position()=last()"></xsl:when>
1368 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1375 <xsl:if test="marc:datafield[@tag=780]">
1376 <xsl:for-each select="marc:datafield[@tag=780]">
1377 <xsl:if test="@ind1=0">
1378 <span class="results_summary preceeding_entry">
1380 <xsl:when test="@ind2=0">
1381 <span class="label">Continues:</span>
1383 <xsl:when test="@ind2=1">
1384 <span class="label">Continues in part:</span>
1386 <xsl:when test="@ind2=2">
1387 <span class="label">Supersedes:</span>
1389 <xsl:when test="@ind2=3">
1390 <span class="label">Supersedes in part:</span>
1392 <xsl:when test="@ind2=4">
1393 <span class="label">Formed by the union: ... and: ...</span>
1395 <xsl:when test="@ind2=5">
1396 <span class="label">Absorbed:</span>
1398 <xsl:when test="@ind2=6">
1399 <span class="label">Absorbed in part:</span>
1401 <xsl:when test="@ind2=7">
1402 <span class="label">Separated from:</span>
1405 <xsl:text> </xsl:text>
1407 <xsl:if test="marc:subfield[@code='i']">
1408 <span class="780_rel_info">
1409 <xsl:value-of select="marc:subfield[@code='i']"/>
1410 <xsl:text> </xsl:text>
1414 <xsl:variable name="relation_query">
1415 <xsl:text>ti,phr:(</xsl:text>
1416 <xsl:call-template name="quote_search_term">
1417 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1418 </xsl:call-template>
1419 <xsl:text>)</xsl:text>
1420 <xsl:if test="marc:subfield[@code='a']">
1421 <xsl:text> AND au:(</xsl:text>
1422 <xsl:call-template name="quote_search_term">
1423 <xsl:with-param name="term">
1424 <xsl:value-of select="marc:subfield[@code='a']"/>
1426 </xsl:call-template>
1427 <xsl:text>)</xsl:text>
1432 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1434 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1435 <xsl:call-template name="subfieldSelect">
1436 <xsl:with-param name="codes">a_t</xsl:with-param>
1437 </xsl:call-template>
1442 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1443 <xsl:call-template name="subfieldSelect">
1444 <xsl:with-param name="codes">a_t</xsl:with-param>
1445 </xsl:call-template>
1451 <xsl:if test="marc:subfield[@code='n']">
1452 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1460 <xsl:if test="marc:datafield[@tag=785]">
1461 <xsl:for-each select="marc:datafield[@tag=785]">
1462 <xsl:if test="@ind1=0">
1463 <span class="results_summary succeeding_entry">
1465 <xsl:when test="@ind2=0">
1466 <span class="label">Continued by:</span>
1468 <xsl:when test="@ind2=1">
1469 <span class="label">Continued in part by:</span>
1471 <xsl:when test="@ind2=2">
1472 <span class="label">Superseded by:</span>
1474 <xsl:when test="@ind2=3">
1475 <span class="label">Superseded in part by:</span>
1477 <xsl:when test="@ind2=4">
1478 <span class="label">Absorbed by:</span>
1480 <xsl:when test="@ind2=5">
1481 <span class="label">Absorbed in part by:</span>
1483 <xsl:when test="@ind2=6">
1484 <span class="label">Split into .. and ...:</span>
1486 <xsl:when test="@ind2=7">
1487 <span class="label">Merged with ... to form ...</span>
1489 <xsl:when test="@ind2=8">
1490 <span class="label">Changed back to:</span>
1493 <xsl:text> </xsl:text>
1495 <xsl:if test="marc:subfield[@code='i']">
1496 <span class="785_rel_info">
1497 <xsl:value-of select="marc:subfield[@code='i']"/>
1498 <xsl:text> </xsl:text>
1502 <xsl:variable name="relation_query">
1503 <xsl:text>ti,phr:(</xsl:text>
1504 <xsl:call-template name="quote_search_term">
1505 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1506 </xsl:call-template>
1507 <xsl:text>)</xsl:text>
1508 <xsl:if test="marc:subfield[@code='a']">
1509 <xsl:text> AND au:(</xsl:text>
1510 <xsl:call-template name="quote_search_term">
1511 <xsl:with-param name="term">
1512 <xsl:value-of select="marc:subfield[@code='a']"/>
1514 </xsl:call-template>
1515 <xsl:text>)</xsl:text>
1520 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1522 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1523 <xsl:call-template name="subfieldSelect">
1524 <xsl:with-param name="codes">a_t</xsl:with-param>
1525 </xsl:call-template>
1530 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1531 <xsl:call-template name="subfieldSelect">
1532 <xsl:with-param name="codes">a_t</xsl:with-param>
1533 </xsl:call-template>
1543 <!-- 787 Other Relationship Entry -->
1544 <xsl:if test="marc:datafield[@tag=787]">
1545 <span class="results_summary other_relationship_entry"><span class="label">Other related works: </span>
1546 <xsl:for-each select="marc:datafield[@tag=787]">
1547 <span class="other_relationship_entry">
1548 <xsl:if test="marc:subfield[@code='i']">
1549 <xsl:call-template name="subfieldSelect">
1550 <xsl:with-param name="codes">i</xsl:with-param>
1551 </xsl:call-template>
1552 <xsl:text> </xsl:text>
1555 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1557 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1558 <xsl:call-template name="subfieldSelect">
1559 <xsl:with-param name="codes">a_t</xsl:with-param>
1560 </xsl:call-template>
1564 <xsl:variable name="relation_query">
1565 <xsl:text>ti,phr:(</xsl:text>
1566 <xsl:call-template name="quote_search_term">
1567 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1568 </xsl:call-template>
1569 <xsl:text>)</xsl:text>
1570 <xsl:if test="marc:subfield[@code='a']">
1571 <xsl:text> AND au:(</xsl:text>
1572 <xsl:call-template name="quote_search_term">
1573 <xsl:with-param name="term">
1574 <xsl:value-of select="marc:subfield[@code='a']"/>
1576 </xsl:call-template>
1577 <xsl:text>)</xsl:text>
1581 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute>
1582 <xsl:call-template name="subfieldSelect">
1583 <xsl:with-param name="codes">a_t</xsl:with-param>
1584 </xsl:call-template>
1589 <xsl:when test="position()=last()"></xsl:when>
1590 <xsl:otherwise><span class="separator"><xsl:text>; </xsl:text></span></xsl:otherwise>
1597 <!-- Indicate if record is suppressed in OPAC -->
1599 <xsl:when test="$OpacSuppression = 1 and marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
1600 <span class="results_summary suppressed_opac">
1601 <span class="label">OPAC view: </span>
1606 <xsl:if test="$OPACBaseURL!=''">
1607 <span class="results_summary opac_view"><span class="label">OPAC view: </span>
1608 <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:datafield[@tag=999]/marc:subfield[@code='c'], true())"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>.
1618 <xsl:template name="nameABCQ">
1619 <xsl:call-template name="chopPunctuation">
1620 <xsl:with-param name="chopString">
1621 <xsl:call-template name="subfieldSelect">
1622 <xsl:with-param name="codes">abcq</xsl:with-param>
1623 </xsl:call-template>
1625 <xsl:with-param name="punctuation">
1626 <xsl:text>:,;/ </xsl:text>
1628 </xsl:call-template>
1631 <xsl:template name="nameABCDN">
1632 <xsl:call-template name="chopPunctuation">
1633 <xsl:with-param name="chopString">
1634 <xsl:call-template name="subfieldSelect">
1635 <xsl:with-param name="codes">abcdn</xsl:with-param>
1636 </xsl:call-template>
1638 <xsl:with-param name="punctuation">
1639 <xsl:text>:,;/ </xsl:text>
1641 </xsl:call-template>
1644 <xsl:template name="nameACDEQ">
1645 <xsl:call-template name="subfieldSelect">
1646 <xsl:with-param name="codes">acdeq</xsl:with-param>
1647 </xsl:call-template>
1650 <xsl:template name="specialSubfieldSelect">
1651 <xsl:param name="anyCodes"/>
1652 <xsl:param name="axis"/>
1653 <xsl:param name="beforeCodes"/>
1654 <xsl:param name="afterCodes"/>
1655 <xsl:variable name="str">
1656 <xsl:for-each select="marc:subfield">
1657 <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])">
1658 <xsl:value-of select="text()"/>
1659 <xsl:text> </xsl:text>
1663 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1666 <xsl:template name="showAuthor">
1667 <xsl:param name="authorfield"/>
1668 <xsl:param name="UseAuthoritiesForTracings"/>
1669 <xsl:param name="AuthorLinkSortBy"/>
1670 <xsl:param name="AuthorLinkSortOrder"/>
1671 <xsl:if test="count($authorfield)>0">
1673 <xsl:for-each select="$authorfield">
1675 <xsl:when test="position()>1"/>
1677 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1678 <!--#13382 Changed Additional author to contributor -->
1679 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1683 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1684 <xsl:attribute name="href">
1685 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=an:</xsl:text>
1686 <xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/>
1687 <xsl:if test="$AuthorLinkSortBy!='default'">
1688 <xsl:text>&sort_by=</xsl:text>
1689 <xsl:value-of select="$AuthorLinkSortBy"/>
1690 <xsl:text>_</xsl:text>
1691 <xsl:value-of select="$AuthorLinkSortOrder"/>
1696 <xsl:attribute name="href">
1697 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=au:"</xsl:text>
1698 <xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>
1699 <xsl:text>"</xsl:text>
1700 <xsl:if test="$AuthorLinkSortBy!='default'">
1701 <xsl:text>&sort_by=</xsl:text>
1702 <xsl:value-of select="$AuthorLinkSortBy"/>
1703 <xsl:text>_</xsl:text>
1704 <xsl:value-of select="$AuthorLinkSortOrder"/>
1710 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1712 <xsl:call-template name="chopPunctuation">
1713 <xsl:with-param name="chopString">
1714 <xsl:call-template name="subfieldSelect">
1715 <xsl:with-param name="codes">
1717 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1718 <xsl:when test="@tag=111">aeq</xsl:when>
1719 <xsl:when test="@tag=110">ab</xsl:when>
1720 <xsl:otherwise>abcjq</xsl:otherwise>
1723 </xsl:call-template>
1725 <xsl:with-param name="punctuation">
1726 <xsl:text>:,;/ </xsl:text>
1728 </xsl:call-template>
1729 <!-- Display only name and title portion in 110 field -->
1730 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1731 <span class="titleportion">
1733 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1734 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1736 <xsl:call-template name="chopPunctuation">
1737 <xsl:with-param name="chopString">
1738 <xsl:call-template name="subfieldSelect">
1739 <xsl:with-param name="codes">cdnt</xsl:with-param>
1740 </xsl:call-template>
1742 </xsl:call-template>
1745 <!-- Display only name and title portion in 111 field -->
1746 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1747 <span class="titleportion">
1749 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1750 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1753 <xsl:call-template name="chopPunctuation">
1754 <xsl:with-param name="chopString">
1755 <xsl:call-template name="subfieldSelect">
1756 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1757 </xsl:call-template>
1759 </xsl:call-template>
1762 <!-- Display only dates in 100 field -->
1763 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1764 <span class="authordates">
1765 <xsl:text>, </xsl:text>
1766 <xsl:call-template name="chopPunctuation">
1767 <xsl:with-param name="chopString">
1768 <xsl:call-template name="subfieldSelect">
1769 <xsl:with-param name="codes">d</xsl:with-param>
1770 </xsl:call-template>
1772 </xsl:call-template>
1777 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1778 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1779 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1780 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1781 <xsl:if test="@tag=710 or @tag=711">
1782 <xsl:call-template name="chopPunctuation">
1783 <xsl:with-param name="chopString">
1784 <xsl:call-template name="subfieldSelect">
1785 <xsl:with-param name="codes">
1787 <xsl:when test="@tag=711">aeq</xsl:when>
1788 <xsl:otherwise>ab</xsl:otherwise>
1791 </xsl:call-template>
1793 <xsl:with-param name="punctuation">
1794 <xsl:text>:,;/ </xsl:text>
1796 </xsl:call-template>
1797 <!-- Display only name and title portion in 711 field -->
1798 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1799 <span class="titleportion">
1801 <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>
1802 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1805 <xsl:call-template name="chopPunctuation">
1806 <xsl:with-param name="chopString">
1807 <xsl:call-template name="subfieldSelect">
1808 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1809 </xsl:call-template>
1811 </xsl:call-template>
1814 <!-- Display only name and title portion in 710 field -->
1815 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1816 <span class="titleportion">
1818 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1819 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1821 <xsl:call-template name="chopPunctuation">
1822 <xsl:with-param name="chopString">
1823 <xsl:call-template name="subfieldSelect">
1824 <xsl:with-param name="codes">cdnt</xsl:with-param>
1825 </xsl:call-template>
1827 </xsl:call-template>
1832 <!-- Display only name portion in 700 field -->
1833 <xsl:if test="@tag=700">
1834 <xsl:call-template name="chopPunctuation">
1835 <xsl:with-param name="chopString">
1836 <xsl:call-template name="subfieldSelect">
1837 <xsl:with-param name="codes">abcq</xsl:with-param>
1838 </xsl:call-template>
1840 </xsl:call-template>
1842 <!-- Display class "authordates" in 700 field -->
1843 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1844 <span class="authordates">
1845 <xsl:text>, </xsl:text>
1846 <xsl:call-template name="chopPunctuation">
1847 <xsl:with-param name="chopString">
1848 <xsl:call-template name="subfieldSelect">
1849 <xsl:with-param name="codes">d</xsl:with-param>
1850 </xsl:call-template>
1852 </xsl:call-template>
1855 <!-- Display class "titleportion" in 700 field -->
1856 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1857 <xsl:if test="@tag=700 and $titleportionfields">
1858 <span class="titleportion">
1859 <xsl:text>. </xsl:text>
1860 <xsl:call-template name="chopPunctuation">
1861 <xsl:with-param name="chopString">
1862 <xsl:call-template name="subfieldSelect">
1863 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1864 </xsl:call-template>
1866 </xsl:call-template>
1873 <!-- add relator code too between brackets-->
1874 <!-- #13383 include relator code j for field 111 -->
1875 <xsl:if test="(@tag!=111 and @tag!=711 and marc:subfield[@code='4' or @code='e']) or ((@tag=111 or @tag=711) and marc:subfield[@code='4' or @code='j'])">
1876 <span class="relatorcode">
1877 <xsl:text> [</xsl:text>
1879 <xsl:when test="@tag=111 or @tag=711">
1881 <!-- Prefer j over 4 for fields 111 and 711-->
1882 <xsl:when test="marc:subfield[@code='j']">
1883 <xsl:for-each select="marc:subfield[@code='j']">
1884 <xsl:value-of select="."/>
1885 <xsl:if test="position() != last()">, </xsl:if>
1889 <xsl:for-each select="marc:subfield[@code=4]">
1890 <xsl:value-of select="."/>
1891 <xsl:if test="position() != last()">, </xsl:if>
1896 <!-- Prefer e over 4 for fields 111 and 711-->
1897 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1898 <xsl:for-each select="marc:subfield[@code='e']">
1899 <xsl:value-of select="."/>
1900 <xsl:if test="position() != last()">, </xsl:if>
1904 <xsl:for-each select="marc:subfield[@code=4]">
1905 <xsl:value-of select="."/>
1906 <xsl:if test="position() != last()">, </xsl:if>
1910 <xsl:text>]</xsl:text>
1914 <xsl:if test="marc:subfield[@code=9]">
1915 <xsl:call-template name="showAuthlink">
1916 <xsl:with-param name="authid"><xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:with-param>
1917 </xsl:call-template>
1920 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1927 <xsl:template name="showAuthlink">
1928 <xsl:param name="authid"/>
1929 <xsl:text> </xsl:text>
1930 <a class='authlink'>
1931 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute>
1932 <xsl:attribute name="title">View authority record</xsl:attribute>
1933 <xsl:attribute name="target">_blank</xsl:attribute>
1934 <xsl:element name="i">
1935 <xsl:attribute name="class">fa fa-search</xsl:attribute>
1936 <xsl:attribute name="aria-label">View authority record</xsl:attribute>
1941 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1942 <xsl:template name="subfieldSelectSubject">
1943 <xsl:param name="codes"/>
1944 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1945 <xsl:param name="subdivCodes"/>
1946 <xsl:param name="subdivDelimiter"/>
1947 <xsl:param name="prefix"/>
1948 <xsl:param name="suffix"/>
1949 <xsl:param name="urlencode"/>
1950 <xsl:variable name="str">
1951 <xsl:for-each select="marc:subfield">
1952 <xsl:if test="contains($codes, @code)">
1953 <xsl:if test="contains($subdivCodes, @code)">
1954 <xsl:value-of select="$subdivDelimiter"/>
1956 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1961 <xsl:when test="$urlencode=1">
1962 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1965 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>