1 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
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:items="http://www.koha-community.org/items"
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 xmlns:str="http://exslt.org/strings"
12 exclude-result-prefixes="marc items str">
13 <xsl:import href="MARC21slimUtils.xsl"/>
14 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
15 <xsl:template match="/">
16 <xsl:apply-templates/>
19 <xsl:template match="marc:record">
21 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
22 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
23 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
24 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
25 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
26 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
27 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
28 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
29 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
30 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
31 <xsl:variable name="OpacSuppression" select="marc:sysprefs/marc:syspref[@name='OpacSuppression']"/>
32 <xsl:variable name="TracingQuotesLeft">
34 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
35 <xsl:otherwise>"</xsl:otherwise>
38 <xsl:variable name="TracingQuotesRight">
40 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
41 <xsl:otherwise>"</xsl:otherwise>
45 <xsl:variable name="leader" select="marc:leader"/>
46 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
47 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
48 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
49 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
50 <xsl:variable name="materialTypeCode">
52 <xsl:when test="$leader19='a'">ST</xsl:when>
53 <xsl:when test="$leader6='a'">
55 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
56 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
57 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
60 <xsl:when test="$leader6='t'">BK</xsl:when>
61 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
62 <xsl:when test="$leader6='m'">CF</xsl:when>
63 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
64 <xsl:when test="$leader6='g'">VM</xsl:when>
65 <xsl:when test="$leader6='k'">PK</xsl:when>
66 <xsl:when test="$leader6='r'">OB</xsl:when>
67 <xsl:when test="$leader6='i'">MU</xsl:when>
68 <xsl:when test="$leader6='j'">MU</xsl:when>
69 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
72 <xsl:variable name="materialTypeLabel">
74 <xsl:when test="$leader19='a'">Set</xsl:when>
75 <xsl:when test="$leader6='a'">
77 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
78 <xsl:when test="$leader7='i' or $leader7='s'">
80 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
81 <xsl:otherwise>Series</xsl:otherwise>
84 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
87 <xsl:when test="$leader6='t'">Book</xsl:when>
88 <xsl:when test="$leader6='o'">Kit</xsl:when>
89 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
90 <xsl:when test="$leader6='m'">Computer file</xsl:when>
91 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
92 <xsl:when test="$leader6='g'">Film</xsl:when>
93 <xsl:when test="$leader6='k'">Picture</xsl:when>
94 <xsl:when test="$leader6='r'">Object</xsl:when>
95 <xsl:when test="$leader6='j'">Music</xsl:when>
96 <xsl:when test="$leader6='i'">Sound</xsl:when>
97 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
101 <!-- Indicate if record is suppressed in OPAC -->
102 <xsl:if test="$OpacSuppression = 1">
103 <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
104 <span class="results_summary suppressed_opac">Suppressed in OPAC</span>
108 <!-- Title Statement -->
109 <!-- Alternate Graphic Representation (MARC 880) -->
110 <xsl:if test="$display880">
112 <xsl:call-template name="m880Select">
113 <xsl:with-param name="basetags">245</xsl:with-param>
114 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
120 <xsl:if test="marc:datafield[@tag=245]">
121 <h1 class="title" property="name">
122 <xsl:for-each select="marc:datafield[@tag=245]">
123 <xsl:call-template name="subfieldSelect">
124 <xsl:with-param name="codes">a</xsl:with-param>
126 <xsl:text> </xsl:text>
127 <!-- 13381 add additional subfields-->
128 <!-- bz 17625 adding subfields f and g -->
129 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
131 <xsl:when test="@code='h'">
132 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
133 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
135 <xsl:when test="@code='c'">
136 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
137 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
140 <xsl:apply-templates/>
141 <xsl:text> </xsl:text>
149 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
150 <xsl:if test="$display880">
152 <xsl:call-template name="m880Select">
153 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
154 <xsl:with-param name="codes">abc</xsl:with-param>
155 <xsl:with-param name="index">au</xsl:with-param>
156 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
157 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
162 <!-- Author Statement -->
163 <xsl:call-template name="showAuthor">
164 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
165 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
168 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
169 <xsl:call-template name="showAuthor">
170 <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'])]"/>
171 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
174 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
175 <span class="results_summary type"><span class="label">Material type: </span>
176 <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>
177 <xsl:text> </xsl:text>
178 <xsl:value-of select="$materialTypeLabel"/>
182 <xsl:call-template name="show-lang-041"/>
184 <!--Series: Alternate Graphic Representation (MARC 880) -->
185 <xsl:if test="$display880">
186 <xsl:call-template name="m880Select">
187 <xsl:with-param name="basetags">440,490</xsl:with-param>
188 <xsl:with-param name="codes">av</xsl:with-param>
189 <xsl:with-param name="class">results_summary series</xsl:with-param>
190 <xsl:with-param name="label">Series: </xsl:with-param>
191 <xsl:with-param name="index">se</xsl:with-param>
196 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
197 <span class="results_summary series"><span class="label">Series: </span>
199 <xsl:for-each select="marc:datafield[@tag=440]">
200 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
201 <xsl:call-template name="chopPunctuation">
202 <xsl:with-param name="chopString">
203 <xsl:call-template name="subfieldSelect">
204 <xsl:with-param name="codes">av</xsl:with-param>
209 <xsl:call-template name="part"/>
211 <xsl:when test="position()=last()">
212 <xsl:if test="../marc:datafield[@tag=490][@ind1!=1]">
213 <xsl:text>; </xsl:text>
216 <xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise>
220 <!-- 490 Series not traced, Ind1 = 0 -->
221 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
222 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
223 <xsl:call-template name="chopPunctuation">
224 <xsl:with-param name="chopString">
225 <xsl:call-template name="subfieldSelect">
226 <xsl:with-param name="codes">av</xsl:with-param>
231 <xsl:call-template name="part"/>
232 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
234 <!-- 490 Series traced, Ind1 = 1 -->
235 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
236 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811]">
238 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
239 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
240 <xsl:call-template name="chopPunctuation">
241 <xsl:with-param name="chopString">
242 <xsl:call-template name="subfieldSelect">
243 <xsl:with-param name="codes">a_t</xsl:with-param>
249 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
250 <a><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>
251 <xsl:call-template name="chopPunctuation">
252 <xsl:with-param name="chopString">
253 <xsl:call-template name="subfieldSelect">
254 <xsl:with-param name="codes">a_t</xsl:with-param>
261 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
262 <xsl:call-template name="chopPunctuation">
263 <xsl:with-param name="chopString">
264 <xsl:call-template name="subfieldSelect">
265 <xsl:with-param name="codes">a_t</xsl:with-param>
270 <xsl:call-template name="part"/>
273 <xsl:text>: </xsl:text>
274 <xsl:value-of select="marc:subfield[@code='v']" />
275 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
278 <xsl:for-each select="marc:datafield[@tag=830]">
280 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
281 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
282 <xsl:call-template name="chopPunctuation">
283 <xsl:with-param name="chopString">
284 <xsl:call-template name="subfieldSelect">
285 <xsl:with-param name="codes">a_t</xsl:with-param>
291 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
292 <a><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>
293 <xsl:call-template name="chopPunctuation">
294 <xsl:with-param name="chopString">
295 <xsl:call-template name="subfieldSelect">
296 <xsl:with-param name="codes">a_t</xsl:with-param>
303 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
304 <xsl:call-template name="chopPunctuation">
305 <xsl:with-param name="chopString">
306 <xsl:call-template name="subfieldSelect">
307 <xsl:with-param name="codes">a_t</xsl:with-param>
312 <xsl:call-template name="part"/>
315 <xsl:text>: </xsl:text>
316 <xsl:value-of select="marc:subfield[@code='v']" />
317 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
325 <xsl:if test="$leader7='s'">
326 <span class="results_summary analytics"><span class="label">Analytics: </span>
329 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
330 <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>
333 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
336 <xsl:text>Show analytics</xsl:text>
341 <!-- Volumes of sets and traced series -->
342 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
343 <span class="results_summary volumes"><span class="label">Volumes: </span>
346 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
347 <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>
350 <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>
353 <xsl:text>Show volumes</xsl:text>
359 <xsl:if test="$leader19='c'">
360 <span class="results_summary set"><span class="label">Set: </span>
361 <xsl:for-each select="marc:datafield[@tag=773]">
364 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
365 <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>
368 <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>
371 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
374 <xsl:when test="position()=last()"></xsl:when>
375 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
381 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
382 <xsl:if test="$display880">
383 <xsl:call-template name="m880Select">
384 <xsl:with-param name="basetags">260</xsl:with-param>
385 <xsl:with-param name="codes">abcg</xsl:with-param>
386 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
387 <xsl:with-param name="label">Publisher: </xsl:with-param>
391 <!-- Publisher info and RDA related info from tags 260, 264 -->
393 <xsl:when test="marc:datafield[@tag=264]">
394 <xsl:call-template name="showRDAtag264">
395 <xsl:with-param name="show_url">1</xsl:with-param>
398 <xsl:when test="marc:datafield[@tag=260]">
399 <span class="results_summary publisher"><span class="label">Publisher: </span>
400 <xsl:for-each select="marc:datafield[@tag=260]">
401 <xsl:if test="marc:subfield[@code='a']">
402 <xsl:call-template name="subfieldSelect">
403 <xsl:with-param name="codes">a</xsl:with-param>
406 <xsl:text> </xsl:text>
407 <xsl:if test="marc:subfield[@code='b']">
409 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/>"</xsl:attribute>
410 <xsl:call-template name="subfieldSelect">
411 <xsl:with-param name="codes">b</xsl:with-param>
415 <xsl:text> </xsl:text>
416 <xsl:call-template name="chopPunctuation">
417 <xsl:with-param name="chopString">
418 <xsl:call-template name="subfieldSelect">
419 <xsl:with-param name="codes">cg</xsl:with-param>
423 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
429 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
430 <xsl:if test="$display880">
431 <xsl:call-template name="m880Select">
432 <xsl:with-param name="basetags">250</xsl:with-param>
433 <xsl:with-param name="codes">ab</xsl:with-param>
434 <xsl:with-param name="class">results_summary edition</xsl:with-param>
435 <xsl:with-param name="label">Edition: </xsl:with-param>
439 <xsl:if test="marc:datafield[@tag=250]">
440 <span class="results_summary edition"><span class="label">Edition: </span>
441 <xsl:for-each select="marc:datafield[@tag=250]">
442 <xsl:call-template name="chopPunctuation">
443 <xsl:with-param name="chopString">
444 <xsl:call-template name="subfieldSelect">
445 <xsl:with-param name="codes">ab</xsl:with-param>
449 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
454 <!-- Description: Alternate Graphic Representation (MARC 880) -->
455 <xsl:if test="$display880">
456 <xsl:call-template name="m880Select">
457 <xsl:with-param name="basetags">300</xsl:with-param>
458 <xsl:with-param name="codes">abceg</xsl:with-param>
459 <xsl:with-param name="class">results_summary description</xsl:with-param>
460 <xsl:with-param name="label">Description: </xsl:with-param>
464 <xsl:if test="marc:datafield[@tag=300]">
465 <span class="results_summary description"><span class="label">Description: </span>
466 <xsl:for-each select="marc:datafield[@tag=300]">
467 <xsl:call-template name="chopPunctuation">
468 <xsl:with-param name="chopString">
469 <xsl:call-template name="subfieldSelect">
470 <xsl:with-param name="codes">abcefg</xsl:with-param>
474 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
479 <!-- Content Type -->
480 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
481 <span class="results_summary" id="content_type">
482 <xsl:if test="marc:datafield[@tag=336]">
483 <span class="label">Content type: </span>
484 <xsl:for-each select="marc:datafield[@tag=336]">
485 <xsl:call-template name="subfieldSelect">
486 <xsl:with-param name="codes">a</xsl:with-param>
487 <xsl:with-param name="delimeter">, </xsl:with-param>
489 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
492 <xsl:text> </xsl:text>
494 <xsl:if test="marc:datafield[@tag=337]">
495 <span class="label">Media type: </span>
496 <xsl:for-each select="marc:datafield[@tag=337]">
497 <xsl:call-template name="subfieldSelect">
498 <xsl:with-param name="codes">a</xsl:with-param>
499 <xsl:with-param name="delimeter">, </xsl:with-param>
501 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
504 <xsl:text> </xsl:text>
506 <xsl:if test="marc:datafield[@tag=338]">
507 <span class="label">Carrier type: </span>
508 <xsl:for-each select="marc:datafield[@tag=338]">
509 <xsl:call-template name="subfieldSelect">
510 <xsl:with-param name="codes">a</xsl:with-param>
511 <xsl:with-param name="delimeter">, </xsl:with-param>
513 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
520 <xsl:call-template name="showISBNISSN"/>
522 <xsl:if test="marc:datafield[@tag=013]">
523 <span class="results_summary patent_info">
524 <span class="label">Patent information: </span>
525 <xsl:for-each select="marc:datafield[@tag=013]">
526 <xsl:call-template name="subfieldSelect">
527 <xsl:with-param name="codes">acdef</xsl:with-param>
528 <xsl:with-param name="delimeter">, </xsl:with-param>
530 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
535 <xsl:if test="marc:datafield[@tag=088]">
536 <span class="results_summary report_number">
537 <span class="label">Report number: </span>
538 <xsl:for-each select="marc:datafield[@tag=088]">
539 <xsl:call-template name="subfieldSelect">
540 <xsl:with-param name="codes">a</xsl:with-param>
542 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
547 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
548 <xsl:if test="$display880">
549 <xsl:call-template name="m880Select">
550 <xsl:with-param name="basetags">246</xsl:with-param>
551 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
552 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
553 <xsl:with-param name="label">Other title: </xsl:with-param>
557 <xsl:if test="marc:datafield[@tag=246]">
558 <span class="results_summary other_title"><span class="label">Other title: </span>
559 <xsl:for-each select="marc:datafield[@tag=246]">
560 <xsl:call-template name="chopPunctuation">
561 <xsl:with-param name="chopString">
562 <xsl:call-template name="subfieldSelect">
563 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
567 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
569 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
570 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
571 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
572 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
573 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
574 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
575 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
576 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
577 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
580 <xsl:if test="marc:subfield[@code='i']">
581 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
583 <!-- #13386 added separator | -->
584 <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>
589 <xsl:if test="marc:datafield[@tag=242]">
590 <span class="results_summary translated_title"><span class="label">Title translated: </span>
591 <xsl:for-each select="marc:datafield[@tag=242]">
592 <xsl:call-template name="chopPunctuation">
593 <xsl:with-param name="chopString">
594 <xsl:call-template name="subfieldSelect">
595 <xsl:with-param name="codes">abchnp</xsl:with-param>
599 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
604 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
605 <xsl:if test="$display880">
606 <xsl:call-template name="m880Select">
607 <xsl:with-param name="basetags">130,240</xsl:with-param>
608 <xsl:with-param name="codes">adfklmor</xsl:with-param>
609 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
610 <xsl:with-param name="label">Uniform title: </xsl:with-param>
614 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
615 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
616 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
617 <xsl:for-each select="marc:subfield">
618 <xsl:if test="contains('adfghklmnoprst',@code)">
619 <xsl:value-of select="text()"/>
620 <xsl:text> </xsl:text>
623 <xsl:if test="position() != last()">
624 <span class="separator"><xsl:text> | </xsl:text></span>
630 <!-- #13382 Added Related works 700$i -->
631 <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']]">
632 <span class="results_summary related_works"><span class="label">Related works: </span>
633 <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']]">
634 <xsl:variable name="str">
635 <xsl:call-template name="subfieldSelect">
636 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
639 <xsl:call-template name="chopPunctuation">
640 <xsl:with-param name="chopString">
641 <xsl:value-of select="$str"/>
644 <!-- add relator code too between brackets-->
645 <xsl:if test="marc:subfield[@code='4' or @code='e']">
646 <span class="relatorcode">
647 <xsl:text> [</xsl:text>
649 <xsl:when test="marc:subfield[@code='e']">
650 <xsl:for-each select="marc:subfield[@code='e']">
651 <xsl:value-of select="."/>
652 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
656 <xsl:for-each select="marc:subfield[@code='4']">
657 <xsl:value-of select="."/>
658 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
662 <xsl:text>]</xsl:text>
666 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
672 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
673 <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'])]">
674 <span class="results_summary contained_works"><span class="label">Contained works: </span>
675 <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'])]">
676 <xsl:variable name="str">
677 <xsl:call-template name="subfieldSelect">
678 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
681 <xsl:call-template name="chopPunctuation">
682 <xsl:with-param name="chopString">
683 <xsl:value-of select="$str"/>
686 <!-- add relator code too between brackets-->
687 <xsl:if test="marc:subfield[@code='4' or @code='e']">
688 <span class="relatorcode">
689 <xsl:text> [</xsl:text>
691 <xsl:when test="marc:subfield[@code='e']">
692 <xsl:for-each select="marc:subfield[@code='e']">
693 <xsl:value-of select="."/>
694 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
698 <xsl:for-each select="marc:subfield[@code='4']">
699 <xsl:value-of select="."/>
700 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
704 <xsl:text>]</xsl:text>
708 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
715 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
716 <span class="results_summary subjects"><span class="label">Subject(s): </span>
717 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
720 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
721 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
722 <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>
724 <xsl:when test="$TraceSubjectSubdivisions='1'">
725 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
726 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
727 <xsl:with-param name="delimeter"> AND </xsl:with-param>
728 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
729 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
730 <xsl:with-param name="urlencode">1</xsl:with-param>
735 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
737 <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>
741 <xsl:call-template name="chopPunctuation">
742 <xsl:with-param name="chopString">
743 <xsl:call-template name="subfieldSelect">
744 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
745 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
746 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
752 <xsl:if test="marc:subfield[@code=9]">
753 <xsl:text> </xsl:text>
755 <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>
756 <xsl:element name="img">
757 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
758 <xsl:attribute name="alt"></xsl:attribute>
759 <xsl:attribute name="height">15</xsl:attribute>
760 <xsl:attribute name="width">15</xsl:attribute>
766 <xsl:when test="position()=last()"></xsl:when>
767 <xsl:otherwise> | </xsl:otherwise>
775 <xsl:if test="marc:datafield[@tag=655]">
776 <span class="results_summary genre"><span class="label">Genre/Form: </span>
777 <xsl:for-each select="marc:datafield[@tag=655]">
780 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
781 <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>
783 <xsl:when test="$TraceSubjectSubdivisions='1'">
784 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
785 <xsl:with-param name="codes">avxyz</xsl:with-param>
786 <xsl:with-param name="delimeter"> AND </xsl:with-param>
787 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
788 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
789 <xsl:with-param name="urlencode">1</xsl:with-param>
794 <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="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
797 <xsl:call-template name="subfieldSelect">
798 <xsl:with-param name="codes">avxyz</xsl:with-param>
799 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
800 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
804 <xsl:if test="marc:subfield[@code=9]">
805 <xsl:text> </xsl:text>
807 <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>
808 <xsl:element name="img">
809 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
810 <xsl:attribute name="alt"></xsl:attribute>
811 <xsl:attribute name="height">15</xsl:attribute>
812 <xsl:attribute name="width">15</xsl:attribute>
816 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
821 <!-- MARC21 776 Additional Physical Form Entry -->
822 <xsl:if test="marc:datafield[@tag=776]">
823 <span class="results_summary add_physical_form">
824 <span class="label">Additional physical formats: </span>
825 <xsl:for-each select="marc:datafield[@tag=776]">
826 <xsl:variable name="linktext">
828 <xsl:when test="marc:subfield[@code='t']">
829 <xsl:value-of select="marc:subfield[@code='t']"/>
831 <xsl:when test="marc:subfield[@code='a']">
832 <xsl:value-of select="marc:subfield[@code='a']"/>
835 <xsl:text>No title</xsl:text>
839 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
840 <xsl:call-template name="subfieldSelect">
841 <xsl:with-param name="codes">i</xsl:with-param>
843 <xsl:text>: </xsl:text>
846 <xsl:when test="marc:subfield[@code='w']">
848 <xsl:attribute name="href">
849 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
850 <xsl:call-template name="extractControlNumber">
851 <xsl:with-param name="subfieldW">
852 <xsl:value-of select="marc:subfield[@code='w']"/>
856 <xsl:value-of select="$linktext"/>
860 <xsl:value-of select="$linktext"/>
863 <xsl:if test="position() != last()">
864 <xsl:text>; </xsl:text>
870 <!-- DDC classification -->
871 <xsl:if test="marc:datafield[@tag=082]">
872 <span class="results_summary ddc">
873 <span class="label">DDC classification: </span>
874 <xsl:for-each select="marc:datafield[@tag=082]">
875 <xsl:call-template name="subfieldSelect">
876 <xsl:with-param name="codes">a</xsl:with-param>
877 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
880 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
881 <xsl:otherwise> | </xsl:otherwise>
887 <!-- LOC classification -->
888 <xsl:if test="marc:datafield[@tag=050]">
889 <span class="results_summary loc">
890 <span class="label">LOC classification: </span>
891 <xsl:for-each select="marc:datafield[@tag=050]">
892 <xsl:call-template name="subfieldSelect">
893 <xsl:with-param name="codes">ab</xsl:with-param>
894 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
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:if test="not(contains(marc:subfield[@code='u'],'://'))">
925 <xsl:when test="@ind1=7">
926 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
928 <xsl:when test="@ind1=1">
929 <xsl:text>ftp://</xsl:text>
932 <xsl:text>http://</xsl:text>
936 <xsl:value-of select="marc:subfield[@code='u']"/>
939 <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')">
940 <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>
942 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
943 <xsl:call-template name="subfieldSelect">
944 <xsl:with-param name="codes">y3z</xsl:with-param>
947 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
949 <xsl:when test="$URLLinkText!=''">
950 <xsl:value-of select="$URLLinkText"/>
953 <xsl:text>Click here to access online</xsl:text>
960 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
961 <xsl:otherwise> | </xsl:otherwise>
968 <xsl:if test="marc:datafield[@tag=505]">
969 <div class="results_summary contents">
971 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
972 <span class="label">Contents:</span>
974 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
975 <span class="label">Incomplete contents:</span>
977 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
978 <span class="label">Partial contents:</span>
981 <xsl:for-each select="marc:datafield[@tag=505]">
982 <div class='contentblock'>
984 <xsl:when test="@ind2=0">
985 <xsl:call-template name="subfieldSelectSpan">
986 <xsl:with-param name="codes">tru</xsl:with-param>
990 <xsl:call-template name="subfieldSelectSpan">
991 <xsl:with-param name="codes">atru</xsl:with-param>
1001 <xsl:if test="marc:datafield[@tag=586]">
1002 <span class="results_summary awardsnote">
1003 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1004 <span class="label">Awards: </span>
1006 <xsl:for-each select="marc:datafield[@tag=586]">
1007 <xsl:value-of select="marc:subfield[@code='a']"/>
1008 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1014 <xsl:if test="marc:datafield[@tag=583]">
1015 <xsl:for-each select="marc:datafield[@tag=583]">
1016 <xsl:if test="@ind1=1 or @ind1=' '">
1017 <span class="results_summary actionnote">
1018 <span class="label">Action note: </span>
1020 <xsl:when test="marc:subfield[@code='z']">
1021 <xsl:value-of select="marc:subfield[@code='z']"/>
1024 <xsl:call-template name="subfieldSelect">
1025 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1026 </xsl:call-template>
1035 <xsl:if test="marc:datafield[@tag=508]">
1036 <div class="results_summary prod_credits">
1037 <span class="label">Production credits: </span>
1038 <xsl:for-each select="marc:datafield[@tag=508]">
1039 <xsl:call-template name="subfieldSelectSpan">
1040 <xsl:with-param name="codes">a</xsl:with-param>
1041 </xsl:call-template>
1042 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1048 <xsl:if test="marc:datafield[@tag=773]">
1049 <xsl:for-each select="marc:datafield[@tag=773]">
1050 <xsl:if test="@ind1 !=1">
1051 <span class="results_summary in"><span class="label">
1053 <xsl:when test="@ind2=' '">
1056 <xsl:when test="@ind2=8">
1057 <xsl:if test="marc:subfield[@code='i']">
1058 <xsl:value-of select="marc:subfield[@code='i']"/>
1063 <xsl:variable name="f773">
1064 <xsl:call-template name="chopPunctuation">
1065 <xsl:with-param name="chopString">
1066 <xsl:call-template name="subfieldSelect">
1067 <xsl:with-param name="codes">a_t</xsl:with-param>
1068 </xsl:call-template>
1070 </xsl:call-template>
1073 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1074 <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>
1075 <xsl:value-of select="translate($f773, '()', '')"/>
1078 <xsl:when test="marc:subfield[@code='0']">
1079 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:subfield[@code='0'], true())"/></xsl:attribute>
1080 <xsl:value-of select="$f773"/>
1084 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
1085 <xsl:value-of select="$f773"/>
1089 <xsl:if test="marc:subfield[@code='g']">
1090 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1094 <xsl:if test="marc:subfield[@code='n']">
1095 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1102 <xsl:if test="marc:datafield[@tag=502]">
1103 <span class="results_summary diss_note">
1104 <span class="label">Dissertation note: </span>
1105 <xsl:for-each select="marc:datafield[@tag=502]">
1106 <xsl:call-template name="subfieldSelect">
1107 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1108 </xsl:call-template>
1110 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1114 <!-- 866 textual holdings -->
1115 <xsl:if test="marc:datafield[@tag=866]">
1116 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1117 <xsl:for-each select="marc:datafield[@tag=866]">
1118 <span class="holdings_note_data">
1119 <xsl:call-template name="subfieldSelect">
1120 <xsl:with-param name="codes">axz</xsl:with-param>
1121 </xsl:call-template>
1122 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1128 <!-- 867 textual holdings -->
1129 <xsl:if test="marc:datafield[@tag=867]">
1130 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1131 <xsl:for-each select="marc:datafield[@tag=867]">
1132 <span class="holdings_note_data">
1133 <xsl:call-template name="subfieldSelect">
1134 <xsl:with-param name="codes">axz</xsl:with-param>
1135 </xsl:call-template>
1136 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1142 <!-- 868 textual holdings -->
1143 <xsl:if test="marc:datafield[@tag=868]">
1144 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1145 <xsl:for-each select="marc:datafield[@tag=868]">
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><br /></xsl:otherwise></xsl:choose>
1157 <!-- 775 Other Edition -->
1158 <xsl:if test="marc:datafield[@tag=775]">
1159 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1160 <xsl:for-each select="marc:datafield[@tag=775]">
1161 <xsl:variable name="f775">
1162 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1163 <xsl:with-param name="codes">a_t</xsl:with-param>
1164 </xsl:call-template></xsl:with-param></xsl:call-template>
1166 <xsl:if test="marc:subfield[@code='i']">
1167 <xsl:call-template name="subfieldSelect">
1168 <xsl:with-param name="codes">i</xsl:with-param>
1169 </xsl:call-template>
1170 <xsl:text>: </xsl:text>
1174 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1175 <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>
1178 <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>
1181 <xsl:call-template name="subfieldSelect">
1182 <xsl:with-param name="codes">a_t</xsl:with-param>
1183 </xsl:call-template>
1186 <xsl:when test="position()=last()"></xsl:when>
1187 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1194 <xsl:if test="marc:datafield[@tag=780]">
1195 <xsl:for-each select="marc:datafield[@tag=780]">
1196 <xsl:if test="@ind1=0">
1197 <span class="results_summary preceeding_entry">
1199 <xsl:when test="@ind2=0">
1200 <span class="label">Continues:</span>
1202 <xsl:when test="@ind2=1">
1203 <span class="label">Continues in part:</span>
1205 <xsl:when test="@ind2=2">
1206 <span class="label">Supersedes:</span>
1208 <xsl:when test="@ind2=3">
1209 <span class="label">Supersedes in part:</span>
1211 <xsl:when test="@ind2=4">
1212 <span class="label">Formed by the union: ... and: ...</span>
1214 <xsl:when test="@ind2=5">
1215 <span class="label">Absorbed:</span>
1217 <xsl:when test="@ind2=6">
1218 <span class="label">Absorbed in part:</span>
1220 <xsl:when test="@ind2=7">
1221 <span class="label">Separated from:</span>
1224 <xsl:text> </xsl:text>
1225 <xsl:variable name="f780">
1226 <xsl:call-template name="subfieldSelect">
1227 <xsl:with-param name="codes">a_t</xsl:with-param>
1228 </xsl:call-template>
1231 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1232 <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>
1233 <xsl:value-of select="translate($f780, '()', '')"/>
1237 <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>
1238 <xsl:value-of select="translate($f780, '()', '')"/>
1244 <xsl:if test="marc:subfield[@code='n']">
1245 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1253 <xsl:if test="marc:datafield[@tag=785]">
1254 <xsl:for-each select="marc:datafield[@tag=785]">
1255 <span class="results_summary succeeding_entry">
1257 <xsl:when test="@ind2=0">
1258 <span class="label">Continued by:</span>
1260 <xsl:when test="@ind2=1">
1261 <span class="label">Continued in part by:</span>
1263 <xsl:when test="@ind2=2">
1264 <span class="label">Superseded by:</span>
1266 <xsl:when test="@ind2=3">
1267 <span class="label">Superseded in part by:</span>
1269 <xsl:when test="@ind2=4">
1270 <span class="label">Absorbed by:</span>
1272 <xsl:when test="@ind2=5">
1273 <span class="label">Absorbed in part by:</span>
1275 <xsl:when test="@ind2=6">
1276 <span class="label">Split into .. and ...:</span>
1278 <xsl:when test="@ind2=7">
1279 <span class="label">Merged with ... to form ...</span>
1281 <xsl:when test="@ind2=8">
1282 <span class="label">Changed back to:</span>
1285 <xsl:text> </xsl:text>
1286 <xsl:variable name="f785">
1287 <xsl:call-template name="subfieldSelect">
1288 <xsl:with-param name="codes">a_t</xsl:with-param>
1289 </xsl:call-template>
1293 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1294 <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>
1295 <xsl:value-of select="translate($f785, '()', '')"/>
1299 <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>
1300 <xsl:value-of select="translate($f785, '()', '')"/>
1309 <xsl:if test="$OPACBaseURL!=''">
1310 <span class="results_summary succeeding_entry_note"><span class="label">OPAC view: </span>
1311 <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>.
1317 <xsl:template name="nameABCQ">
1318 <xsl:call-template name="chopPunctuation">
1319 <xsl:with-param name="chopString">
1320 <xsl:call-template name="subfieldSelect">
1321 <xsl:with-param name="codes">abcq</xsl:with-param>
1322 </xsl:call-template>
1324 <xsl:with-param name="punctuation">
1325 <xsl:text>:,;/ </xsl:text>
1327 </xsl:call-template>
1330 <xsl:template name="nameABCDN">
1331 <xsl:call-template name="chopPunctuation">
1332 <xsl:with-param name="chopString">
1333 <xsl:call-template name="subfieldSelect">
1334 <xsl:with-param name="codes">abcdn</xsl:with-param>
1335 </xsl:call-template>
1337 <xsl:with-param name="punctuation">
1338 <xsl:text>:,;/ </xsl:text>
1340 </xsl:call-template>
1343 <xsl:template name="nameACDEQ">
1344 <xsl:call-template name="subfieldSelect">
1345 <xsl:with-param name="codes">acdeq</xsl:with-param>
1346 </xsl:call-template>
1349 <xsl:template name="part">
1350 <xsl:variable name="partNumber">
1351 <xsl:call-template name="specialSubfieldSelect">
1352 <xsl:with-param name="axis">n</xsl:with-param>
1353 <xsl:with-param name="anyCodes">n</xsl:with-param>
1354 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1355 </xsl:call-template>
1357 <xsl:variable name="partName">
1358 <xsl:call-template name="specialSubfieldSelect">
1359 <xsl:with-param name="axis">p</xsl:with-param>
1360 <xsl:with-param name="anyCodes">p</xsl:with-param>
1361 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1362 </xsl:call-template>
1364 <xsl:if test="string-length(normalize-space($partNumber))">
1365 <xsl:call-template name="chopPunctuation">
1366 <xsl:with-param name="chopString" select="$partNumber"/>
1367 </xsl:call-template>
1369 <xsl:if test="string-length(normalize-space($partName))">
1370 <xsl:call-template name="chopPunctuation">
1371 <xsl:with-param name="chopString" select="$partName"/>
1372 </xsl:call-template>
1376 <xsl:template name="specialSubfieldSelect">
1377 <xsl:param name="anyCodes"/>
1378 <xsl:param name="axis"/>
1379 <xsl:param name="beforeCodes"/>
1380 <xsl:param name="afterCodes"/>
1381 <xsl:variable name="str">
1382 <xsl:for-each select="marc:subfield">
1383 <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])">
1384 <xsl:value-of select="text()"/>
1385 <xsl:text> </xsl:text>
1389 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1392 <xsl:template name="showAuthor">
1393 <xsl:param name="authorfield"/>
1394 <xsl:param name="UseAuthoritiesForTracings"/>
1395 <xsl:if test="count($authorfield)>0">
1397 <xsl:for-each select="$authorfield">
1399 <xsl:when test="position()>1"/>
1401 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1402 <!--#13382 Changed Additional author to contributor -->
1403 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1407 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1408 <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>
1411 <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>
1415 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1417 <xsl:call-template name="chopPunctuation">
1418 <xsl:with-param name="chopString">
1419 <xsl:call-template name="subfieldSelect">
1420 <xsl:with-param name="codes">
1422 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1423 <xsl:when test="@tag=111">aeq</xsl:when>
1424 <xsl:when test="@tag=110">ab</xsl:when>
1425 <xsl:otherwise>abcjq</xsl:otherwise>
1428 </xsl:call-template>
1430 <xsl:with-param name="punctuation">
1431 <xsl:text>:,;/ </xsl:text>
1433 </xsl:call-template>
1434 <!-- Display only name and title portion in 110 field -->
1435 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1436 <span class="titleportion">
1438 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1439 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1441 <xsl:call-template name="chopPunctuation">
1442 <xsl:with-param name="chopString">
1443 <xsl:call-template name="subfieldSelect">
1444 <xsl:with-param name="codes">cdnt</xsl:with-param>
1445 </xsl:call-template>
1447 </xsl:call-template>
1450 <!-- Display only name and title portion in 111 field -->
1451 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1452 <span class="titleportion">
1454 <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>
1455 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1458 <xsl:call-template name="chopPunctuation">
1459 <xsl:with-param name="chopString">
1460 <xsl:call-template name="subfieldSelect">
1461 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1462 </xsl:call-template>
1464 </xsl:call-template>
1467 <!-- Display only dates in 100 field -->
1468 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1469 <span class="authordates">
1470 <xsl:text>, </xsl:text>
1471 <xsl:call-template name="chopPunctuation">
1472 <xsl:with-param name="chopString">
1473 <xsl:call-template name="subfieldSelect">
1474 <xsl:with-param name="codes">d</xsl:with-param>
1475 </xsl:call-template>
1477 </xsl:call-template>
1482 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1483 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1484 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1485 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1486 <xsl:if test="@tag=710 or @tag=711">
1487 <xsl:call-template name="chopPunctuation">
1488 <xsl:with-param name="chopString">
1489 <xsl:call-template name="subfieldSelect">
1490 <xsl:with-param name="codes">
1492 <xsl:when test="@tag=711">aeq</xsl:when>
1493 <xsl:otherwise>ab</xsl:otherwise>
1496 </xsl:call-template>
1498 <xsl:with-param name="punctuation">
1499 <xsl:text>:,;/ </xsl:text>
1501 </xsl:call-template>
1502 <!-- Display only name and title portion in 711 field -->
1503 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1504 <span class="titleportion">
1506 <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>
1507 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1510 <xsl:call-template name="chopPunctuation">
1511 <xsl:with-param name="chopString">
1512 <xsl:call-template name="subfieldSelect">
1513 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1514 </xsl:call-template>
1516 </xsl:call-template>
1519 <!-- Display only name and title portion in 710 field -->
1520 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1521 <span class="titleportion">
1523 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1524 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1526 <xsl:call-template name="chopPunctuation">
1527 <xsl:with-param name="chopString">
1528 <xsl:call-template name="subfieldSelect">
1529 <xsl:with-param name="codes">cdnt</xsl:with-param>
1530 </xsl:call-template>
1532 </xsl:call-template>
1537 <!-- Display only name portion in 700 field -->
1538 <xsl:if test="@tag=700">
1539 <xsl:call-template name="chopPunctuation">
1540 <xsl:with-param name="chopString">
1541 <xsl:call-template name="subfieldSelect">
1542 <xsl:with-param name="codes">abcq</xsl:with-param>
1543 </xsl:call-template>
1545 </xsl:call-template>
1547 <!-- Display class "authordates" in 700 field -->
1548 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1549 <span class="authordates">
1550 <xsl:text>, </xsl:text>
1551 <xsl:call-template name="chopPunctuation">
1552 <xsl:with-param name="chopString">
1553 <xsl:call-template name="subfieldSelect">
1554 <xsl:with-param name="codes">d</xsl:with-param>
1555 </xsl:call-template>
1557 </xsl:call-template>
1560 <!-- Display class "titleportion" in 700 field -->
1561 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1562 <xsl:if test="@tag=700 and $titleportionfields">
1563 <span class="titleportion">
1564 <xsl:text>. </xsl:text>
1565 <xsl:call-template name="chopPunctuation">
1566 <xsl:with-param name="chopString">
1567 <xsl:call-template name="subfieldSelect">
1568 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1569 </xsl:call-template>
1571 </xsl:call-template>
1578 <!-- add relator code too between brackets-->
1579 <!-- #13383 include relator code j for field 111 -->
1580 <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'])">
1581 <span class="relatorcode">
1582 <xsl:text> [</xsl:text>
1584 <xsl:when test="@tag=111 or @tag=711">
1586 <!-- Prefer j over 4 for fields 111 and 711-->
1587 <xsl:when test="marc:subfield[@code='j']">
1588 <xsl:for-each select="marc:subfield[@code='j']">
1589 <xsl:value-of select="."/>
1590 <xsl:if test="position() != last()">, </xsl:if>
1594 <xsl:for-each select="marc:subfield[@code=4]">
1595 <xsl:value-of select="."/>
1596 <xsl:if test="position() != last()">, </xsl:if>
1601 <!-- Prefer e over 4 for fields 111 and 711-->
1602 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1603 <xsl:for-each select="marc:subfield[@code='e']">
1604 <xsl:value-of select="."/>
1605 <xsl:if test="position() != last()">, </xsl:if>
1609 <xsl:for-each select="marc:subfield[@code=4]">
1610 <xsl:value-of select="."/>
1611 <xsl:if test="position() != last()">, </xsl:if>
1615 <xsl:text>]</xsl:text>
1620 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1628 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1629 <xsl:template name="subfieldSelectSubject">
1630 <xsl:param name="codes"/>
1631 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1632 <xsl:param name="subdivCodes"/>
1633 <xsl:param name="subdivDelimiter"/>
1634 <xsl:param name="prefix"/>
1635 <xsl:param name="suffix"/>
1636 <xsl:param name="urlencode"/>
1637 <xsl:variable name="str">
1638 <xsl:for-each select="marc:subfield">
1639 <xsl:if test="contains($codes, @code)">
1640 <xsl:if test="contains($subdivCodes, @code)">
1641 <xsl:value-of select="$subdivDelimiter"/>
1643 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1648 <xsl:when test="$urlencode=1">
1649 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1652 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>