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:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
235 <span class="results_summary volumes"><span class="label">Volumes: </span>
238 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
239 <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>
242 <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>
245 <xsl:text>Show volumes</xsl:text>
251 <xsl:if test="$leader19='c'">
252 <span class="results_summary set"><span class="label">Set: </span>
253 <xsl:for-each select="marc:datafield[@tag=773]">
256 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
257 <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>
260 <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>
263 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
266 <xsl:when test="position()=last()"></xsl:when>
267 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
273 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
274 <xsl:if test="$display880">
275 <xsl:call-template name="m880Select">
276 <xsl:with-param name="basetags">260,264</xsl:with-param>
277 <xsl:with-param name="codes">abcg</xsl:with-param>
278 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
279 <xsl:with-param name="label">Publication details: </xsl:with-param>
283 <!-- Publisher info and RDA related info from tags 260, 264 -->
285 <xsl:when test="marc:datafield[@tag=264]">
286 <xsl:call-template name="showRDAtag264">
287 <xsl:with-param name="show_url">1</xsl:with-param>
290 <xsl:when test="marc:datafield[@tag=260]">
291 <span class="results_summary publisher"><span class="label">Publication details: </span>
292 <xsl:for-each select="marc:datafield[@tag=260]">
293 <xsl:for-each select="marc:subfield">
294 <xsl:if test="@code='a'">
296 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=pl:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
297 <xsl:value-of select="current()"/>
300 <xsl:if test="@code='b'">
302 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
303 <xsl:value-of select="current()"/>
306 <xsl:if test="@code='c'">
308 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=copydate:"<xsl:value-of select="str:encode-uri(current(), true())"/>"</xsl:attribute>
309 <xsl:value-of select="current()"/>
312 <xsl:if test="@code='g'">
313 <xsl:call-template name="chopPunctuation">
314 <xsl:with-param name="chopString">
315 <xsl:value-of select="current()"/>
319 <xsl:if test="position() != last()">
320 <xsl:text> </xsl:text>
323 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
329 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
330 <xsl:if test="$display880">
331 <xsl:call-template name="m880Select">
332 <xsl:with-param name="basetags">250</xsl:with-param>
333 <xsl:with-param name="codes">ab</xsl:with-param>
334 <xsl:with-param name="class">results_summary edition</xsl:with-param>
335 <xsl:with-param name="label">Edition: </xsl:with-param>
339 <xsl:if test="marc:datafield[@tag=250]">
340 <span class="results_summary edition"><span class="label">Edition: </span>
341 <xsl:for-each select="marc:datafield[@tag=250]">
342 <xsl:call-template name="chopPunctuation">
343 <xsl:with-param name="chopString">
344 <xsl:call-template name="subfieldSelect">
345 <xsl:with-param name="codes">ab</xsl:with-param>
349 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
354 <!-- Description: Alternate Graphic Representation (MARC 880) -->
355 <xsl:if test="$display880">
356 <xsl:call-template name="m880Select">
357 <xsl:with-param name="basetags">300</xsl:with-param>
358 <xsl:with-param name="codes">abceg</xsl:with-param>
359 <xsl:with-param name="class">results_summary description</xsl:with-param>
360 <xsl:with-param name="label">Description: </xsl:with-param>
364 <xsl:if test="marc:datafield[@tag=300]">
365 <span class="results_summary description"><span class="label">Description: </span>
366 <xsl:for-each select="marc:datafield[@tag=300]">
367 <xsl:call-template name="chopPunctuation">
368 <xsl:with-param name="chopString">
369 <xsl:call-template name="subfieldSelect">
370 <xsl:with-param name="codes">abcefg</xsl:with-param>
374 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
379 <!-- Content Type -->
380 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
381 <span class="results_summary" id="content_type">
382 <xsl:if test="marc:datafield[@tag=336]">
383 <span class="label">Content type: </span>
384 <xsl:for-each select="marc:datafield[@tag=336]">
385 <xsl:call-template name="subfieldSelect">
386 <xsl:with-param name="codes">a</xsl:with-param>
387 <xsl:with-param name="delimeter">, </xsl:with-param>
389 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
392 <xsl:text> </xsl:text>
394 <xsl:if test="marc:datafield[@tag=337]">
395 <span class="label">Media type: </span>
396 <xsl:for-each select="marc:datafield[@tag=337]">
397 <xsl:call-template name="subfieldSelect">
398 <xsl:with-param name="codes">a</xsl:with-param>
399 <xsl:with-param name="delimeter">, </xsl:with-param>
401 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
404 <xsl:text> </xsl:text>
406 <xsl:if test="marc:datafield[@tag=338]">
407 <span class="label">Carrier type: </span>
408 <xsl:for-each select="marc:datafield[@tag=338]">
409 <xsl:call-template name="subfieldSelect">
410 <xsl:with-param name="codes">a</xsl:with-param>
411 <xsl:with-param name="delimeter">, </xsl:with-param>
413 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
419 <!-- 385 - Audience -->
420 <xsl:if test="marc:datafield[@tag=385]">
421 <span class="results_summary audience">
422 <span class="label">Audience: </span>
423 <xsl:for-each select="marc:datafield[@tag=385]">
424 <xsl:if test="marc:subfield[@code='m']">
425 <xsl:call-template name="chopPunctuation">
426 <xsl:with-param name="chopString">
427 <xsl:call-template name="subfieldSelect">
428 <xsl:with-param name="codes">m</xsl:with-param>
432 <xsl:text>: </xsl:text>
434 <xsl:call-template name="chopPunctuation">
435 <xsl:with-param name="chopString">
436 <xsl:call-template name="subfieldSelect">
437 <xsl:with-param name="codes">a</xsl:with-param>
438 <xsl:with-param name="delimeter">, </xsl:with-param>
442 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise></xsl:choose>
447 <xsl:call-template name="showISBNISSN"/>
449 <xsl:if test="marc:datafield[@tag=013]">
450 <span class="results_summary patent_info">
451 <span class="label">Patent information: </span>
452 <xsl:for-each select="marc:datafield[@tag=013]">
453 <xsl:call-template name="subfieldSelect">
454 <xsl:with-param name="codes">acdef</xsl:with-param>
455 <xsl:with-param name="delimeter">, </xsl:with-param>
457 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
462 <xsl:if test="marc:datafield[@tag=088]">
463 <span class="results_summary report_number">
464 <span class="label">Report number: </span>
465 <xsl:for-each select="marc:datafield[@tag=088]">
466 <xsl:call-template name="subfieldSelect">
467 <xsl:with-param name="codes">a</xsl:with-param>
469 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
474 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
475 <xsl:if test="$display880">
476 <xsl:call-template name="m880Select">
477 <xsl:with-param name="basetags">246</xsl:with-param>
478 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
479 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
480 <xsl:with-param name="label">Other title: </xsl:with-param>
484 <xsl:if test="marc:datafield[@tag=246]">
485 <span class="results_summary other_title"><span class="label">Other title: </span>
486 <xsl:for-each select="marc:datafield[@tag=246]">
487 <xsl:if test="marc:subfield[@code='i']">
488 <xsl:call-template name="subfieldSelect">
489 <xsl:with-param name="codes">i</xsl:with-param>
492 <xsl:text> </xsl:text>
493 <xsl:call-template name="chopPunctuation">
494 <xsl:with-param name="chopString">
495 <xsl:call-template name="subfieldSelect">
496 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
500 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
502 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
503 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
504 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
505 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
506 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
507 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
508 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
509 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
510 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
513 <!-- #13386 added separator | -->
514 <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>
519 <xsl:if test="marc:datafield[@tag=242]">
520 <span class="results_summary translated_title"><span class="label">Title translated: </span>
521 <xsl:for-each select="marc:datafield[@tag=242]">
522 <xsl:call-template name="chopPunctuation">
523 <xsl:with-param name="chopString">
524 <xsl:call-template name="subfieldSelect">
525 <xsl:with-param name="codes">abchnp</xsl:with-param>
529 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
534 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
535 <xsl:if test="$display880">
536 <xsl:call-template name="m880Select">
537 <xsl:with-param name="basetags">130,240</xsl:with-param>
538 <xsl:with-param name="codes">adfklmor</xsl:with-param>
539 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
540 <xsl:with-param name="label">Uniform title: </xsl:with-param>
544 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
545 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
546 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
547 <xsl:if test="marc:subfield[@code='i']">
548 <xsl:call-template name="subfieldSelect">
549 <xsl:with-param name="codes">i</xsl:with-param>
552 <xsl:text> </xsl:text>
553 <xsl:for-each select="marc:subfield">
554 <xsl:if test="contains('adfghklmnoprst',@code)">
555 <xsl:value-of select="text()"/>
556 <xsl:text> </xsl:text>
559 <xsl:if test="position() != last()">
560 <span class="separator"><xsl:text> | </xsl:text></span>
566 <!-- #13382 Added Related works 700$i -->
567 <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']]">
568 <span class="results_summary related_works"><span class="label">Related works: </span>
569 <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']]">
570 <xsl:variable name="str">
571 <xsl:call-template name="subfieldSelect">
572 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
575 <xsl:call-template name="chopPunctuation">
576 <xsl:with-param name="chopString">
577 <xsl:value-of select="$str"/>
580 <!-- add relator code too between brackets-->
581 <xsl:if test="marc:subfield[@code='4' or @code='e']">
582 <span class="relatorcode">
583 <xsl:text> [</xsl:text>
585 <xsl:when test="marc:subfield[@code='e']">
586 <xsl:for-each select="marc:subfield[@code='e']">
587 <xsl:value-of select="."/>
588 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
592 <xsl:for-each select="marc:subfield[@code='4']">
593 <xsl:value-of select="."/>
594 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
598 <xsl:text>]</xsl:text>
602 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
608 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
609 <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'])]">
610 <span class="results_summary contained_works"><span class="label">Contained works: </span>
611 <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'])]">
612 <xsl:variable name="str">
613 <xsl:call-template name="subfieldSelect">
614 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
617 <xsl:call-template name="chopPunctuation">
618 <xsl:with-param name="chopString">
619 <xsl:value-of select="$str"/>
622 <!-- add relator code too between brackets-->
623 <xsl:if test="marc:subfield[@code='4' or @code='e']">
624 <span class="relatorcode">
625 <xsl:text> [</xsl:text>
627 <xsl:when test="marc:subfield[@code='e']">
628 <xsl:for-each select="marc:subfield[@code='e']">
629 <xsl:value-of select="."/>
630 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
634 <xsl:for-each select="marc:subfield[@code='4']">
635 <xsl:value-of select="."/>
636 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
640 <xsl:text>]</xsl:text>
644 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
651 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
652 <span class="results_summary subjects"><span class="label">Subject(s): </span>
653 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
656 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
657 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
658 <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>
660 <xsl:when test="$TraceSubjectSubdivisions='1'">
661 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
662 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
663 <xsl:with-param name="delimeter"> AND </xsl:with-param>
664 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
665 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
666 <xsl:with-param name="urlencode">1</xsl:with-param>
671 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
673 <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>
677 <xsl:call-template name="chopPunctuation">
678 <xsl:with-param name="chopString">
679 <xsl:call-template name="subfieldSelect">
680 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
681 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
682 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
688 <xsl:if test="marc:subfield[@code=9]">
689 <xsl:text> </xsl:text>
691 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
692 <xsl:element name="i">
693 <xsl:attribute name="class">fa fa-search</xsl:attribute>
694 <xsl:attribute name="aria-label">View authority record</xsl:attribute>
700 <xsl:when test="position()=last()"></xsl:when>
701 <xsl:otherwise> | </xsl:otherwise>
709 <xsl:if test="marc:datafield[@tag=655]">
710 <span class="results_summary genre"><span class="label">Genre/Form: </span>
711 <xsl:for-each select="marc:datafield[@tag=655]">
714 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
715 <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>
717 <xsl:when test="$TraceSubjectSubdivisions='1'">
718 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
719 <xsl:with-param name="codes">avxyz</xsl:with-param>
720 <xsl:with-param name="delimeter"> AND </xsl:with-param>
721 <xsl:with-param name="prefix">(index-term-genre<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
722 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
723 <xsl:with-param name="urlencode">1</xsl:with-param>
728 <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>
731 <xsl:call-template name="subfieldSelect">
732 <xsl:with-param name="codes">avxyz</xsl:with-param>
733 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
734 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
738 <xsl:if test="marc:subfield[@code=9]">
739 <xsl:text> </xsl:text>
741 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
742 <xsl:element name="i">
743 <xsl:attribute name="class">fa fa-search</xsl:attribute>
744 <xsl:attribute name="aria-label">View authority record</xsl:attribute>
748 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
753 <!-- MARC21 776 Additional Physical Form Entry -->
754 <xsl:if test="marc:datafield[@tag=776]">
755 <span class="results_summary add_physical_form">
756 <span class="label">Additional physical formats: </span>
757 <xsl:for-each select="marc:datafield[@tag=776]">
758 <xsl:variable name="linktext">
760 <xsl:when test="marc:subfield[@code='t']">
761 <xsl:value-of select="marc:subfield[@code='t']"/>
763 <xsl:when test="marc:subfield[@code='a']">
764 <xsl:value-of select="marc:subfield[@code='a']"/>
767 <xsl:text>No title</xsl:text>
771 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
772 <xsl:call-template name="subfieldSelect">
773 <xsl:with-param name="codes">i</xsl:with-param>
775 <xsl:text>: </xsl:text>
778 <xsl:when test="marc:subfield[@code='w']">
780 <xsl:attribute name="href">
781 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
782 <xsl:call-template name="extractControlNumber">
783 <xsl:with-param name="subfieldW">
784 <xsl:value-of select="marc:subfield[@code='w']"/>
788 <xsl:value-of select="$linktext"/>
792 <xsl:value-of select="$linktext"/>
795 <xsl:if test="position() != last()">
796 <xsl:text>; </xsl:text>
802 <!-- MARC21 777 - Issued With Entry -->
803 <xsl:if test="marc:datafield[@tag=777]">
804 <xsl:for-each select="marc:datafield[@tag=777]">
805 <xsl:if test="@ind1 != 1">
806 <span class="results_summary issued_with">
809 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
810 <xsl:value-of select="marc:subfield[@code='i']"/>
813 <xsl:text>Issued with:</xsl:text>
816 <xsl:text> </xsl:text>
818 <xsl:variable name="f777">
819 <xsl:call-template name="chopPunctuation">
820 <xsl:with-param name="chopString">
821 <xsl:call-template name="subfieldSelect">
822 <xsl:with-param name="codes">a_t</xsl:with-param>
828 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
829 <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>
830 <xsl:value-of select="translate($f777, '()', '')"/>
834 <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>
835 <xsl:value-of select="$f777"/>
839 <xsl:if test="marc:subfield[@code='g']">
840 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
843 <xsl:if test="marc:subfield[@code='n']">
844 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
850 <!-- Publisher or Distributor Number -->
851 <xsl:if test="marc:datafield[@tag=028]">
852 <span class="results_summary publisher_number ">
853 <span class="label">Publisher number: </span>
854 <xsl:for-each select="marc:datafield[@tag=028]">
855 <xsl:call-template name="subfieldSelect">
856 <xsl:with-param name="codes">abq</xsl:with-param>
857 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
863 <!-- DDC classification -->
864 <xsl:if test="marc:datafield[@tag=082]">
865 <span class="results_summary ddc">
866 <span class="label">DDC classification: </span>
867 <xsl:for-each select="marc:datafield[@tag=082]">
868 <xsl:call-template name="subfieldSelect">
869 <xsl:with-param name="codes">a</xsl:with-param>
870 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
873 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
874 <xsl:otherwise> | </xsl:otherwise>
880 <!-- LOC classification -->
881 <xsl:if test="marc:datafield[@tag=050]">
882 <span class="results_summary loc">
883 <span class="label">LOC classification: </span>
884 <xsl:for-each select="marc:datafield[@tag=050]">
885 <xsl:call-template name="subfieldSelect">
886 <xsl:with-param name="codes">ab</xsl:with-param>
887 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
893 <!-- NLM classification -->
894 <xsl:if test="marc:datafield[@tag=060]">
895 <span class="results_summary nlm">
896 <span class="label">NLM classification: </span>
897 <xsl:for-each select="marc:datafield[@tag=060]">
898 <xsl:call-template name="subfieldSelect">
899 <xsl:with-param name="codes">a</xsl:with-param>
900 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
902 <xsl:if test="not(position()=last())"><xsl:text> | </xsl:text></xsl:if>
907 <!-- Other classification -->
908 <xsl:if test="marc:datafield[@tag=084]">
909 <span class="results_summary oc">
910 <span class="label">Other classification: </span>
911 <xsl:for-each select="marc:datafield[@tag=084]">
912 <xsl:call-template name="subfieldSelect">
913 <xsl:with-param name="codes">a</xsl:with-param>
914 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
917 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
918 <xsl:otherwise> | </xsl:otherwise>
924 <xsl:if test="marc:datafield[@tag=856]">
925 <span class="results_summary online_resources"><span class="label">Online resources: </span>
926 <xsl:for-each select="marc:datafield[@tag=856]">
927 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
929 <xsl:attribute name="href">
930 <xsl:if test="not(contains(marc:subfield[@code='u'],'://') or contains(marc:subfield[@code='u'],'mailto:'))">
932 <xsl:when test="@ind1=7">
933 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
935 <xsl:when test="@ind1=0">
936 <xsl:text>mailto:</xsl:text>
938 <xsl:when test="@ind1=1">
939 <xsl:text>ftp://</xsl:text>
941 <xsl:when test="@ind1=2">
942 <xsl:text>telnet://</xsl:text>
944 <xsl:when test="@ind1=3">
945 <xsl:text>tel:</xsl:text>
948 <xsl:text>http://</xsl:text>
952 <xsl:value-of select="marc:subfield[@code='u']"/>
955 <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')">
956 <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>
958 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
959 <xsl:call-template name="subfieldSelect">
960 <xsl:with-param name="codes">y3z</xsl:with-param>
963 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
965 <xsl:when test="$URLLinkText!=''">
966 <xsl:value-of select="$URLLinkText"/>
969 <xsl:text>Click here to access online</xsl:text>
976 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
977 <xsl:otherwise> | </xsl:otherwise>
984 <!-- 505 - Formatted contents note -->
985 <xsl:if test="marc:datafield[@tag=505]">
986 <div class="results_summary contents">
988 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
989 <span class="label">Contents:</span>
991 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
992 <span class="label">Incomplete contents:</span>
994 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
995 <span class="label">Partial contents:</span>
998 <xsl:for-each select="marc:datafield[@tag=505]">
999 <div class='contentblock'>
1001 <xsl:when test="@ind2=0">
1002 <xsl:call-template name="subfieldSelectSpan">
1003 <xsl:with-param name="newline">1</xsl:with-param>
1004 <xsl:with-param name="codes">trug</xsl:with-param>
1005 </xsl:call-template>
1008 <xsl:call-template name="subfieldSelectSpan">
1009 <xsl:with-param name="newline">1</xsl:with-param>
1010 <xsl:with-param name="codes">atrug</xsl:with-param>
1011 </xsl:call-template>
1020 <xsl:if test="marc:datafield[@tag=586]">
1021 <span class="results_summary awardsnote">
1022 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1023 <span class="label">Awards: </span>
1025 <xsl:for-each select="marc:datafield[@tag=586]">
1026 <xsl:value-of select="marc:subfield[@code='a']"/>
1027 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1033 <xsl:if test="marc:datafield[@tag=508]">
1034 <span class="results_summary prod_credits">
1035 <span class="label">Production credits: </span>
1036 <xsl:for-each select="marc:datafield[@tag=508]">
1037 <xsl:call-template name="subfieldSelectSpan">
1038 <xsl:with-param name="codes">a</xsl:with-param>
1039 </xsl:call-template>
1040 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1046 <xsl:if test="marc:datafield[@tag=583]">
1047 <span class="results_summary actionnote">
1048 <span class="label">Action note: </span>
1049 <xsl:for-each select="marc:datafield[@tag=583]">
1051 <xsl:when test="marc:subfield[@code='z']">
1052 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1055 <xsl:call-template name="subfieldSelect">
1056 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1057 </xsl:call-template>
1060 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1065 <xsl:call-template name="host-item-entries">
1066 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
1067 </xsl:call-template>
1069 <xsl:if test="marc:datafield[@tag=502]">
1070 <span class="results_summary diss_note">
1071 <span class="label">Dissertation note: </span>
1072 <xsl:for-each select="marc:datafield[@tag=502]">
1073 <xsl:call-template name="subfieldSelect">
1074 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1075 </xsl:call-template>
1077 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1081 <!-- 866 textual holdings -->
1082 <xsl:if test="marc:datafield[@tag=866]">
1083 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1084 <xsl:for-each select="marc:datafield[@tag=866]">
1085 <span class="holdings_note_data">
1086 <xsl:call-template name="subfieldSelect">
1087 <xsl:with-param name="codes">axz</xsl:with-param>
1088 </xsl:call-template>
1089 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1095 <!-- 867 textual holdings -->
1096 <xsl:if test="marc:datafield[@tag=867]">
1097 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1098 <xsl:for-each select="marc:datafield[@tag=867]">
1099 <span class="holdings_note_data">
1100 <xsl:call-template name="subfieldSelect">
1101 <xsl:with-param name="codes">axz</xsl:with-param>
1102 </xsl:call-template>
1103 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1109 <!-- 868 textual holdings -->
1110 <xsl:if test="marc:datafield[@tag=868]">
1111 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1112 <xsl:for-each select="marc:datafield[@tag=868]">
1113 <span class="holdings_note_data">
1114 <xsl:call-template name="subfieldSelect">
1115 <xsl:with-param name="codes">axz</xsl:with-param>
1116 </xsl:call-template>
1117 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1123 <!-- 770 - Supplement/Special issue entry -->
1124 <xsl:if test="marc:datafield[@tag=770]">
1125 <span class="results_summary supplement"><span class="label">Supplement: </span>
1126 <xsl:for-each select="marc:datafield[@tag=770]">
1127 <xsl:if test="marc:subfield[@code='i']">
1128 <span class="770_rel_info">
1129 <xsl:call-template name="subfieldSelect">
1130 <xsl:with-param name="codes">i</xsl:with-param>
1131 </xsl:call-template>
1132 <xsl:text> </xsl:text>
1137 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1138 <xsl:attribute name="href">
1139 /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>
1143 <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>
1147 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1148 <xsl:call-template name="subfieldSelect">
1149 <xsl:with-param name="codes">a_t</xsl:with-param>
1150 </xsl:call-template>
1154 <xsl:text> </xsl:text>
1155 <xsl:call-template name="subfieldSelect">
1156 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1157 </xsl:call-template>
1159 <xsl:when test="position()=last()"></xsl:when>
1160 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1166 <!-- 772 - Supplement parent entry -->
1167 <xsl:if test="marc:datafield[@tag=772]">
1168 <span class="results_summary supplement_parent"><span class="label">Supplement to: </span>
1169 <xsl:for-each select="marc:datafield[@tag=772]">
1170 <xsl:if test="marc:subfield[@code='i']">
1171 <span class="772_rel_info">
1172 <xsl:call-template name="subfieldSelect">
1173 <xsl:with-param name="codes">i</xsl:with-param>
1174 </xsl:call-template>
1175 <xsl:text> </xsl:text>
1180 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1181 <xsl:attribute name="href">
1182 /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>
1186 <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>
1190 <xsl:when test="marc:subfield[@code='a'] or marc:subfield[@code='t']">
1191 <xsl:call-template name="subfieldSelect">
1192 <xsl:with-param name="codes">a_t</xsl:with-param>
1193 </xsl:call-template>
1197 <xsl:call-template name="subfieldSelect">
1198 <xsl:with-param name="codes">bdghkmnr9usxyz</xsl:with-param>
1199 </xsl:call-template>
1201 <xsl:when test="position()=last()"></xsl:when>
1202 <xsl:otherwise><span class="separator"> | </span></xsl:otherwise>
1208 <!-- 775 Other Edition -->
1209 <xsl:if test="marc:datafield[@tag=775]">
1210 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1211 <xsl:for-each select="marc:datafield[@tag=775]">
1212 <xsl:variable name="f775">
1213 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1214 <xsl:with-param name="codes">a_t</xsl:with-param>
1215 </xsl:call-template></xsl:with-param></xsl:call-template>
1217 <xsl:if test="marc:subfield[@code='i']">
1218 <xsl:call-template name="subfieldSelect">
1219 <xsl:with-param name="codes">i</xsl:with-param>
1220 </xsl:call-template>
1221 <xsl:text>: </xsl:text>
1225 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1226 <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>
1229 <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>
1232 <xsl:call-template name="subfieldSelect">
1233 <xsl:with-param name="codes">a_t</xsl:with-param>
1234 </xsl:call-template>
1237 <xsl:when test="position()=last()"></xsl:when>
1238 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1245 <xsl:if test="marc:datafield[@tag=780]">
1246 <xsl:for-each select="marc:datafield[@tag=780]">
1247 <xsl:if test="@ind1=0">
1248 <span class="results_summary preceeding_entry">
1250 <xsl:when test="@ind2=0">
1251 <span class="label">Continues:</span>
1253 <xsl:when test="@ind2=1">
1254 <span class="label">Continues in part:</span>
1256 <xsl:when test="@ind2=2">
1257 <span class="label">Supersedes:</span>
1259 <xsl:when test="@ind2=3">
1260 <span class="label">Supersedes in part:</span>
1262 <xsl:when test="@ind2=4">
1263 <span class="label">Formed by the union: ... and: ...</span>
1265 <xsl:when test="@ind2=5">
1266 <span class="label">Absorbed:</span>
1268 <xsl:when test="@ind2=6">
1269 <span class="label">Absorbed in part:</span>
1271 <xsl:when test="@ind2=7">
1272 <span class="label">Separated from:</span>
1275 <xsl:text> </xsl:text>
1277 <xsl:if test="marc:subfield[@code='i']">
1278 <span class="780_rel_info">
1279 <xsl:value-of select="marc:subfield[@code='i']"/>
1280 <xsl:text> </xsl:text>
1284 <xsl:variable name="f780">
1285 <xsl:call-template name="subfieldSelect">
1286 <xsl:with-param name="codes">a_t</xsl:with-param>
1287 </xsl:call-template>
1290 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1291 <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>
1292 <xsl:value-of select="$f780"/>
1296 <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>
1297 <xsl:value-of select="$f780"/>
1303 <xsl:if test="marc:subfield[@code='n']">
1304 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1312 <xsl:if test="marc:datafield[@tag=785]">
1313 <xsl:for-each select="marc:datafield[@tag=785]">
1314 <xsl:if test="@ind1=0">
1315 <span class="results_summary succeeding_entry">
1317 <xsl:when test="@ind2=0">
1318 <span class="label">Continued by:</span>
1320 <xsl:when test="@ind2=1">
1321 <span class="label">Continued in part by:</span>
1323 <xsl:when test="@ind2=2">
1324 <span class="label">Superseded by:</span>
1326 <xsl:when test="@ind2=3">
1327 <span class="label">Superseded in part by:</span>
1329 <xsl:when test="@ind2=4">
1330 <span class="label">Absorbed by:</span>
1332 <xsl:when test="@ind2=5">
1333 <span class="label">Absorbed in part by:</span>
1335 <xsl:when test="@ind2=6">
1336 <span class="label">Split into .. and ...:</span>
1338 <xsl:when test="@ind2=7">
1339 <span class="label">Merged with ... to form ...</span>
1341 <xsl:when test="@ind2=8">
1342 <span class="label">Changed back to:</span>
1345 <xsl:text> </xsl:text>
1347 <xsl:if test="marc:subfield[@code='i']">
1348 <span class="785_rel_info">
1349 <xsl:value-of select="marc:subfield[@code='i']"/>
1350 <xsl:text> </xsl:text>
1354 <xsl:variable name="f785">
1355 <xsl:call-template name="subfieldSelect">
1356 <xsl:with-param name="codes">a_t</xsl:with-param>
1357 </xsl:call-template>
1361 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1362 <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>
1363 <xsl:value-of select="$f785"/>
1367 <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>
1368 <xsl:value-of select="$f785"/>
1378 <!-- 787 Other Relationship Entry -->
1379 <xsl:if test="marc:datafield[@tag=787]">
1380 <span class="results_summary other_relationship_entry"><span class="label">Other related works: </span>
1381 <xsl:for-each select="marc:datafield[@tag=787]">
1382 <span class="other_relationship_entry">
1383 <xsl:variable name="f787">
1384 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1385 <xsl:with-param name="codes">a_t</xsl:with-param>
1386 </xsl:call-template></xsl:with-param></xsl:call-template>
1388 <xsl:if test="marc:subfield[@code='i']">
1389 <xsl:call-template name="subfieldSelect">
1390 <xsl:with-param name="codes">i</xsl:with-param>
1391 </xsl:call-template>
1392 <xsl:text>: </xsl:text>
1395 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1396 <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>
1397 <xsl:value-of select="$f787"/>
1401 <xsl:variable name="relation_query">
1402 <xsl:text>ti,phr:(</xsl:text>
1403 <xsl:call-template name="quote_search_term">
1404 <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param>
1405 </xsl:call-template>
1406 <xsl:text>)</xsl:text>
1407 <xsl:if test="marc:subfield[@code='a']">
1408 <xsl:text> AND au:(</xsl:text>
1409 <xsl:call-template name="quote_search_term">
1410 <xsl:with-param name="term">
1411 <xsl:value-of select="marc:subfield[@code='a']"/>
1413 </xsl:call-template>
1414 <xsl:text>)</xsl:text>
1418 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" />
1420 <xsl:value-of select="$f787"/>
1425 <xsl:when test="position()=last()"></xsl:when>
1426 <xsl:otherwise><span class="separator"><xsl:text>; </xsl:text></span></xsl:otherwise>
1433 <!-- Indicate if record is suppressed in OPAC -->
1435 <xsl:when test="$OpacSuppression = 1 and marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
1436 <span class="results_summary suppressed_opac">
1437 <span class="label">OPAC view: </span>
1442 <xsl:if test="$OPACBaseURL!=''">
1443 <span class="results_summary opac_view"><span class="label">OPAC view: </span>
1444 <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>.
1454 <xsl:template name="nameABCQ">
1455 <xsl:call-template name="chopPunctuation">
1456 <xsl:with-param name="chopString">
1457 <xsl:call-template name="subfieldSelect">
1458 <xsl:with-param name="codes">abcq</xsl:with-param>
1459 </xsl:call-template>
1461 <xsl:with-param name="punctuation">
1462 <xsl:text>:,;/ </xsl:text>
1464 </xsl:call-template>
1467 <xsl:template name="nameABCDN">
1468 <xsl:call-template name="chopPunctuation">
1469 <xsl:with-param name="chopString">
1470 <xsl:call-template name="subfieldSelect">
1471 <xsl:with-param name="codes">abcdn</xsl:with-param>
1472 </xsl:call-template>
1474 <xsl:with-param name="punctuation">
1475 <xsl:text>:,;/ </xsl:text>
1477 </xsl:call-template>
1480 <xsl:template name="nameACDEQ">
1481 <xsl:call-template name="subfieldSelect">
1482 <xsl:with-param name="codes">acdeq</xsl:with-param>
1483 </xsl:call-template>
1486 <xsl:template name="specialSubfieldSelect">
1487 <xsl:param name="anyCodes"/>
1488 <xsl:param name="axis"/>
1489 <xsl:param name="beforeCodes"/>
1490 <xsl:param name="afterCodes"/>
1491 <xsl:variable name="str">
1492 <xsl:for-each select="marc:subfield">
1493 <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])">
1494 <xsl:value-of select="text()"/>
1495 <xsl:text> </xsl:text>
1499 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1502 <xsl:template name="showAuthor">
1503 <xsl:param name="authorfield"/>
1504 <xsl:param name="UseAuthoritiesForTracings"/>
1505 <xsl:if test="count($authorfield)>0">
1507 <xsl:for-each select="$authorfield">
1509 <xsl:when test="position()>1"/>
1511 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1512 <!--#13382 Changed Additional author to contributor -->
1513 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1517 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1518 <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>
1521 <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>
1525 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1527 <xsl:call-template name="chopPunctuation">
1528 <xsl:with-param name="chopString">
1529 <xsl:call-template name="subfieldSelect">
1530 <xsl:with-param name="codes">
1532 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1533 <xsl:when test="@tag=111">aeq</xsl:when>
1534 <xsl:when test="@tag=110">ab</xsl:when>
1535 <xsl:otherwise>abcjq</xsl:otherwise>
1538 </xsl:call-template>
1540 <xsl:with-param name="punctuation">
1541 <xsl:text>:,;/ </xsl:text>
1543 </xsl:call-template>
1544 <!-- Display only name and title portion in 110 field -->
1545 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1546 <span class="titleportion">
1548 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1549 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1551 <xsl:call-template name="chopPunctuation">
1552 <xsl:with-param name="chopString">
1553 <xsl:call-template name="subfieldSelect">
1554 <xsl:with-param name="codes">cdnt</xsl:with-param>
1555 </xsl:call-template>
1557 </xsl:call-template>
1560 <!-- Display only name and title portion in 111 field -->
1561 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1562 <span class="titleportion">
1564 <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>
1565 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1568 <xsl:call-template name="chopPunctuation">
1569 <xsl:with-param name="chopString">
1570 <xsl:call-template name="subfieldSelect">
1571 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1572 </xsl:call-template>
1574 </xsl:call-template>
1577 <!-- Display only dates in 100 field -->
1578 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1579 <span class="authordates">
1580 <xsl:text>, </xsl:text>
1581 <xsl:call-template name="chopPunctuation">
1582 <xsl:with-param name="chopString">
1583 <xsl:call-template name="subfieldSelect">
1584 <xsl:with-param name="codes">d</xsl:with-param>
1585 </xsl:call-template>
1587 </xsl:call-template>
1592 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1593 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1594 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1595 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1596 <xsl:if test="@tag=710 or @tag=711">
1597 <xsl:call-template name="chopPunctuation">
1598 <xsl:with-param name="chopString">
1599 <xsl:call-template name="subfieldSelect">
1600 <xsl:with-param name="codes">
1602 <xsl:when test="@tag=711">aeq</xsl:when>
1603 <xsl:otherwise>ab</xsl:otherwise>
1606 </xsl:call-template>
1608 <xsl:with-param name="punctuation">
1609 <xsl:text>:,;/ </xsl:text>
1611 </xsl:call-template>
1612 <!-- Display only name and title portion in 711 field -->
1613 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1614 <span class="titleportion">
1616 <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>
1617 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1620 <xsl:call-template name="chopPunctuation">
1621 <xsl:with-param name="chopString">
1622 <xsl:call-template name="subfieldSelect">
1623 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1624 </xsl:call-template>
1626 </xsl:call-template>
1629 <!-- Display only name and title portion in 710 field -->
1630 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1631 <span class="titleportion">
1633 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1634 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1636 <xsl:call-template name="chopPunctuation">
1637 <xsl:with-param name="chopString">
1638 <xsl:call-template name="subfieldSelect">
1639 <xsl:with-param name="codes">cdnt</xsl:with-param>
1640 </xsl:call-template>
1642 </xsl:call-template>
1647 <!-- Display only name portion in 700 field -->
1648 <xsl:if test="@tag=700">
1649 <xsl:call-template name="chopPunctuation">
1650 <xsl:with-param name="chopString">
1651 <xsl:call-template name="subfieldSelect">
1652 <xsl:with-param name="codes">abcq</xsl:with-param>
1653 </xsl:call-template>
1655 </xsl:call-template>
1657 <!-- Display class "authordates" in 700 field -->
1658 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1659 <span class="authordates">
1660 <xsl:text>, </xsl:text>
1661 <xsl:call-template name="chopPunctuation">
1662 <xsl:with-param name="chopString">
1663 <xsl:call-template name="subfieldSelect">
1664 <xsl:with-param name="codes">d</xsl:with-param>
1665 </xsl:call-template>
1667 </xsl:call-template>
1670 <!-- Display class "titleportion" in 700 field -->
1671 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1672 <xsl:if test="@tag=700 and $titleportionfields">
1673 <span class="titleportion">
1674 <xsl:text>. </xsl:text>
1675 <xsl:call-template name="chopPunctuation">
1676 <xsl:with-param name="chopString">
1677 <xsl:call-template name="subfieldSelect">
1678 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1679 </xsl:call-template>
1681 </xsl:call-template>
1688 <!-- add relator code too between brackets-->
1689 <!-- #13383 include relator code j for field 111 -->
1690 <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'])">
1691 <span class="relatorcode">
1692 <xsl:text> [</xsl:text>
1694 <xsl:when test="@tag=111 or @tag=711">
1696 <!-- Prefer j over 4 for fields 111 and 711-->
1697 <xsl:when test="marc:subfield[@code='j']">
1698 <xsl:for-each select="marc:subfield[@code='j']">
1699 <xsl:value-of select="."/>
1700 <xsl:if test="position() != last()">, </xsl:if>
1704 <xsl:for-each select="marc:subfield[@code=4]">
1705 <xsl:value-of select="."/>
1706 <xsl:if test="position() != last()">, </xsl:if>
1711 <!-- Prefer e over 4 for fields 111 and 711-->
1712 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1713 <xsl:for-each select="marc:subfield[@code='e']">
1714 <xsl:value-of select="."/>
1715 <xsl:if test="position() != last()">, </xsl:if>
1719 <xsl:for-each select="marc:subfield[@code=4]">
1720 <xsl:value-of select="."/>
1721 <xsl:if test="position() != last()">, </xsl:if>
1725 <xsl:text>]</xsl:text>
1729 <xsl:if test="marc:subfield[@code=9]">
1730 <xsl:text> </xsl:text>
1731 <a class='authlink'>
1732 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
1733 <xsl:element name="i">
1734 <xsl:attribute name="class">fa fa-search</xsl:attribute>
1735 <xsl:attribute name="aria-label">View authority record</xsl:attribute>
1740 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1747 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1748 <xsl:template name="subfieldSelectSubject">
1749 <xsl:param name="codes"/>
1750 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1751 <xsl:param name="subdivCodes"/>
1752 <xsl:param name="subdivDelimiter"/>
1753 <xsl:param name="prefix"/>
1754 <xsl:param name="suffix"/>
1755 <xsl:param name="urlencode"/>
1756 <xsl:variable name="str">
1757 <xsl:for-each select="marc:subfield">
1758 <xsl:if test="contains($codes, @code)">
1759 <xsl:if test="contains($subdivCodes, @code)">
1760 <xsl:value-of select="$subdivDelimiter"/>
1762 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1767 <xsl:when test="$urlencode=1">
1768 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1771 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>