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="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
28 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
30 <xsl:variable name="OpacSuppression" select="marc:sysprefs/marc:syspref[@name='OpacSuppression']"/>
31 <xsl:variable name="TracingQuotesLeft">
33 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICUStyleQuotes']='1'">{</xsl:when>
34 <xsl:otherwise>"</xsl:otherwise>
37 <xsl:variable name="TracingQuotesRight">
39 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICUStyleQuotes']='1'">}</xsl:when>
40 <xsl:otherwise>"</xsl:otherwise>
44 <xsl:variable name="leader" select="marc:leader"/>
45 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
46 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
47 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
48 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
49 <xsl:variable name="materialTypeCode">
51 <xsl:when test="$leader19='a'">ST</xsl:when>
52 <xsl:when test="$leader6='a'">
54 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
55 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
56 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
59 <xsl:when test="$leader6='t'">BK</xsl:when>
60 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
61 <xsl:when test="$leader6='m'">CF</xsl:when>
62 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
63 <xsl:when test="$leader6='g'">VM</xsl:when>
64 <xsl:when test="$leader6='k'">PK</xsl:when>
65 <xsl:when test="$leader6='r'">OB</xsl:when>
66 <xsl:when test="$leader6='i'">MU</xsl:when>
67 <xsl:when test="$leader6='j'">MU</xsl:when>
68 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
71 <xsl:variable name="materialTypeLabel">
73 <xsl:when test="$leader19='a'">Set</xsl:when>
74 <xsl:when test="$leader6='a'">
76 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Text</xsl:when>
77 <xsl:when test="$leader7='i' or $leader7='s'">
79 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
80 <xsl:otherwise>Series</xsl:otherwise>
83 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
86 <xsl:when test="$leader6='t'">Text</xsl:when>
87 <xsl:when test="$leader6='o'">Kit</xsl:when>
88 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
89 <xsl:when test="$leader6='m'">Computer file</xsl:when>
90 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
91 <xsl:when test="$leader6='g'">Film</xsl:when>
92 <xsl:when test="$leader6='k'">Picture</xsl:when>
93 <xsl:when test="$leader6='r'">Object</xsl:when>
94 <xsl:when test="$leader6='j'">Music</xsl:when>
95 <xsl:when test="$leader6='i'">Sound</xsl:when>
96 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
100 <!-- Title Statement -->
101 <!-- Alternate Graphic Representation (MARC 880) -->
102 <xsl:if test="$display880">
104 <xsl:call-template name="m880Select">
105 <xsl:with-param name="basetags">245</xsl:with-param>
106 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
112 <xsl:if test="marc:datafield[@tag=245]">
113 <h1 class="title" property="name">
114 <xsl:for-each select="marc:datafield[@tag=245]">
115 <xsl:call-template name="subfieldSelect">
116 <xsl:with-param name="codes">a</xsl:with-param>
118 <xsl:text> </xsl:text>
119 <!-- 13381 add additional subfields-->
120 <!-- bz 17625 adding subfields f and g -->
121 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
123 <xsl:when test="@code='h'">
124 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
125 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
127 <xsl:when test="@code='c'">
128 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
129 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
132 <xsl:apply-templates/>
133 <xsl:text> </xsl:text>
141 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
142 <xsl:if test="$display880">
144 <xsl:call-template name="m880Select">
145 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
146 <xsl:with-param name="codes">abc</xsl:with-param>
147 <xsl:with-param name="index">au</xsl:with-param>
148 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
149 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
154 <!-- Author Statement -->
155 <xsl:call-template name="showAuthor">
156 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
157 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
160 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
161 <xsl:call-template name="showAuthor">
162 <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'])]"/>
163 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
166 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
167 <span class="results_summary type"><span class="label">Material type: </span>
168 <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>
169 <xsl:text> </xsl:text>
170 <xsl:value-of select="$materialTypeLabel"/>
174 <xsl:call-template name="show-lang-041"/>
176 <!--Series: Alternate Graphic Representation (MARC 880) -->
177 <xsl:if test="$display880">
178 <xsl:call-template name="m880Select">
179 <xsl:with-param name="basetags">440,490</xsl:with-param>
180 <xsl:with-param name="codes">av</xsl:with-param>
181 <xsl:with-param name="class">results_summary series</xsl:with-param>
182 <xsl:with-param name="label">Series: </xsl:with-param>
183 <xsl:with-param name="index">se</xsl:with-param>
187 <xsl:call-template name="show-series">
188 <xsl:with-param name="searchurl">/cgi-bin/koha/catalogue/search.pl</xsl:with-param>
189 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
190 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
193 <!-- Analytics information -->
194 <xsl:variable name="leader7_class">
196 <!--xsl:when test="$leader7='a'">analytic_mcp</xsl:when-->
197 <!--xsl:when test="$leader7='b'">analytic_scp</xsl:when-->
198 <xsl:when test="$leader7='c'">analytic_collection</xsl:when>
199 <xsl:when test="$leader7='d'">analytic_subunit</xsl:when>
200 <xsl:when test="$leader7='i'">analytic_ires</xsl:when>
201 <xsl:when test="$leader7='m'">analytic_monograph</xsl:when>
202 <xsl:when test="$leader7='s'">analytic_serial</xsl:when>
203 <xsl:otherwise>analytic_undefined</xsl:otherwise>
207 <xsl:variable name="show_analytics_link" select="marc:variables/marc:variable[@name='show_analytics_link']" />
208 <xsl:if test="$show_analytics_link='1'">
209 <xsl:element name="span">
210 <xsl:attribute name="class">results_summary analytics <xsl:value-of select="$leader7_class"/></xsl:attribute>
211 <span class="label">Analytics: </span>
214 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
215 <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>
218 <xsl:variable name="title_query">
219 <xsl:text>Host-item:(</xsl:text>
220 <xsl:call-template name="quote_search_term">
221 <xsl:with-param name="term"><xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='a']"/></xsl:with-param>
223 <xsl:text>)</xsl:text>
225 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($title_query, true())"/></xsl:attribute>
228 <xsl:text>Show analytics</xsl:text>
233 <!-- Volumes of sets and traced series -->
234 <xsl:variable name="show_volumes_link" select="marc:variables/marc:variable[@name='show_volumes_link']" />
235 <xsl:variable name="title" select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())" />
236 <xsl:if test="$show_volumes_link='1' and ($materialTypeCode='ST' or substring($controlField008,22,1)='m')">
237 <span class="results_summary volumes"><span class="label">Volumes: </span>
240 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
241 <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>
244 <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>
247 <xsl:text>Show volumes</xsl:text>
253 <xsl:if test="$leader19='c'">
254 <span class="results_summary set"><span class="label">Set: </span>
255 <xsl:for-each select="marc:datafield[@tag=773]">
258 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
259 <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>
262 <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>
265 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
268 <xsl:when test="position()=last()"></xsl:when>
269 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
275 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
276 <xsl:if test="$display880">
277 <xsl:call-template name="m880Select">
278 <xsl:with-param name="basetags">260,264</xsl:with-param>
279 <xsl:with-param name="codes">abcg</xsl:with-param>
280 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
281 <xsl:with-param name="label">Publication details: </xsl:with-param>
285 <!-- Publisher info and RDA related info from tags 260, 264 -->
287 <xsl:when test="marc:datafield[@tag=264]">
288 <xsl:call-template name="showRDAtag264">
289 <xsl:with-param name="show_url">1</xsl:with-param>
292 <xsl:when test="marc:datafield[@tag=260]">
293 <span class="results_summary publisher"><span class="label">Publication details: </span>
294 <xsl:for-each select="marc:datafield[@tag=260]">
295 <xsl:for-each select="marc:subfield">
296 <xsl:if test="@code='a'">
298 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
299 <xsl:value-of select="current()"/>
302 <xsl:if test="@code='b'">
304 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
305 <xsl:value-of select="current()"/>
308 <xsl:if test="@code='c'">
310 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
311 <xsl:value-of select="current()"/>
314 <xsl:if test="@code='g'">
315 <xsl:call-template name="chopPunctuation">
316 <xsl:with-param name="chopString">
317 <xsl:value-of select="current()"/>
321 <xsl:if test="position() != last()">
322 <xsl:text> </xsl:text>
325 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
331 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
332 <xsl:if test="$display880">
333 <xsl:call-template name="m880Select">
334 <xsl:with-param name="basetags">250</xsl:with-param>
335 <xsl:with-param name="codes">ab</xsl:with-param>
336 <xsl:with-param name="class">results_summary edition</xsl:with-param>
337 <xsl:with-param name="label">Edition: </xsl:with-param>
341 <xsl:if test="marc:datafield[@tag=250]">
342 <span class="results_summary edition"><span class="label">Edition: </span>
343 <xsl:for-each select="marc:datafield[@tag=250]">
344 <xsl:call-template name="chopPunctuation">
345 <xsl:with-param name="chopString">
346 <xsl:call-template name="subfieldSelect">
347 <xsl:with-param name="codes">ab</xsl:with-param>
351 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
356 <!-- Description: Alternate Graphic Representation (MARC 880) -->
357 <xsl:if test="$display880">
358 <xsl:call-template name="m880Select">
359 <xsl:with-param name="basetags">300</xsl:with-param>
360 <xsl:with-param name="codes">abceg</xsl:with-param>
361 <xsl:with-param name="class">results_summary description</xsl:with-param>
362 <xsl:with-param name="label">Description: </xsl:with-param>
366 <xsl:if test="marc:datafield[@tag=300]">
367 <span class="results_summary description"><span class="label">Description: </span>
368 <xsl:for-each select="marc:datafield[@tag=300]">
369 <xsl:call-template name="chopPunctuation">
370 <xsl:with-param name="chopString">
371 <xsl:call-template name="subfieldSelect">
372 <xsl:with-param name="codes">abcefg</xsl:with-param>
376 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
381 <!-- Content Type -->
382 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
383 <span class="results_summary" id="content_type">
384 <xsl:if test="marc:datafield[@tag=336]">
385 <span class="label">Content type: </span>
386 <xsl:for-each select="marc:datafield[@tag=336]">
387 <xsl:call-template name="subfieldSelect">
388 <xsl:with-param name="codes">a</xsl:with-param>
389 <xsl:with-param name="delimeter">, </xsl:with-param>
391 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
394 <xsl:text> </xsl:text>
396 <xsl:if test="marc:datafield[@tag=337]">
397 <span class="label">Media type: </span>
398 <xsl:for-each select="marc:datafield[@tag=337]">
399 <xsl:call-template name="subfieldSelect">
400 <xsl:with-param name="codes">a</xsl:with-param>
401 <xsl:with-param name="delimeter">, </xsl:with-param>
403 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
406 <xsl:text> </xsl:text>
408 <xsl:if test="marc:datafield[@tag=338]">
409 <span class="label">Carrier type: </span>
410 <xsl:for-each select="marc:datafield[@tag=338]">
411 <xsl:call-template name="subfieldSelect">
412 <xsl:with-param name="codes">a</xsl:with-param>
413 <xsl:with-param name="delimeter">, </xsl:with-param>
415 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
421 <!-- 385 - Audience -->
422 <xsl:if test="marc:datafield[@tag=385]">
423 <span class="results_summary audience">
424 <span class="label">Audience: </span>
425 <xsl:for-each select="marc:datafield[@tag=385]">
426 <xsl:if test="marc:subfield[@code='m']">
427 <xsl:call-template name="chopPunctuation">
428 <xsl:with-param name="chopString">
429 <xsl:call-template name="subfieldSelect">
430 <xsl:with-param name="codes">m</xsl:with-param>
434 <xsl:text>: </xsl:text>
436 <xsl:call-template name="chopPunctuation">
437 <xsl:with-param name="chopString">
438 <xsl:call-template name="subfieldSelect">
439 <xsl:with-param name="codes">a</xsl:with-param>
440 <xsl:with-param name="delimeter">, </xsl:with-param>
444 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise></xsl:choose>
449 <xsl:call-template name="showISBNISSN"/>
451 <xsl:if test="marc:datafield[@tag=013]">
452 <span class="results_summary patent_info">
453 <span class="label">Patent information: </span>
454 <xsl:for-each select="marc:datafield[@tag=013]">
455 <xsl:call-template name="subfieldSelect">
456 <xsl:with-param name="codes">acdef</xsl:with-param>
457 <xsl:with-param name="delimeter">, </xsl:with-param>
459 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
464 <xsl:if test="marc:datafield[@tag=088]">
465 <span class="results_summary report_number">
466 <span class="label">Report number: </span>
467 <xsl:for-each select="marc:datafield[@tag=088]">
468 <xsl:call-template name="subfieldSelect">
469 <xsl:with-param name="codes">a</xsl:with-param>
471 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
476 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
477 <xsl:if test="$display880">
478 <xsl:call-template name="m880Select">
479 <xsl:with-param name="basetags">246</xsl:with-param>
480 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
481 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
482 <xsl:with-param name="label">Other title: </xsl:with-param>
486 <xsl:if test="marc:datafield[@tag=246]">
487 <span class="results_summary other_title"><span class="label">Other title: </span>
488 <xsl:for-each select="marc:datafield[@tag=246]">
489 <xsl:if test="marc:subfield[@code='i']">
490 <xsl:call-template name="subfieldSelect">
491 <xsl:with-param name="codes">i</xsl:with-param>
494 <xsl:text> </xsl:text>
495 <xsl:call-template name="chopPunctuation">
496 <xsl:with-param name="chopString">
497 <xsl:call-template name="subfieldSelect">
498 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
502 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
504 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
505 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
506 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
507 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
508 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
509 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
510 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
511 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
512 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
515 <!-- #13386 added separator | -->
516 <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>
521 <xsl:if test="marc:datafield[@tag=242]">
522 <span class="results_summary translated_title"><span class="label">Title translated: </span>
523 <xsl:for-each select="marc:datafield[@tag=242]">
524 <xsl:call-template name="chopPunctuation">
525 <xsl:with-param name="chopString">
526 <xsl:call-template name="subfieldSelect">
527 <xsl:with-param name="codes">abchnp</xsl:with-param>
531 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
536 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
537 <xsl:if test="$display880">
538 <xsl:call-template name="m880Select">
539 <xsl:with-param name="basetags">130,240</xsl:with-param>
540 <xsl:with-param name="codes">adfklmor</xsl:with-param>
541 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
542 <xsl:with-param name="label">Uniform title: </xsl:with-param>
546 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
547 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
548 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
549 <xsl:if test="marc:subfield[@code='i']">
550 <xsl:call-template name="subfieldSelect">
551 <xsl:with-param name="codes">i</xsl:with-param>
554 <xsl:text> </xsl:text>
555 <xsl:for-each select="marc:subfield">
556 <xsl:if test="contains('adfghklmnoprst',@code)">
557 <xsl:value-of select="text()"/>
558 <xsl:text> </xsl:text>
561 <xsl:if test="position() != last()">
562 <span class="separator"><xsl:text> | </xsl:text></span>
568 <!-- #13382 Added Related works 700$i -->
569 <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']]">
570 <span class="results_summary related_works"><span class="label">Related works: </span>
571 <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']]">
572 <xsl:variable name="str">
573 <xsl:call-template name="subfieldSelect">
574 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
577 <xsl:call-template name="chopPunctuation">
578 <xsl:with-param name="chopString">
579 <xsl:value-of select="$str"/>
582 <!-- add relator code too between brackets-->
583 <xsl:if test="marc:subfield[@code='4' or @code='e']">
584 <span class="relatorcode">
585 <xsl:text> [</xsl:text>
587 <xsl:when test="marc:subfield[@code='e']">
588 <xsl:for-each select="marc:subfield[@code='e']">
589 <xsl:value-of select="."/>
590 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
594 <xsl:for-each select="marc:subfield[@code='4']">
595 <xsl:value-of select="."/>
596 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
600 <xsl:text>]</xsl:text>
604 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
610 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
611 <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'])]">
612 <span class="results_summary contained_works"><span class="label">Contained works: </span>
613 <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'])]">
614 <xsl:variable name="str">
615 <xsl:call-template name="subfieldSelect">
616 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
619 <xsl:call-template name="chopPunctuation">
620 <xsl:with-param name="chopString">
621 <xsl:value-of select="$str"/>
624 <!-- add relator code too between brackets-->
625 <xsl:if test="marc:subfield[@code='4' or @code='e']">
626 <span class="relatorcode">
627 <xsl:text> [</xsl:text>
629 <xsl:when test="marc:subfield[@code='e']">
630 <xsl:for-each select="marc:subfield[@code='e']">
631 <xsl:value-of select="."/>
632 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
636 <xsl:for-each select="marc:subfield[@code='4']">
637 <xsl:value-of select="."/>
638 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
642 <xsl:text>]</xsl:text>
646 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
653 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
654 <span class="results_summary subjects"><span class="label">Subject(s): </span>
655 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
658 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
659 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
660 <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>
662 <xsl:when test="$TraceSubjectSubdivisions='1'">
663 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
664 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
665 <xsl:with-param name="delimeter"> AND </xsl:with-param>
666 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
667 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
668 <xsl:with-param name="urlencode">1</xsl:with-param>
673 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
675 <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>
679 <xsl:call-template name="chopPunctuation">
680 <xsl:with-param name="chopString">
681 <xsl:call-template name="subfieldSelect">
682 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
683 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
684 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
690 <xsl:if test="marc:subfield[@code=9]">
691 <xsl:call-template name="showAuthlink">
692 <xsl:with-param name="authid"><xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:with-param>
697 <xsl:when test="position()=last()"></xsl:when>
698 <xsl:otherwise> | </xsl:otherwise>
706 <xsl:if test="marc:datafield[@tag=655]">
707 <span class="results_summary genre"><span class="label">Genre/Form: </span>
708 <xsl:for-each select="marc:datafield[@tag=655]">
711 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
712 <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>
714 <xsl:when test="$TraceSubjectSubdivisions='1'">
715 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
716 <xsl:with-param name="codes">avxyz</xsl:with-param>
717 <xsl:with-param name="delimeter"> AND </xsl:with-param>
718 <xsl:with-param name="prefix">(index-term-genre<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
719 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
720 <xsl:with-param name="urlencode">1</xsl:with-param>
725 <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>
728 <xsl:call-template name="subfieldSelect">
729 <xsl:with-param name="codes">avxyz</xsl:with-param>
730 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
731 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
736 <xsl:if test="marc:subfield[@code=9]">
737 <xsl:call-template name="showAuthlink">
738 <xsl:with-param name="authid"><xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:with-param>
741 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
746 <!-- MARC21 776 Additional Physical Form Entry -->
747 <xsl:if test="marc:datafield[@tag=776]">
748 <span class="results_summary add_physical_form">
749 <span class="label">Additional physical formats: </span>
750 <xsl:for-each select="marc:datafield[@tag=776]">
751 <xsl:variable name="linktext">
753 <xsl:when test="marc:subfield[@code='t']">
754 <xsl:value-of select="marc:subfield[@code='t']"/>
756 <xsl:when test="marc:subfield[@code='a']">
757 <xsl:value-of select="marc:subfield[@code='a']"/>
760 <xsl:text>No title</xsl:text>
764 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
765 <xsl:call-template name="subfieldSelect">
766 <xsl:with-param name="codes">i</xsl:with-param>
768 <xsl:text>: </xsl:text>
771 <xsl:when test="marc:subfield[@code='w']">
773 <xsl:attribute name="href">
774 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
775 <xsl:call-template name="extractControlNumber">
776 <xsl:with-param name="subfieldW">
777 <xsl:value-of select="marc:subfield[@code='w']"/>
781 <xsl:value-of select="$linktext"/>
785 <xsl:value-of select="$linktext"/>
788 <xsl:if test="position() != last()">
789 <xsl:text>; </xsl:text>
795 <!-- MARC21 777 - Issued With Entry -->
796 <xsl:if test="marc:datafield[@tag=777]">
797 <xsl:for-each select="marc:datafield[@tag=777]">
798 <xsl:if test="@ind1 != 1">
799 <span class="results_summary issued_with">
802 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
803 <xsl:value-of select="marc:subfield[@code='i']"/>
806 <xsl:text>Issued with:</xsl:text>
809 <xsl:text> </xsl:text>
811 <xsl:variable name="f777">
812 <xsl:call-template name="chopPunctuation">
813 <xsl:with-param name="chopString">
814 <xsl:call-template name="subfieldSelect">
815 <xsl:with-param name="codes">a_t</xsl:with-param>
821 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
822 <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>
823 <xsl:value-of select="translate($f777, '()', '')"/>
827 <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>
828 <xsl:value-of select="$f777"/>
832 <xsl:if test="marc:subfield[@code='g']">
833 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
836 <xsl:if test="marc:subfield[@code='n']">
837 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
843 <!-- Publisher or Distributor Number -->
844 <xsl:if test="marc:datafield[@tag=028]">
845 <span class="results_summary publisher_number ">
846 <span class="label">Publisher number: </span>
847 <xsl:for-each select="marc:datafield[@tag=028]">
848 <xsl:call-template name="subfieldSelect">
849 <xsl:with-param name="codes">abq</xsl:with-param>
850 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
856 <!-- DDC classification -->
857 <xsl:if test="marc:datafield[@tag=082]">
858 <span class="results_summary ddc">
859 <span class="label">DDC classification: </span>
860 <xsl:for-each select="marc:datafield[@tag=082]">
861 <xsl:call-template name="subfieldSelect">
862 <xsl:with-param name="codes">a</xsl:with-param>
863 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
866 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
867 <xsl:otherwise> | </xsl:otherwise>
873 <!-- LOC classification -->
874 <xsl:if test="marc:datafield[@tag=050]">
875 <span class="results_summary loc">
876 <span class="label">LOC classification: </span>
877 <xsl:for-each select="marc:datafield[@tag=050]">
878 <xsl:call-template name="subfieldSelect">
879 <xsl:with-param name="codes">ab</xsl:with-param>
880 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
886 <!-- NLM classification -->
887 <xsl:if test="marc:datafield[@tag=060]">
888 <span class="results_summary nlm">
889 <span class="label">NLM classification: </span>
890 <xsl:for-each select="marc:datafield[@tag=060]">
891 <xsl:call-template name="subfieldSelect">
892 <xsl:with-param name="codes">a</xsl:with-param>
893 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
895 <xsl:if test="not(position()=last())"><xsl:text> | </xsl:text></xsl:if>
900 <!-- Other classification -->
901 <xsl:if test="marc:datafield[@tag=084]">
902 <span class="results_summary oc">
903 <span class="label">Other classification: </span>
904 <xsl:for-each select="marc:datafield[@tag=084]">
905 <xsl:call-template name="subfieldSelect">
906 <xsl:with-param name="codes">a</xsl:with-param>
907 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
910 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
911 <xsl:otherwise> | </xsl:otherwise>
917 <xsl:if test="marc:datafield[@tag=856]">
918 <span class="results_summary online_resources"><span class="label">Online resources: </span>
919 <xsl:for-each select="marc:datafield[@tag=856]">
920 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
922 <xsl:attribute name="href">
923 <xsl:call-template name="AddMissingProtocol">
924 <xsl:with-param name="resourceLocation" select="marc:subfield[@code='u']"/>
925 <xsl:with-param name="indicator1" select="@ind1"/>
926 <xsl:with-param name="accessMethod" select="marc:subfield[@code='2']"/>
928 <xsl:value-of select="marc:subfield[@code='u']"/>
931 <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')">
932 <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>
934 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
935 <xsl:call-template name="subfieldSelect">
936 <xsl:with-param name="codes">y3z</xsl:with-param>
939 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
941 <xsl:when test="$URLLinkText!=''">
942 <xsl:value-of select="$URLLinkText"/>
945 <xsl:text>Click here to access online</xsl:text>
952 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
953 <xsl:otherwise> | </xsl:otherwise>
960 <!-- 505 - Formatted contents note -->
961 <xsl:if test="marc:datafield[@tag=505]">
962 <div class="results_summary contents">
964 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
965 <span class="label">Contents:</span>
967 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
968 <span class="label">Incomplete contents:</span>
970 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
971 <span class="label">Partial contents:</span>
974 <xsl:for-each select="marc:datafield[@tag=505]">
975 <div class='contentblock'>
977 <xsl:when test="@ind2=0">
978 <xsl:call-template name="subfieldSelectSpan">
979 <xsl:with-param name="newline">1</xsl:with-param>
980 <xsl:with-param name="codes">trug</xsl:with-param>
984 <xsl:call-template name="subfieldSelectSpan">
985 <xsl:with-param name="newline">1</xsl:with-param>
986 <xsl:with-param name="codes">atrug</xsl:with-param>
996 <xsl:if test="marc:datafield[@tag=586]">
997 <span class="results_summary awardsnote">
998 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
999 <span class="label">Awards: </span>
1001 <xsl:for-each select="marc:datafield[@tag=586]">
1002 <xsl:value-of select="marc:subfield[@code='a']"/>
1003 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1009 <xsl:if test="marc:datafield[@tag=508]">
1010 <span class="results_summary prod_credits">
1011 <span class="label">Production credits: </span>
1012 <xsl:for-each select="marc:datafield[@tag=508]">
1013 <xsl:call-template name="subfieldSelectSpan">
1014 <xsl:with-param name="codes">a</xsl:with-param>
1015 </xsl:call-template>
1016 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1022 <xsl:if test="marc:datafield[@tag=583]">
1023 <span class="results_summary actionnote">
1024 <span class="label">Action note: </span>
1025 <xsl:for-each select="marc:datafield[@tag=583]">
1027 <xsl:when test="marc:subfield[@code='z']">
1028 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1031 <xsl:call-template name="subfieldSelect">
1032 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1033 </xsl:call-template>
1036 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1041 <xsl:call-template name="host-item-entries">
1042 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
1043 </xsl:call-template>
1045 <xsl:if test="marc:datafield[@tag=502]">
1046 <span class="results_summary diss_note">
1047 <span class="label">Dissertation note: </span>
1048 <xsl:for-each select="marc:datafield[@tag=502]">
1049 <xsl:call-template name="subfieldSelect">
1050 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1051 </xsl:call-template>
1053 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1058 <xsl:if test="marc:datafield[@tag=530]">
1059 <span class="results_summary additionalforms">
1060 <span class="label">Available additional physical forms:</span>
1061 <xsl:for-each select="marc:datafield[@tag=530]">
1062 <xsl:call-template name="subfieldSelect">
1063 <xsl:with-param name="codes">abcd</xsl:with-param>
1064 </xsl:call-template>
1065 <xsl:if test="marc:subfield[@code='u']">
1066 <xsl:for-each select="marc:subfield[@code='u']">
1067 <xsl:text> </xsl:text>
1069 <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1070 <xsl:value-of select="text()"/>
1074 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1079 <!-- 520 - Summary, etc. -->
1080 <xsl:for-each select="marc:datafield[@tag=520]">
1081 <span class="results_summary summary">
1082 <span class="label">
1084 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1085 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1086 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1087 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1088 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1089 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1092 <xsl:call-template name="subfieldSelect">
1093 <xsl:with-param name="codes">abc</xsl:with-param>
1094 </xsl:call-template>
1095 <xsl:if test="marc:subfield[@code='u']">
1096 <xsl:for-each select="marc:subfield[@code='u']">
1097 <xsl:text> </xsl:text>
1099 <xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1100 <xsl:value-of select="text()"/>
1107 <!-- Content Warning -->
1108 <xsl:variable name="ContentWarningField" select="marc:sysprefs/marc:syspref[@name='ContentWarningField']"/>
1109 <xsl:if test="marc:datafield[@tag=$ContentWarningField]">
1110 <span class="results_summary content_warning">
1111 <span class="label">Content warning: </span>
1112 <xsl:for-each select="marc:datafield[@tag=$ContentWarningField]">
1114 <xsl:when test="marc:subfield[@code='u']">
1116 <xsl:attribute name="href">
1117 <xsl:value-of select="marc:subfield[@code='u']"/>
1120 <xsl:when test="marc:subfield[@code='a']">
1121 <xsl:value-of select="marc:subfield[@code='a']"/>
1124 <xsl:value-of select="marc:subfield[@code='u']"/>
1128 <xsl:text> </xsl:text>
1130 <xsl:when test="not(marc:subfield[@code='u']) and marc:subfield[@code='a']">
1131 <xsl:value-of select="marc:subfield[@code='a']"/><xsl:text> </xsl:text>
1134 <xsl:call-template name="subfieldSelect">
1135 <xsl:with-param name="codes">bcdefghijklmnopqrstvwxyz</xsl:with-param>
1136 </xsl:call-template>
1137 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1142 <!-- 866 textual holdings -->
1143 <xsl:if test="marc:datafield[@tag=866]">
1144 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1145 <xsl:for-each select="marc:datafield[@tag=866]">
1146 <span class="holdings_note_data">
1147 <xsl:call-template name="subfieldSelect">
1148 <xsl:with-param name="codes">axz</xsl:with-param>
1149 </xsl:call-template>
1150 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1156 <!-- 867 textual holdings -->
1157 <xsl:if test="marc:datafield[@tag=867]">
1158 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1159 <xsl:for-each select="marc:datafield[@tag=867]">
1160 <span class="holdings_note_data">
1161 <xsl:call-template name="subfieldSelect">
1162 <xsl:with-param name="codes">axz</xsl:with-param>
1163 </xsl:call-template>
1164 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1170 <!-- 868 textual holdings -->
1171 <xsl:if test="marc:datafield[@tag=868]">
1172 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1173 <xsl:for-each select="marc:datafield[@tag=868]">
1174 <span class="holdings_note_data">
1175 <xsl:call-template name="subfieldSelect">
1176 <xsl:with-param name="codes">axz</xsl:with-param>
1177 </xsl:call-template>
1178 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1184 <!-- 765 - Original language entry -->
1185 <xsl:for-each select="marc:datafield[@tag=765]">
1186 <span class="results_summary original_language_entry">
1188 <xsl:when test="@ind2!=8 or not(marc:subfield[@code='i'])">
1189 <!-- fallback to this label too if 765$i is empty -->
1190 <span class="label">Translation of: </span>
1193 <span class="label">
1194 <xsl:value-of select="marc:subfield[@code='i']"/>
1195 <xsl:text>: </xsl:text>
1199 <span class="original_language_entry_data">
1200 <xsl:variable name="href">
1201 <!-- call template to get href of search URL -->
1202 <xsl:call-template name="GetCnumSearchURL">
1203 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
1204 <xsl:with-param name="opac_url" select="0"/>
1205 </xsl:call-template>
1207 <xsl:variable name="f765">
1208 <xsl:call-template name="subfieldSelect">
1209 <xsl:with-param name="codes">tad</xsl:with-param>
1210 <xsl:with-param name="delimeter">, </xsl:with-param>
1211 </xsl:call-template>
1214 <xsl:when test="$href">
1216 <xsl:attribute name="href"><xsl:value-of select="$href"/></xsl:attribute>
1217 <xsl:value-of select="$f765"/>
1221 <xsl:value-of select="$f765"/>
1227 <!-- End of 765 - Original language entry -->
1229 <!-- 770 - Supplement/Special issue entry -->
1230 <xsl:if test="marc:datafield[@tag=770]">
1231 <span class="results_summary supplement"><span class="label">Supplement: </span>
1232 <xsl:for-each select="marc:datafield[@tag=770]">
1233 <xsl:if test="marc:subfield[@code='i']">
1234 <span class="770_rel_info">
1235 <xsl:call-template name="subfieldSelect">
1236 <xsl:with-param name="codes">i</xsl:with-param>
1237 </xsl:call-template>
1238 <xsl:text> </xsl:text>
1243 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1244 <xsl:attribute name="href">
1245 /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>
1249 <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>
1253 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1254 <xsl:call-template name="subfieldSelect">
1255 <xsl:with-param name="codes">a_t</xsl:with-param>
1256 </xsl:call-template>
1260 <xsl:text> </xsl:text>
1261 <xsl:call-template name="subfieldSelect">
1262 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1263 </xsl:call-template>
1265 <xsl:when test="position()=last()"></xsl:when>
1266 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1272 <!-- 772 - Supplement parent entry -->
1273 <xsl:if test="marc:datafield[@tag=772]">
1274 <span class="results_summary supplement_parent"><span class="label">Supplement to: </span>
1275 <xsl:for-each select="marc:datafield[@tag=772]">
1276 <xsl:if test="marc:subfield[@code='i']">
1277 <span class="772_rel_info">
1278 <xsl:call-template name="subfieldSelect">
1279 <xsl:with-param name="codes">i</xsl:with-param>
1280 </xsl:call-template>
1281 <xsl:text> </xsl:text>
1286 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1287 <xsl:attribute name="href">
1288 /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>
1292 <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>
1296 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1297 <xsl:call-template name="subfieldSelect">
1298 <xsl:with-param name="codes">a_t</xsl:with-param>
1299 </xsl:call-template>
1303 <xsl:call-template name="subfieldSelect">
1304 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1305 </xsl:call-template>
1307 <xsl:when test="position()=last()"></xsl:when>
1308 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1314 <!-- 775 Other Edition -->
1315 <xsl:if test="marc:datafield[@tag=775]">
1316 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1317 <xsl:for-each select="marc:datafield[@tag=775]">
1318 <xsl:variable name="f775">
1319 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1320 <xsl:with-param name="codes">a_t</xsl:with-param>
1321 </xsl:call-template></xsl:with-param></xsl:call-template>
1323 <xsl:if test="marc:subfield[@code='i']">
1324 <xsl:call-template name="subfieldSelect">
1325 <xsl:with-param name="codes">i</xsl:with-param>
1326 </xsl:call-template>
1327 <xsl:text>: </xsl:text>
1331 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1332 <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>
1335 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f775, '()', ''), true())"/></xsl:attribute>
1338 <xsl:call-template name="subfieldSelect">
1339 <xsl:with-param name="codes">a_t</xsl:with-param>
1340 </xsl:call-template>
1343 <xsl:when test="position()=last()"></xsl:when>
1344 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1351 <xsl:if test="marc:datafield[@tag=780]">
1352 <xsl:for-each select="marc:datafield[@tag=780]">
1353 <xsl:if test="@ind1=0">
1354 <span class="results_summary preceeding_entry">
1356 <xsl:when test="@ind2=0">
1357 <span class="label">Continues:</span>
1359 <xsl:when test="@ind2=1">
1360 <span class="label">Continues in part:</span>
1362 <xsl:when test="@ind2=2">
1363 <span class="label">Supersedes:</span>
1365 <xsl:when test="@ind2=3">
1366 <span class="label">Supersedes in part:</span>
1368 <xsl:when test="@ind2=4">
1369 <span class="label">Formed by the union: ... and: ...</span>
1371 <xsl:when test="@ind2=5">
1372 <span class="label">Absorbed:</span>
1374 <xsl:when test="@ind2=6">
1375 <span class="label">Absorbed in part:</span>
1377 <xsl:when test="@ind2=7">
1378 <span class="label">Separated from:</span>
1381 <xsl:text> </xsl:text>
1383 <xsl:if test="marc:subfield[@code='i']">
1384 <span class="780_rel_info">
1385 <xsl:value-of select="marc:subfield[@code='i']"/>
1386 <xsl:text> </xsl:text>
1390 <xsl:variable name="f780">
1391 <xsl:call-template name="subfieldSelect">
1392 <xsl:with-param name="codes">a_t</xsl:with-param>
1393 </xsl:call-template>
1396 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1397 <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>
1398 <xsl:value-of select="$f780"/>
1402 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
1403 <xsl:value-of select="$f780"/>
1409 <xsl:if test="marc:subfield[@code='n']">
1410 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1418 <xsl:if test="marc:datafield[@tag=785]">
1419 <xsl:for-each select="marc:datafield[@tag=785]">
1420 <xsl:if test="@ind1=0">
1421 <span class="results_summary succeeding_entry">
1423 <xsl:when test="@ind2=0">
1424 <span class="label">Continued by:</span>
1426 <xsl:when test="@ind2=1">
1427 <span class="label">Continued in part by:</span>
1429 <xsl:when test="@ind2=2">
1430 <span class="label">Superseded by:</span>
1432 <xsl:when test="@ind2=3">
1433 <span class="label">Superseded in part by:</span>
1435 <xsl:when test="@ind2=4">
1436 <span class="label">Absorbed by:</span>
1438 <xsl:when test="@ind2=5">
1439 <span class="label">Absorbed in part by:</span>
1441 <xsl:when test="@ind2=6">
1442 <span class="label">Split into .. and ...:</span>
1444 <xsl:when test="@ind2=7">
1445 <span class="label">Merged with ... to form ...</span>
1447 <xsl:when test="@ind2=8">
1448 <span class="label">Changed back to:</span>
1451 <xsl:text> </xsl:text>
1453 <xsl:if test="marc:subfield[@code='i']">
1454 <span class="785_rel_info">
1455 <xsl:value-of select="marc:subfield[@code='i']"/>
1456 <xsl:text> </xsl:text>
1460 <xsl:variable name="f785">
1461 <xsl:call-template name="subfieldSelect">
1462 <xsl:with-param name="codes">a_t</xsl:with-param>
1463 </xsl:call-template>
1467 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1468 <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>
1469 <xsl:value-of select="$f785"/>
1473 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
1474 <xsl:value-of select="$f785"/>
1484 <!-- 787 Other Relationship Entry -->
1485 <xsl:if test="marc:datafield[@tag=787]">
1486 <span class="results_summary other_relationship_entry"><span class="label">Other related works: </span>
1487 <xsl:for-each select="marc:datafield[@tag=787]">
1488 <span class="other_relationship_entry">
1489 <xsl:variable name="f787">
1490 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1491 <xsl:with-param name="codes">a_t</xsl:with-param>
1492 </xsl:call-template></xsl:with-param></xsl:call-template>
1494 <xsl:if test="marc:subfield[@code='i']">
1495 <xsl:call-template name="subfieldSelect">
1496 <xsl:with-param name="codes">i</xsl:with-param>
1497 </xsl:call-template>
1498 <xsl:text>: </xsl:text>
1501 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1502 <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>
1503 <xsl:value-of select="$f787"/>
1507 <xsl:variable name="relation_query">
1508 <xsl:text>ti,phr:(</xsl:text>
1509 <xsl:call-template name="quote_search_term">
1510 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1511 </xsl:call-template>
1512 <xsl:text>)</xsl:text>
1513 <xsl:if test="marc:subfield[@code='a']">
1514 <xsl:text> AND au:(</xsl:text>
1515 <xsl:call-template name="quote_search_term">
1516 <xsl:with-param name="term">
1517 <xsl:value-of select="marc:subfield[@code='a']"/>
1519 </xsl:call-template>
1520 <xsl:text>)</xsl:text>
1524 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" />
1526 <xsl:value-of select="$f787"/>
1531 <xsl:when test="position()=last()"></xsl:when>
1532 <xsl:otherwise><span class="separator"><xsl:text>; </xsl:text></span></xsl:otherwise>
1539 <!-- Indicate if record is suppressed in OPAC -->
1541 <xsl:when test="$OpacSuppression = 1 and marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
1542 <span class="results_summary suppressed_opac">
1543 <span class="label">OPAC view: </span>
1548 <xsl:if test="$OPACBaseURL!=''">
1549 <span class="results_summary opac_view"><span class="label">OPAC view: </span>
1550 <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>.
1560 <xsl:template name="nameABCQ">
1561 <xsl:call-template name="chopPunctuation">
1562 <xsl:with-param name="chopString">
1563 <xsl:call-template name="subfieldSelect">
1564 <xsl:with-param name="codes">abcq</xsl:with-param>
1565 </xsl:call-template>
1567 <xsl:with-param name="punctuation">
1568 <xsl:text>:,;/ </xsl:text>
1570 </xsl:call-template>
1573 <xsl:template name="nameABCDN">
1574 <xsl:call-template name="chopPunctuation">
1575 <xsl:with-param name="chopString">
1576 <xsl:call-template name="subfieldSelect">
1577 <xsl:with-param name="codes">abcdn</xsl:with-param>
1578 </xsl:call-template>
1580 <xsl:with-param name="punctuation">
1581 <xsl:text>:,;/ </xsl:text>
1583 </xsl:call-template>
1586 <xsl:template name="nameACDEQ">
1587 <xsl:call-template name="subfieldSelect">
1588 <xsl:with-param name="codes">acdeq</xsl:with-param>
1589 </xsl:call-template>
1592 <xsl:template name="specialSubfieldSelect">
1593 <xsl:param name="anyCodes"/>
1594 <xsl:param name="axis"/>
1595 <xsl:param name="beforeCodes"/>
1596 <xsl:param name="afterCodes"/>
1597 <xsl:variable name="str">
1598 <xsl:for-each select="marc:subfield">
1599 <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])">
1600 <xsl:value-of select="text()"/>
1601 <xsl:text> </xsl:text>
1605 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1608 <xsl:template name="showAuthor">
1609 <xsl:param name="authorfield"/>
1610 <xsl:param name="UseAuthoritiesForTracings"/>
1611 <xsl:if test="count($authorfield)>0">
1613 <xsl:for-each select="$authorfield">
1615 <xsl:when test="position()>1"/>
1617 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1618 <!--#13382 Changed Additional author to contributor -->
1619 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1623 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1624 <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>
1627 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
1631 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1633 <xsl:call-template name="chopPunctuation">
1634 <xsl:with-param name="chopString">
1635 <xsl:call-template name="subfieldSelect">
1636 <xsl:with-param name="codes">
1638 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1639 <xsl:when test="@tag=111">aeq</xsl:when>
1640 <xsl:when test="@tag=110">ab</xsl:when>
1641 <xsl:otherwise>abcjq</xsl:otherwise>
1644 </xsl:call-template>
1646 <xsl:with-param name="punctuation">
1647 <xsl:text>:,;/ </xsl:text>
1649 </xsl:call-template>
1650 <!-- Display only name and title portion in 110 field -->
1651 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1652 <span class="titleportion">
1654 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1655 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1657 <xsl:call-template name="chopPunctuation">
1658 <xsl:with-param name="chopString">
1659 <xsl:call-template name="subfieldSelect">
1660 <xsl:with-param name="codes">cdnt</xsl:with-param>
1661 </xsl:call-template>
1663 </xsl:call-template>
1666 <!-- Display only name and title portion in 111 field -->
1667 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1668 <span class="titleportion">
1670 <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>
1671 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1674 <xsl:call-template name="chopPunctuation">
1675 <xsl:with-param name="chopString">
1676 <xsl:call-template name="subfieldSelect">
1677 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1678 </xsl:call-template>
1680 </xsl:call-template>
1683 <!-- Display only dates in 100 field -->
1684 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1685 <span class="authordates">
1686 <xsl:text>, </xsl:text>
1687 <xsl:call-template name="chopPunctuation">
1688 <xsl:with-param name="chopString">
1689 <xsl:call-template name="subfieldSelect">
1690 <xsl:with-param name="codes">d</xsl:with-param>
1691 </xsl:call-template>
1693 </xsl:call-template>
1698 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1699 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1700 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1701 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1702 <xsl:if test="@tag=710 or @tag=711">
1703 <xsl:call-template name="chopPunctuation">
1704 <xsl:with-param name="chopString">
1705 <xsl:call-template name="subfieldSelect">
1706 <xsl:with-param name="codes">
1708 <xsl:when test="@tag=711">aeq</xsl:when>
1709 <xsl:otherwise>ab</xsl:otherwise>
1712 </xsl:call-template>
1714 <xsl:with-param name="punctuation">
1715 <xsl:text>:,;/ </xsl:text>
1717 </xsl:call-template>
1718 <!-- Display only name and title portion in 711 field -->
1719 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1720 <span class="titleportion">
1722 <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>
1723 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1726 <xsl:call-template name="chopPunctuation">
1727 <xsl:with-param name="chopString">
1728 <xsl:call-template name="subfieldSelect">
1729 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1730 </xsl:call-template>
1732 </xsl:call-template>
1735 <!-- Display only name and title portion in 710 field -->
1736 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1737 <span class="titleportion">
1739 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1740 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1742 <xsl:call-template name="chopPunctuation">
1743 <xsl:with-param name="chopString">
1744 <xsl:call-template name="subfieldSelect">
1745 <xsl:with-param name="codes">cdnt</xsl:with-param>
1746 </xsl:call-template>
1748 </xsl:call-template>
1753 <!-- Display only name portion in 700 field -->
1754 <xsl:if test="@tag=700">
1755 <xsl:call-template name="chopPunctuation">
1756 <xsl:with-param name="chopString">
1757 <xsl:call-template name="subfieldSelect">
1758 <xsl:with-param name="codes">abcq</xsl:with-param>
1759 </xsl:call-template>
1761 </xsl:call-template>
1763 <!-- Display class "authordates" in 700 field -->
1764 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1765 <span class="authordates">
1766 <xsl:text>, </xsl:text>
1767 <xsl:call-template name="chopPunctuation">
1768 <xsl:with-param name="chopString">
1769 <xsl:call-template name="subfieldSelect">
1770 <xsl:with-param name="codes">d</xsl:with-param>
1771 </xsl:call-template>
1773 </xsl:call-template>
1776 <!-- Display class "titleportion" in 700 field -->
1777 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1778 <xsl:if test="@tag=700 and $titleportionfields">
1779 <span class="titleportion">
1780 <xsl:text>. </xsl:text>
1781 <xsl:call-template name="chopPunctuation">
1782 <xsl:with-param name="chopString">
1783 <xsl:call-template name="subfieldSelect">
1784 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1785 </xsl:call-template>
1787 </xsl:call-template>
1794 <!-- add relator code too between brackets-->
1795 <!-- #13383 include relator code j for field 111 -->
1796 <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'])">
1797 <span class="relatorcode">
1798 <xsl:text> [</xsl:text>
1800 <xsl:when test="@tag=111 or @tag=711">
1802 <!-- Prefer j over 4 for fields 111 and 711-->
1803 <xsl:when test="marc:subfield[@code='j']">
1804 <xsl:for-each select="marc:subfield[@code='j']">
1805 <xsl:value-of select="."/>
1806 <xsl:if test="position() != last()">, </xsl:if>
1810 <xsl:for-each select="marc:subfield[@code=4]">
1811 <xsl:value-of select="."/>
1812 <xsl:if test="position() != last()">, </xsl:if>
1817 <!-- Prefer e over 4 for fields 111 and 711-->
1818 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1819 <xsl:for-each select="marc:subfield[@code='e']">
1820 <xsl:value-of select="."/>
1821 <xsl:if test="position() != last()">, </xsl:if>
1825 <xsl:for-each select="marc:subfield[@code=4]">
1826 <xsl:value-of select="."/>
1827 <xsl:if test="position() != last()">, </xsl:if>
1831 <xsl:text>]</xsl:text>
1835 <xsl:if test="marc:subfield[@code=9]">
1836 <xsl:call-template name="showAuthlink">
1837 <xsl:with-param name="authid"><xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:with-param>
1838 </xsl:call-template>
1841 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1848 <xsl:template name="showAuthlink">
1849 <xsl:param name="authid"/>
1850 <xsl:text> </xsl:text>
1851 <a class='authlink'>
1852 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="$authid"/></xsl:attribute>
1853 <xsl:attribute name="title">View authority record</xsl:attribute>
1854 <xsl:attribute name="target">_blank</xsl:attribute>
1855 <xsl:element name="i">
1856 <xsl:attribute name="class">fa fa-search</xsl:attribute>
1857 <xsl:attribute name="aria-label">View authority record</xsl:attribute>
1862 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1863 <xsl:template name="subfieldSelectSubject">
1864 <xsl:param name="codes"/>
1865 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1866 <xsl:param name="subdivCodes"/>
1867 <xsl:param name="subdivDelimiter"/>
1868 <xsl:param name="prefix"/>
1869 <xsl:param name="suffix"/>
1870 <xsl:param name="urlencode"/>
1871 <xsl:variable name="str">
1872 <xsl:for-each select="marc:subfield">
1873 <xsl:if test="contains($codes, @code)">
1874 <xsl:if test="contains($subdivCodes, @code)">
1875 <xsl:value-of select="$subdivDelimiter"/>
1877 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1882 <xsl:when test="$urlencode=1">
1883 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1886 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>