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' or $leader6='k' or $leader6='r'">VM</xsl:when>
65 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
66 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
69 <xsl:variable name="materialTypeLabel">
71 <xsl:when test="$leader19='a'">Set</xsl:when>
72 <xsl:when test="$leader6='a'">
74 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
75 <xsl:when test="$leader7='i' or $leader7='s'">
77 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
78 <xsl:otherwise>Series</xsl:otherwise>
81 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
84 <xsl:when test="$leader6='t'">Book</xsl:when>
85 <xsl:when test="$leader6='o'">Kit</xsl:when>
86 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
87 <xsl:when test="$leader6='m'">Computer file</xsl:when>
88 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
89 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
90 <xsl:when test="$leader6='j'">Music</xsl:when>
91 <xsl:when test="$leader6='i'">Sound</xsl:when>
92 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
96 <!-- Indicate if record is suppressed in OPAC -->
97 <xsl:if test="$OpacSuppression = 1">
98 <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
99 <span class="results_summary suppressed_opac">Suppressed in OPAC</span>
103 <!-- Title Statement -->
104 <!-- Alternate Graphic Representation (MARC 880) -->
105 <xsl:if test="$display880">
107 <xsl:call-template name="m880Select">
108 <xsl:with-param name="basetags">245</xsl:with-param>
109 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
115 <xsl:if test="marc:datafield[@tag=245]">
116 <h1 class="title" property="name">
117 <xsl:for-each select="marc:datafield[@tag=245]">
118 <xsl:call-template name="subfieldSelect">
119 <xsl:with-param name="codes">a</xsl:with-param>
121 <xsl:text> </xsl:text>
122 <!-- 13381 add additional subfields-->
123 <!-- bz 17625 adding subfields f and g -->
124 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
126 <xsl:when test="@code='h'">
127 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
128 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
130 <xsl:when test="@code='c'">
131 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
132 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
135 <xsl:apply-templates/>
136 <xsl:text> </xsl:text>
144 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
145 <xsl:if test="$display880">
147 <xsl:call-template name="m880Select">
148 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
149 <xsl:with-param name="codes">abc</xsl:with-param>
150 <xsl:with-param name="index">au</xsl:with-param>
151 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
152 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
157 <!-- Author Statement -->
158 <xsl:call-template name="showAuthor">
159 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
160 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
163 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
164 <xsl:call-template name="showAuthor">
165 <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'])]"/>
166 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
169 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
170 <span class="results_summary type"><span class="label">Material type: </span>
171 <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>
172 <xsl:text> </xsl:text>
173 <xsl:value-of select="$materialTypeLabel"/>
177 <xsl:call-template name="show-lang-041"/>
179 <!--Series: Alternate Graphic Representation (MARC 880) -->
180 <xsl:if test="$display880">
181 <xsl:call-template name="m880Select">
182 <xsl:with-param name="basetags">440,490</xsl:with-param>
183 <xsl:with-param name="codes">av</xsl:with-param>
184 <xsl:with-param name="class">results_summary series</xsl:with-param>
185 <xsl:with-param name="label">Series: </xsl:with-param>
186 <xsl:with-param name="index">se</xsl:with-param>
191 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
192 <span class="results_summary series"><span class="label">Series: </span>
194 <xsl:for-each select="marc:datafield[@tag=440]">
195 <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>
196 <xsl:call-template name="chopPunctuation">
197 <xsl:with-param name="chopString">
198 <xsl:call-template name="subfieldSelect">
199 <xsl:with-param name="codes">av</xsl:with-param>
204 <xsl:call-template name="part"/>
205 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
208 <!-- 490 Series not traced, Ind1 = 0 -->
209 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
210 <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>
211 <xsl:call-template name="chopPunctuation">
212 <xsl:with-param name="chopString">
213 <xsl:call-template name="subfieldSelect">
214 <xsl:with-param name="codes">av</xsl:with-param>
219 <xsl:call-template name="part"/>
220 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
222 <!-- 490 Series traced, Ind1 = 1 -->
223 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
224 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811]">
226 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
227 <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>
228 <xsl:call-template name="chopPunctuation">
229 <xsl:with-param name="chopString">
230 <xsl:call-template name="subfieldSelect">
231 <xsl:with-param name="codes">a_t</xsl:with-param>
238 <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>
239 <xsl:call-template name="chopPunctuation">
240 <xsl:with-param name="chopString">
241 <xsl:call-template name="subfieldSelect">
242 <xsl:with-param name="codes">a_t</xsl:with-param>
247 <xsl:call-template name="part"/>
250 <xsl:text>: </xsl:text>
251 <xsl:value-of select="marc:subfield[@code='v']" />
252 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
255 <xsl:for-each select="marc:datafield[@tag=830]">
257 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
258 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
259 <xsl:call-template name="chopPunctuation">
260 <xsl:with-param name="chopString">
261 <xsl:call-template name="subfieldSelect">
262 <xsl:with-param name="codes">a_t</xsl:with-param>
269 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
270 <xsl:call-template name="chopPunctuation">
271 <xsl:with-param name="chopString">
272 <xsl:call-template name="subfieldSelect">
273 <xsl:with-param name="codes">a_t</xsl:with-param>
278 <xsl:call-template name="part"/>
281 <xsl:text>: </xsl:text>
282 <xsl:value-of select="marc:subfield[@code='v']" />
283 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
291 <xsl:if test="$leader7='s'">
292 <span class="results_summary analytics"><span class="label">Analytics: </span>
295 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
296 <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>
299 <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>
302 <xsl:text>Show analytics</xsl:text>
307 <!-- Volumes of sets and traced series -->
308 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
309 <span class="results_summary volumes"><span class="label">Volumes: </span>
312 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
313 <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>
316 <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>
319 <xsl:text>Show volumes</xsl:text>
325 <xsl:if test="$leader19='c'">
326 <span class="results_summary set"><span class="label">Set: </span>
327 <xsl:for-each select="marc:datafield[@tag=773]">
330 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
331 <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>
334 <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>
337 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
340 <xsl:when test="position()=last()"></xsl:when>
341 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
347 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
348 <xsl:if test="$display880">
349 <xsl:call-template name="m880Select">
350 <xsl:with-param name="basetags">260</xsl:with-param>
351 <xsl:with-param name="codes">abcg</xsl:with-param>
352 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
353 <xsl:with-param name="label">Publisher: </xsl:with-param>
357 <!-- Publisher info and RDA related info from tags 260, 264 -->
359 <xsl:when test="marc:datafield[@tag=264]">
360 <xsl:call-template name="showRDAtag264">
361 <xsl:with-param name="show_url">1</xsl:with-param>
364 <xsl:when test="marc:datafield[@tag=260]">
365 <span class="results_summary publisher"><span class="label">Publisher: </span>
366 <xsl:for-each select="marc:datafield[@tag=260]">
367 <xsl:if test="marc:subfield[@code='a']">
368 <xsl:call-template name="subfieldSelect">
369 <xsl:with-param name="codes">a</xsl:with-param>
372 <xsl:text> </xsl:text>
373 <xsl:if test="marc:subfield[@code='b']">
375 <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>
376 <xsl:call-template name="subfieldSelect">
377 <xsl:with-param name="codes">b</xsl:with-param>
381 <xsl:text> </xsl:text>
382 <xsl:call-template name="chopPunctuation">
383 <xsl:with-param name="chopString">
384 <xsl:call-template name="subfieldSelect">
385 <xsl:with-param name="codes">cg</xsl:with-param>
389 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
395 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
396 <xsl:if test="$display880">
397 <xsl:call-template name="m880Select">
398 <xsl:with-param name="basetags">250</xsl:with-param>
399 <xsl:with-param name="codes">ab</xsl:with-param>
400 <xsl:with-param name="class">results_summary edition</xsl:with-param>
401 <xsl:with-param name="label">Edition: </xsl:with-param>
405 <xsl:if test="marc:datafield[@tag=250]">
406 <span class="results_summary edition"><span class="label">Edition: </span>
407 <xsl:for-each select="marc:datafield[@tag=250]">
408 <xsl:call-template name="chopPunctuation">
409 <xsl:with-param name="chopString">
410 <xsl:call-template name="subfieldSelect">
411 <xsl:with-param name="codes">ab</xsl:with-param>
415 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
420 <!-- Description: Alternate Graphic Representation (MARC 880) -->
421 <xsl:if test="$display880">
422 <xsl:call-template name="m880Select">
423 <xsl:with-param name="basetags">300</xsl:with-param>
424 <xsl:with-param name="codes">abceg</xsl:with-param>
425 <xsl:with-param name="class">results_summary description</xsl:with-param>
426 <xsl:with-param name="label">Description: </xsl:with-param>
430 <xsl:if test="marc:datafield[@tag=300]">
431 <span class="results_summary description"><span class="label">Description: </span>
432 <xsl:for-each select="marc:datafield[@tag=300]">
433 <xsl:call-template name="chopPunctuation">
434 <xsl:with-param name="chopString">
435 <xsl:call-template name="subfieldSelect">
436 <xsl:with-param name="codes">abcefg</xsl:with-param>
440 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
445 <!-- Content Type -->
446 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
447 <span class="results_summary" id="content_type">
448 <xsl:if test="marc:datafield[@tag=336]">
449 <span class="label">Content type: </span>
450 <xsl:for-each select="marc:datafield[@tag=336]">
451 <xsl:call-template name="subfieldSelect">
452 <xsl:with-param name="codes">a</xsl:with-param>
453 <xsl:with-param name="delimeter">, </xsl:with-param>
455 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
458 <xsl:text> </xsl:text>
460 <xsl:if test="marc:datafield[@tag=337]">
461 <span class="label">Media type: </span>
462 <xsl:for-each select="marc:datafield[@tag=337]">
463 <xsl:call-template name="subfieldSelect">
464 <xsl:with-param name="codes">a</xsl:with-param>
465 <xsl:with-param name="delimeter">, </xsl:with-param>
467 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
470 <xsl:text> </xsl:text>
472 <xsl:if test="marc:datafield[@tag=338]">
473 <span class="label">Carrier type: </span>
474 <xsl:for-each select="marc:datafield[@tag=338]">
475 <xsl:call-template name="subfieldSelect">
476 <xsl:with-param name="codes">a</xsl:with-param>
477 <xsl:with-param name="delimeter">, </xsl:with-param>
479 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
486 <xsl:call-template name="showISBNISSN"/>
488 <xsl:if test="marc:datafield[@tag=013]">
489 <span class="results_summary patent_info">
490 <span class="label">Patent information: </span>
491 <xsl:for-each select="marc:datafield[@tag=013]">
492 <xsl:call-template name="subfieldSelect">
493 <xsl:with-param name="codes">acdef</xsl:with-param>
494 <xsl:with-param name="delimeter">, </xsl:with-param>
496 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
501 <xsl:if test="marc:datafield[@tag=088]">
502 <span class="results_summary report_number">
503 <span class="label">Report number: </span>
504 <xsl:for-each select="marc:datafield[@tag=088]">
505 <xsl:call-template name="subfieldSelect">
506 <xsl:with-param name="codes">a</xsl:with-param>
508 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
513 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
514 <xsl:if test="$display880">
515 <xsl:call-template name="m880Select">
516 <xsl:with-param name="basetags">246</xsl:with-param>
517 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
518 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
519 <xsl:with-param name="label">Other title: </xsl:with-param>
523 <xsl:if test="marc:datafield[@tag=246]">
524 <span class="results_summary other_title"><span class="label">Other title: </span>
525 <xsl:for-each select="marc:datafield[@tag=246]">
526 <xsl:call-template name="chopPunctuation">
527 <xsl:with-param name="chopString">
528 <xsl:call-template name="subfieldSelect">
529 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
533 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
535 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
536 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
537 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
538 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
539 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
540 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
541 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
542 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
543 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
546 <xsl:if test="marc:subfield[@code='i']">
547 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
549 <!-- #13386 added separator | -->
550 <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>
555 <xsl:if test="marc:datafield[@tag=242]">
556 <span class="results_summary translated_title"><span class="label">Title translated: </span>
557 <xsl:for-each select="marc:datafield[@tag=242]">
558 <xsl:call-template name="chopPunctuation">
559 <xsl:with-param name="chopString">
560 <xsl:call-template name="subfieldSelect">
561 <xsl:with-param name="codes">abchnp</xsl:with-param>
565 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
570 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
571 <xsl:if test="$display880">
572 <xsl:call-template name="m880Select">
573 <xsl:with-param name="basetags">130,240</xsl:with-param>
574 <xsl:with-param name="codes">adfklmor</xsl:with-param>
575 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
576 <xsl:with-param name="label">Uniform title: </xsl:with-param>
580 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
581 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
582 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
583 <xsl:for-each select="marc:subfield">
584 <xsl:if test="contains('adfghklmnoprst',@code)">
585 <xsl:value-of select="text()"/>
586 <xsl:text> </xsl:text>
589 <xsl:if test="position() != last()">
590 <span class="separator"><xsl:text> | </xsl:text></span>
596 <!-- #13382 Added Related works 700$i -->
597 <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']]">
598 <span class="results_summary related_works"><span class="label">Related works: </span>
599 <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']]">
600 <xsl:variable name="str">
601 <xsl:call-template name="subfieldSelect">
602 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
605 <xsl:call-template name="chopPunctuation">
606 <xsl:with-param name="chopString">
607 <xsl:value-of select="$str"/>
610 <!-- add relator code too between brackets-->
611 <xsl:if test="marc:subfield[@code='4' or @code='e']">
612 <span class="relatorcode">
613 <xsl:text> [</xsl:text>
615 <xsl:when test="marc:subfield[@code='e']">
616 <xsl:for-each select="marc:subfield[@code='e']">
617 <xsl:value-of select="."/>
618 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
622 <xsl:for-each select="marc:subfield[@code='4']">
623 <xsl:value-of select="."/>
624 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
628 <xsl:text>]</xsl:text>
632 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
638 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
639 <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'])]">
640 <span class="results_summary contained_works"><span class="label">Contained works: </span>
641 <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'])]">
642 <xsl:variable name="str">
643 <xsl:call-template name="subfieldSelect">
644 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
647 <xsl:call-template name="chopPunctuation">
648 <xsl:with-param name="chopString">
649 <xsl:value-of select="$str"/>
652 <!-- add relator code too between brackets-->
653 <xsl:if test="marc:subfield[@code='4' or @code='e']">
654 <span class="relatorcode">
655 <xsl:text> [</xsl:text>
657 <xsl:when test="marc:subfield[@code='e']">
658 <xsl:for-each select="marc:subfield[@code='e']">
659 <xsl:value-of select="."/>
660 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
664 <xsl:for-each select="marc:subfield[@code='4']">
665 <xsl:value-of select="."/>
666 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
670 <xsl:text>]</xsl:text>
674 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
681 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
682 <span class="results_summary subjects"><span class="label">Subject(s): </span>
683 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
686 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
687 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
688 <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>
690 <xsl:when test="$TraceSubjectSubdivisions='1'">
691 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
692 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
693 <xsl:with-param name="delimeter"> AND </xsl:with-param>
694 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
695 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
696 <xsl:with-param name="urlencode">1</xsl:with-param>
701 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
703 <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>
707 <xsl:call-template name="chopPunctuation">
708 <xsl:with-param name="chopString">
709 <xsl:call-template name="subfieldSelect">
710 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
711 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
712 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
718 <xsl:if test="marc:subfield[@code=9]">
719 <xsl:text> </xsl:text>
721 <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>
722 <xsl:element name="img">
723 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
724 <xsl:attribute name="alt"></xsl:attribute>
725 <xsl:attribute name="height">15</xsl:attribute>
726 <xsl:attribute name="width">15</xsl:attribute>
732 <xsl:when test="position()=last()"></xsl:when>
733 <xsl:otherwise> | </xsl:otherwise>
741 <xsl:if test="marc:datafield[@tag=655]">
742 <span class="results_summary genre"><span class="label">Genre/Form: </span>
743 <xsl:for-each select="marc:datafield[@tag=655]">
746 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
747 <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>
749 <xsl:when test="$TraceSubjectSubdivisions='1'">
750 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
751 <xsl:with-param name="codes">avxyz</xsl:with-param>
752 <xsl:with-param name="delimeter"> AND </xsl:with-param>
753 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
754 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
755 <xsl:with-param name="urlencode">1</xsl:with-param>
760 <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>
763 <xsl:call-template name="subfieldSelect">
764 <xsl:with-param name="codes">avxyz</xsl:with-param>
765 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
766 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
770 <xsl:if test="marc:subfield[@code=9]">
771 <xsl:text> </xsl:text>
773 <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>
774 <xsl:element name="img">
775 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
776 <xsl:attribute name="alt"></xsl:attribute>
777 <xsl:attribute name="height">15</xsl:attribute>
778 <xsl:attribute name="width">15</xsl:attribute>
782 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
787 <!-- MARC21 776 Additional Physical Form Entry -->
788 <xsl:if test="marc:datafield[@tag=776]">
789 <span class="results_summary add_physical_form">
790 <span class="label">Additional physical formats: </span>
791 <xsl:for-each select="marc:datafield[@tag=776]">
792 <xsl:variable name="linktext">
794 <xsl:when test="marc:subfield[@code='t']">
795 <xsl:value-of select="marc:subfield[@code='t']"/>
797 <xsl:when test="marc:subfield[@code='a']">
798 <xsl:value-of select="marc:subfield[@code='a']"/>
801 <xsl:text>No title</xsl:text>
805 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
806 <xsl:call-template name="subfieldSelect">
807 <xsl:with-param name="codes">i</xsl:with-param>
809 <xsl:text>: </xsl:text>
812 <xsl:when test="marc:subfield[@code='w']">
814 <xsl:attribute name="href">
815 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
816 <xsl:call-template name="extractControlNumber">
817 <xsl:with-param name="subfieldW">
818 <xsl:value-of select="marc:subfield[@code='w']"/>
822 <xsl:value-of select="$linktext"/>
826 <xsl:value-of select="$linktext"/>
829 <xsl:if test="position() != last()">
830 <xsl:text>; </xsl:text>
836 <!-- DDC classification -->
837 <xsl:if test="marc:datafield[@tag=082]">
838 <span class="results_summary ddc">
839 <span class="label">DDC classification: </span>
840 <xsl:for-each select="marc:datafield[@tag=082]">
841 <xsl:call-template name="subfieldSelect">
842 <xsl:with-param name="codes">a</xsl:with-param>
843 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
846 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
847 <xsl:otherwise> | </xsl:otherwise>
853 <!-- Other classification -->
854 <xsl:if test="marc:datafield[@tag=084]">
855 <span class="results_summary oc">
856 <span class="label">Other classification: </span>
857 <xsl:for-each select="marc:datafield[@tag=084]">
858 <xsl:call-template name="subfieldSelect">
859 <xsl:with-param name="codes">a</xsl:with-param>
860 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
863 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
864 <xsl:otherwise> | </xsl:otherwise>
870 <xsl:if test="marc:datafield[@tag=856]">
871 <span class="results_summary online_resources"><span class="label">Online resources: </span>
872 <xsl:for-each select="marc:datafield[@tag=856]">
873 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
875 <xsl:attribute name="href">
876 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
878 <xsl:when test="@ind1=7">
879 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
881 <xsl:when test="@ind1=1">
882 <xsl:text>ftp://</xsl:text>
885 <xsl:text>http://</xsl:text>
889 <xsl:value-of select="marc:subfield[@code='u']"/>
892 <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')">
893 <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>
895 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
896 <xsl:call-template name="subfieldSelect">
897 <xsl:with-param name="codes">y3z</xsl:with-param>
900 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
902 <xsl:when test="$URLLinkText!=''">
903 <xsl:value-of select="$URLLinkText"/>
906 <xsl:text>Click here to access online</xsl:text>
913 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
914 <xsl:otherwise> | </xsl:otherwise>
921 <xsl:if test="marc:datafield[@tag=505]">
922 <div class="results_summary contents">
924 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
925 <span class="label">Contents:</span>
927 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
928 <span class="label">Incomplete contents:</span>
930 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
931 <span class="label">Partial contents:</span>
934 <xsl:for-each select="marc:datafield[@tag=505]">
935 <div class='contentblock'>
937 <xsl:when test="@ind2=0">
938 <xsl:call-template name="subfieldSelectSpan">
939 <xsl:with-param name="codes">tru</xsl:with-param>
943 <xsl:call-template name="subfieldSelectSpan">
944 <xsl:with-param name="codes">atru</xsl:with-param>
954 <xsl:if test="marc:datafield[@tag=586]">
955 <span class="results_summary awardsnote">
956 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
957 <span class="label">Awards: </span>
959 <xsl:for-each select="marc:datafield[@tag=586]">
960 <xsl:value-of select="marc:subfield[@code='a']"/>
961 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
967 <xsl:if test="marc:datafield[@tag=583]">
968 <xsl:for-each select="marc:datafield[@tag=583]">
969 <xsl:if test="@ind1=1 or @ind1=' '">
970 <span class="results_summary actionnote">
971 <span class="label">Action note: </span>
973 <xsl:when test="marc:subfield[@code='z']">
974 <xsl:value-of select="marc:subfield[@code='z']"/>
977 <xsl:call-template name="subfieldSelect">
978 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
988 <xsl:if test="marc:datafield[@tag=508]">
989 <div class="results_summary prod_credits">
990 <span class="label">Production credits: </span>
991 <xsl:for-each select="marc:datafield[@tag=508]">
992 <xsl:call-template name="subfieldSelectSpan">
993 <xsl:with-param name="codes">a</xsl:with-param>
995 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1001 <xsl:if test="marc:datafield[@tag=773]">
1002 <xsl:for-each select="marc:datafield[@tag=773]">
1003 <xsl:if test="@ind1 !=1">
1004 <span class="results_summary in"><span class="label">
1006 <xsl:when test="@ind2=' '">
1009 <xsl:when test="@ind2=8">
1010 <xsl:if test="marc:subfield[@code='i']">
1011 <xsl:value-of select="marc:subfield[@code='i']"/>
1016 <xsl:variable name="f773">
1017 <xsl:call-template name="chopPunctuation">
1018 <xsl:with-param name="chopString">
1019 <xsl:call-template name="subfieldSelect">
1020 <xsl:with-param name="codes">a_t</xsl:with-param>
1021 </xsl:call-template>
1023 </xsl:call-template>
1026 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1027 <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>
1028 <xsl:value-of select="translate($f773, '()', '')"/>
1031 <xsl:when test="marc:subfield[@code='0']">
1032 <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>
1033 <xsl:value-of select="$f773"/>
1037 <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>
1038 <xsl:value-of select="$f773"/>
1042 <xsl:if test="marc:subfield[@code='g']">
1043 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1047 <xsl:if test="marc:subfield[@code='n']">
1048 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1055 <xsl:if test="marc:datafield[@tag=502]">
1056 <span class="results_summary diss_note">
1057 <span class="label">Dissertation note: </span>
1058 <xsl:for-each select="marc:datafield[@tag=502]">
1059 <xsl:call-template name="subfieldSelect">
1060 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1061 </xsl:call-template>
1063 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1067 <!-- 866 textual holdings -->
1068 <xsl:if test="marc:datafield[@tag=866]">
1069 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1070 <xsl:for-each select="marc:datafield[@tag=866]">
1071 <span class="holdings_note_data">
1072 <xsl:call-template name="subfieldSelect">
1073 <xsl:with-param name="codes">axz</xsl:with-param>
1074 </xsl:call-template>
1075 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1081 <!-- 867 textual holdings -->
1082 <xsl:if test="marc:datafield[@tag=867]">
1083 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1084 <xsl:for-each select="marc:datafield[@tag=867]">
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 <!-- 868 textual holdings -->
1096 <xsl:if test="marc:datafield[@tag=868]">
1097 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1098 <xsl:for-each select="marc:datafield[@tag=868]">
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><br /></xsl:otherwise></xsl:choose>
1110 <!-- 775 Other Edition -->
1111 <xsl:if test="marc:datafield[@tag=775]">
1112 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1113 <xsl:for-each select="marc:datafield[@tag=775]">
1114 <xsl:variable name="f775">
1115 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1116 <xsl:with-param name="codes">a_t</xsl:with-param>
1117 </xsl:call-template></xsl:with-param></xsl:call-template>
1119 <xsl:if test="marc:subfield[@code='i']">
1120 <xsl:call-template name="subfieldSelect">
1121 <xsl:with-param name="codes">i</xsl:with-param>
1122 </xsl:call-template>
1123 <xsl:text>: </xsl:text>
1127 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1128 <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>
1131 <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>
1134 <xsl:call-template name="subfieldSelect">
1135 <xsl:with-param name="codes">a_t</xsl:with-param>
1136 </xsl:call-template>
1139 <xsl:when test="position()=last()"></xsl:when>
1140 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1147 <xsl:if test="marc:datafield[@tag=780]">
1148 <xsl:for-each select="marc:datafield[@tag=780]">
1149 <xsl:if test="@ind1=0">
1150 <span class="results_summary preceeding_entry">
1152 <xsl:when test="@ind2=0">
1153 <span class="label">Continues:</span>
1155 <xsl:when test="@ind2=1">
1156 <span class="label">Continues in part:</span>
1158 <xsl:when test="@ind2=2">
1159 <span class="label">Supersedes:</span>
1161 <xsl:when test="@ind2=3">
1162 <span class="label">Supersedes in part:</span>
1164 <xsl:when test="@ind2=4">
1165 <span class="label">Formed by the union: ... and: ...</span>
1167 <xsl:when test="@ind2=5">
1168 <span class="label">Absorbed:</span>
1170 <xsl:when test="@ind2=6">
1171 <span class="label">Absorbed in part:</span>
1173 <xsl:when test="@ind2=7">
1174 <span class="label">Separated from:</span>
1177 <xsl:text> </xsl:text>
1178 <xsl:variable name="f780">
1179 <xsl:call-template name="subfieldSelect">
1180 <xsl:with-param name="codes">a_t</xsl:with-param>
1181 </xsl:call-template>
1184 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1185 <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>
1186 <xsl:value-of select="translate($f780, '()', '')"/>
1190 <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>
1191 <xsl:value-of select="translate($f780, '()', '')"/>
1197 <xsl:if test="marc:subfield[@code='n']">
1198 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1206 <xsl:if test="marc:datafield[@tag=785]">
1207 <xsl:for-each select="marc:datafield[@tag=785]">
1208 <span class="results_summary succeeding_entry">
1210 <xsl:when test="@ind2=0">
1211 <span class="label">Continued by:</span>
1213 <xsl:when test="@ind2=1">
1214 <span class="label">Continued in part by:</span>
1216 <xsl:when test="@ind2=2">
1217 <span class="label">Superseded by:</span>
1219 <xsl:when test="@ind2=3">
1220 <span class="label">Superseded in part by:</span>
1222 <xsl:when test="@ind2=4">
1223 <span class="label">Absorbed by:</span>
1225 <xsl:when test="@ind2=5">
1226 <span class="label">Absorbed in part by:</span>
1228 <xsl:when test="@ind2=6">
1229 <span class="label">Split into .. and ...:</span>
1231 <xsl:when test="@ind2=7">
1232 <span class="label">Merged with ... to form ...</span>
1234 <xsl:when test="@ind2=8">
1235 <span class="label">Changed back to:</span>
1238 <xsl:text> </xsl:text>
1239 <xsl:variable name="f785">
1240 <xsl:call-template name="subfieldSelect">
1241 <xsl:with-param name="codes">a_t</xsl:with-param>
1242 </xsl:call-template>
1246 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1247 <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>
1248 <xsl:value-of select="translate($f785, '()', '')"/>
1252 <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>
1253 <xsl:value-of select="translate($f785, '()', '')"/>
1262 <xsl:if test="$OPACBaseURL!=''">
1263 <span class="results_summary"><span class="label">OPAC view: </span>
1264 <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>.
1270 <xsl:template name="nameABCQ">
1271 <xsl:call-template name="chopPunctuation">
1272 <xsl:with-param name="chopString">
1273 <xsl:call-template name="subfieldSelect">
1274 <xsl:with-param name="codes">abcq</xsl:with-param>
1275 </xsl:call-template>
1277 <xsl:with-param name="punctuation">
1278 <xsl:text>:,;/ </xsl:text>
1280 </xsl:call-template>
1283 <xsl:template name="nameABCDN">
1284 <xsl:call-template name="chopPunctuation">
1285 <xsl:with-param name="chopString">
1286 <xsl:call-template name="subfieldSelect">
1287 <xsl:with-param name="codes">abcdn</xsl:with-param>
1288 </xsl:call-template>
1290 <xsl:with-param name="punctuation">
1291 <xsl:text>:,;/ </xsl:text>
1293 </xsl:call-template>
1296 <xsl:template name="nameACDEQ">
1297 <xsl:call-template name="subfieldSelect">
1298 <xsl:with-param name="codes">acdeq</xsl:with-param>
1299 </xsl:call-template>
1302 <xsl:template name="part">
1303 <xsl:variable name="partNumber">
1304 <xsl:call-template name="specialSubfieldSelect">
1305 <xsl:with-param name="axis">n</xsl:with-param>
1306 <xsl:with-param name="anyCodes">n</xsl:with-param>
1307 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1308 </xsl:call-template>
1310 <xsl:variable name="partName">
1311 <xsl:call-template name="specialSubfieldSelect">
1312 <xsl:with-param name="axis">p</xsl:with-param>
1313 <xsl:with-param name="anyCodes">p</xsl:with-param>
1314 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1315 </xsl:call-template>
1317 <xsl:if test="string-length(normalize-space($partNumber))">
1318 <xsl:call-template name="chopPunctuation">
1319 <xsl:with-param name="chopString" select="$partNumber"/>
1320 </xsl:call-template>
1322 <xsl:if test="string-length(normalize-space($partName))">
1323 <xsl:call-template name="chopPunctuation">
1324 <xsl:with-param name="chopString" select="$partName"/>
1325 </xsl:call-template>
1329 <xsl:template name="specialSubfieldSelect">
1330 <xsl:param name="anyCodes"/>
1331 <xsl:param name="axis"/>
1332 <xsl:param name="beforeCodes"/>
1333 <xsl:param name="afterCodes"/>
1334 <xsl:variable name="str">
1335 <xsl:for-each select="marc:subfield">
1336 <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])">
1337 <xsl:value-of select="text()"/>
1338 <xsl:text> </xsl:text>
1342 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1345 <xsl:template name="showAuthor">
1346 <xsl:param name="authorfield"/>
1347 <xsl:param name="UseAuthoritiesForTracings"/>
1348 <xsl:if test="count($authorfield)>0">
1350 <xsl:for-each select="$authorfield">
1352 <xsl:when test="position()>1"/>
1354 <xsl:when test="@tag<700">By: </xsl:when>
1355 <!--#13382 Changed Additional author to contributor -->
1356 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1360 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1361 <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>
1364 <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>
1368 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1370 <xsl:call-template name="chopPunctuation">
1371 <xsl:with-param name="chopString">
1372 <xsl:call-template name="subfieldSelect">
1373 <xsl:with-param name="codes">
1375 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1376 <xsl:when test="@tag=111">aeq</xsl:when>
1377 <xsl:when test="@tag=110">ab</xsl:when>
1378 <xsl:otherwise>abcjq</xsl:otherwise>
1381 </xsl:call-template>
1383 <xsl:with-param name="punctuation">
1384 <xsl:text>:,;/ </xsl:text>
1386 </xsl:call-template>
1387 <!-- Display only name and title portion in 110 field -->
1388 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1389 <span class="titleportion">
1391 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1392 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1394 <xsl:call-template name="chopPunctuation">
1395 <xsl:with-param name="chopString">
1396 <xsl:call-template name="subfieldSelect">
1397 <xsl:with-param name="codes">cdnt</xsl:with-param>
1398 </xsl:call-template>
1400 </xsl:call-template>
1403 <!-- Display only name and title portion in 111 field -->
1404 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1405 <span class="titleportion">
1407 <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>
1408 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1411 <xsl:call-template name="chopPunctuation">
1412 <xsl:with-param name="chopString">
1413 <xsl:call-template name="subfieldSelect">
1414 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1415 </xsl:call-template>
1417 </xsl:call-template>
1420 <!-- Display only dates in 100 field -->
1421 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1422 <span class="authordates">
1423 <xsl:text>, </xsl:text>
1424 <xsl:call-template name="chopPunctuation">
1425 <xsl:with-param name="chopString">
1426 <xsl:call-template name="subfieldSelect">
1427 <xsl:with-param name="codes">d</xsl:with-param>
1428 </xsl:call-template>
1430 </xsl:call-template>
1435 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1436 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1437 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1438 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1439 <xsl:if test="@tag=710 or @tag=711">
1440 <xsl:call-template name="chopPunctuation">
1441 <xsl:with-param name="chopString">
1442 <xsl:call-template name="subfieldSelect">
1443 <xsl:with-param name="codes">
1445 <xsl:when test="@tag=711">aeq</xsl:when>
1446 <xsl:otherwise>ab</xsl:otherwise>
1449 </xsl:call-template>
1451 <xsl:with-param name="punctuation">
1452 <xsl:text>:,;/ </xsl:text>
1454 </xsl:call-template>
1455 <!-- Display only name and title portion in 711 field -->
1456 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1457 <span class="titleportion">
1459 <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>
1460 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1463 <xsl:call-template name="chopPunctuation">
1464 <xsl:with-param name="chopString">
1465 <xsl:call-template name="subfieldSelect">
1466 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1467 </xsl:call-template>
1469 </xsl:call-template>
1472 <!-- Display only name and title portion in 710 field -->
1473 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1474 <span class="titleportion">
1476 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1477 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1479 <xsl:call-template name="chopPunctuation">
1480 <xsl:with-param name="chopString">
1481 <xsl:call-template name="subfieldSelect">
1482 <xsl:with-param name="codes">cdnt</xsl:with-param>
1483 </xsl:call-template>
1485 </xsl:call-template>
1490 <!-- Display only name portion in 700 field -->
1491 <xsl:if test="@tag=700">
1492 <xsl:call-template name="chopPunctuation">
1493 <xsl:with-param name="chopString">
1494 <xsl:call-template name="subfieldSelect">
1495 <xsl:with-param name="codes">abcq</xsl:with-param>
1496 </xsl:call-template>
1498 </xsl:call-template>
1500 <!-- Display class "authordates" in 700 field -->
1501 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1502 <span class="authordates">
1503 <xsl:text>, </xsl:text>
1504 <xsl:call-template name="chopPunctuation">
1505 <xsl:with-param name="chopString">
1506 <xsl:call-template name="subfieldSelect">
1507 <xsl:with-param name="codes">d</xsl:with-param>
1508 </xsl:call-template>
1510 </xsl:call-template>
1513 <!-- Display class "titleportion" in 700 field -->
1514 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1515 <xsl:if test="@tag=700 and $titleportionfields">
1516 <span class="titleportion">
1517 <xsl:text>. </xsl:text>
1518 <xsl:call-template name="chopPunctuation">
1519 <xsl:with-param name="chopString">
1520 <xsl:call-template name="subfieldSelect">
1521 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1522 </xsl:call-template>
1524 </xsl:call-template>
1531 <!-- add relator code too between brackets-->
1532 <!-- #13383 include relator code j for field 111 -->
1533 <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'])">
1534 <span class="relatorcode">
1535 <xsl:text> [</xsl:text>
1537 <xsl:when test="@tag=111 or @tag=711">
1539 <!-- Prefer j over 4 for fields 111 and 711-->
1540 <xsl:when test="marc:subfield[@code='j']">
1541 <xsl:for-each select="marc:subfield[@code='j']">
1542 <xsl:value-of select="."/>
1543 <xsl:if test="position() != last()">, </xsl:if>
1547 <xsl:for-each select="marc:subfield[@code=4]">
1548 <xsl:value-of select="."/>
1549 <xsl:if test="position() != last()">, </xsl:if>
1554 <!-- Prefer e over 4 for fields 111 and 711-->
1555 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1556 <xsl:for-each select="marc:subfield[@code='e']">
1557 <xsl:value-of select="."/>
1558 <xsl:if test="position() != last()">, </xsl:if>
1562 <xsl:for-each select="marc:subfield[@code=4]">
1563 <xsl:value-of select="."/>
1564 <xsl:if test="position() != last()">, </xsl:if>
1568 <xsl:text>]</xsl:text>
1573 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1581 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1582 <xsl:template name="subfieldSelectSubject">
1583 <xsl:param name="codes"/>
1584 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1585 <xsl:param name="subdivCodes"/>
1586 <xsl:param name="subdivDelimiter"/>
1587 <xsl:param name="prefix"/>
1588 <xsl:param name="suffix"/>
1589 <xsl:param name="urlencode"/>
1590 <xsl:variable name="str">
1591 <xsl:for-each select="marc:subfield">
1592 <xsl:if test="contains($codes, @code)">
1593 <xsl:if test="contains($subdivCodes, @code)">
1594 <xsl:value-of select="$subdivDelimiter"/>
1596 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1601 <xsl:when test="$urlencode=1">
1602 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1605 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>