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 exclude-result-prefixes="marc items">
12 <xsl:import href="MARC21slimUtils.xsl"/>
13 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
18 <xsl:template match="marc:record">
20 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
21 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
25 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
26 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
27 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
28 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
30 <xsl:variable name="OpacSuppression" select="marc:sysprefs/marc:syspref[@name='OpacSuppression']"/>
31 <xsl:variable name="TracingQuotesLeft">
33 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
34 <xsl:otherwise>"</xsl:otherwise>
37 <xsl:variable name="TracingQuotesRight">
39 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
40 <xsl:otherwise>"</xsl:otherwise>
44 <xsl:variable name="leader" select="marc:leader"/>
45 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
46 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
47 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
48 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
49 <xsl:variable name="materialTypeCode">
51 <xsl:when test="$leader19='a'">ST</xsl:when>
52 <xsl:when test="$leader6='a'">
54 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
55 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
56 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
59 <xsl:when test="$leader6='t'">BK</xsl:when>
60 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
61 <xsl:when test="$leader6='m'">CF</xsl:when>
62 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
63 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
64 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
65 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
68 <xsl:variable name="materialTypeLabel">
70 <xsl:when test="$leader19='a'">Set</xsl:when>
71 <xsl:when test="$leader6='a'">
73 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
74 <xsl:when test="$leader7='i' or $leader7='s'">
76 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
77 <xsl:otherwise>Series</xsl:otherwise>
80 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
83 <xsl:when test="$leader6='t'">Book</xsl:when>
84 <xsl:when test="$leader6='o'">Kit</xsl:when>
85 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
86 <xsl:when test="$leader6='m'">Computer file</xsl:when>
87 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
88 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
89 <xsl:when test="$leader6='j'">Music</xsl:when>
90 <xsl:when test="$leader6='i'">Sound</xsl:when>
91 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
95 <!-- Indicate if record is suppressed in OPAC -->
96 <xsl:if test="$OpacSuppression = 1">
97 <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
98 <span class="results_summary suppressed_opac">Suppressed in OPAC</span>
102 <!-- Title Statement -->
103 <!-- Alternate Graphic Representation (MARC 880) -->
104 <xsl:if test="$display880">
106 <xsl:call-template name="m880Select">
107 <xsl:with-param name="basetags">245</xsl:with-param>
108 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
114 <xsl:if test="marc:datafield[@tag=245]">
115 <h1 class="title" property="name">
116 <xsl:for-each select="marc:datafield[@tag=245]">
117 <xsl:call-template name="subfieldSelect">
118 <xsl:with-param name="codes">a</xsl:with-param>
120 <xsl:text> </xsl:text>
121 <!-- 13381 add additional subfields-->
122 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
124 <xsl:when test="@code='h'">
125 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
126 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
128 <xsl:when test="@code='c'">
129 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
130 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
133 <xsl:apply-templates/>
134 <xsl:text> </xsl:text>
142 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
143 <xsl:if test="$display880">
145 <xsl:call-template name="m880Select">
146 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
147 <xsl:with-param name="codes">abc</xsl:with-param>
148 <xsl:with-param name="index">au</xsl:with-param>
149 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
150 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
155 <!-- Author Statement -->
156 <xsl:call-template name="showAuthor">
157 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
158 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
161 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
162 <xsl:call-template name="showAuthor">
163 <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'])]"/>
164 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
167 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
168 <span class="results_summary type"><span class="label">Material type: </span>
169 <xsl:element name="img"><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>
170 <xsl:text> </xsl:text>
171 <xsl:value-of select="$materialTypeLabel"/>
176 <!--Series: Alternate Graphic Representation (MARC 880) -->
177 <xsl:if test="$display880">
178 <xsl:call-template name="m880Select">
179 <xsl:with-param name="basetags">440,490</xsl:with-param>
180 <xsl:with-param name="codes">av</xsl:with-param>
181 <xsl:with-param name="class">results_summary series</xsl:with-param>
182 <xsl:with-param name="label">Series: </xsl:with-param>
183 <xsl:with-param name="index">se</xsl:with-param>
188 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
189 <span class="results_summary series"><span class="label">Series: </span>
191 <xsl:for-each select="marc:datafield[@tag=440]">
192 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
193 <xsl:call-template name="chopPunctuation">
194 <xsl:with-param name="chopString">
195 <xsl:call-template name="subfieldSelect">
196 <xsl:with-param name="codes">av</xsl:with-param>
201 <xsl:call-template name="part"/>
202 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
205 <!-- 490 Series not traced, Ind1 = 0 -->
206 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
207 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
208 <xsl:call-template name="chopPunctuation">
209 <xsl:with-param name="chopString">
210 <xsl:call-template name="subfieldSelect">
211 <xsl:with-param name="codes">av</xsl:with-param>
216 <xsl:call-template name="part"/>
217 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
219 <!-- 490 Series traced, Ind1 = 1 -->
220 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
221 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
223 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
224 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
225 <xsl:call-template name="chopPunctuation">
226 <xsl:with-param name="chopString">
227 <xsl:call-template name="subfieldSelect">
228 <xsl:with-param name="codes">a_t</xsl:with-param>
235 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
236 <xsl:call-template name="chopPunctuation">
237 <xsl:with-param name="chopString">
238 <xsl:call-template name="subfieldSelect">
239 <xsl:with-param name="codes">a_t</xsl:with-param>
244 <xsl:call-template name="part"/>
247 <xsl:text>: </xsl:text>
248 <xsl:value-of select="marc:subfield[@code='v']" />
249 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
257 <xsl:if test="$leader7='s'">
258 <span class="results_summary analytics"><span class="label">Analytics: </span>
261 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
262 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
265 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
268 <xsl:text>Show analytics</xsl:text>
273 <!-- Volumes of sets and traced series -->
274 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
275 <span class="results_summary volumes"><span class="label">Volumes: </span>
278 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
279 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
282 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
285 <xsl:text>Show volumes</xsl:text>
291 <xsl:if test="$leader19='c'">
292 <span class="results_summary set"><span class="label">Set: </span>
293 <xsl:for-each select="marc:datafield[@tag=773]">
296 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
297 <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>
300 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
303 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
306 <xsl:when test="position()=last()"></xsl:when>
307 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
313 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
314 <xsl:if test="$display880">
315 <xsl:call-template name="m880Select">
316 <xsl:with-param name="basetags">260</xsl:with-param>
317 <xsl:with-param name="codes">abcg</xsl:with-param>
318 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
319 <xsl:with-param name="label">Publisher: </xsl:with-param>
323 <!-- Publisher info and RDA related info from tags 260, 264 -->
325 <xsl:when test="marc:datafield[@tag=264]">
326 <xsl:call-template name="showRDAtag264">
327 <xsl:with-param name="show_url">1</xsl:with-param>
330 <xsl:when test="marc:datafield[@tag=260]">
331 <span class="results_summary publisher"><span class="label">Publisher: </span>
332 <xsl:for-each select="marc:datafield[@tag=260]">
333 <xsl:if test="marc:subfield[@code='a']">
334 <xsl:call-template name="subfieldSelect">
335 <xsl:with-param name="codes">a</xsl:with-param>
338 <xsl:text> </xsl:text>
339 <xsl:if test="marc:subfield[@code='b']">
340 <a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{marc:subfield[@code='b']}">
341 <xsl:call-template name="subfieldSelect">
342 <xsl:with-param name="codes">b</xsl:with-param>
346 <xsl:text> </xsl:text>
347 <xsl:call-template name="chopPunctuation">
348 <xsl:with-param name="chopString">
349 <xsl:call-template name="subfieldSelect">
350 <xsl:with-param name="codes">cg</xsl:with-param>
354 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
360 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
361 <xsl:if test="$display880">
362 <xsl:call-template name="m880Select">
363 <xsl:with-param name="basetags">250</xsl:with-param>
364 <xsl:with-param name="codes">ab</xsl:with-param>
365 <xsl:with-param name="class">results_summary edition</xsl:with-param>
366 <xsl:with-param name="label">Edition: </xsl:with-param>
370 <xsl:if test="marc:datafield[@tag=250]">
371 <span class="results_summary edition"><span class="label">Edition: </span>
372 <xsl:for-each select="marc:datafield[@tag=250]">
373 <xsl:call-template name="chopPunctuation">
374 <xsl:with-param name="chopString">
375 <xsl:call-template name="subfieldSelect">
376 <xsl:with-param name="codes">ab</xsl:with-param>
380 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
385 <!-- Description: Alternate Graphic Representation (MARC 880) -->
386 <xsl:if test="$display880">
387 <xsl:call-template name="m880Select">
388 <xsl:with-param name="basetags">300</xsl:with-param>
389 <xsl:with-param name="codes">abceg</xsl:with-param>
390 <xsl:with-param name="class">results_summary description</xsl:with-param>
391 <xsl:with-param name="label">Description: </xsl:with-param>
395 <xsl:if test="marc:datafield[@tag=300]">
396 <span class="results_summary description"><span class="label">Description: </span>
397 <xsl:for-each select="marc:datafield[@tag=300]">
398 <xsl:call-template name="chopPunctuation">
399 <xsl:with-param name="chopString">
400 <xsl:call-template name="subfieldSelect">
401 <xsl:with-param name="codes">abceg</xsl:with-param>
405 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
410 <!-- Content Type -->
411 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
412 <span class="results_summary" id="content_type">
413 <xsl:if test="marc:datafield[@tag=336]">
414 <span class="label">Content type: </span>
415 <xsl:for-each select="marc:datafield[@tag=336]">
416 <xsl:call-template name="subfieldSelect">
417 <xsl:with-param name="codes">a</xsl:with-param>
418 <xsl:with-param name="delimeter">, </xsl:with-param>
420 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
423 <xsl:text> </xsl:text>
425 <xsl:if test="marc:datafield[@tag=337]">
426 <span class="label">Media type: </span>
427 <xsl:for-each select="marc:datafield[@tag=337]">
428 <xsl:call-template name="subfieldSelect">
429 <xsl:with-param name="codes">a</xsl:with-param>
430 <xsl:with-param name="delimeter">, </xsl:with-param>
432 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
435 <xsl:text> </xsl:text>
437 <xsl:if test="marc:datafield[@tag=338]">
438 <span class="label">Carrier type: </span>
439 <xsl:for-each select="marc:datafield[@tag=338]">
440 <xsl:call-template name="subfieldSelect">
441 <xsl:with-param name="codes">a</xsl:with-param>
442 <xsl:with-param name="delimeter">, </xsl:with-param>
444 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
452 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
453 <span class="results_summary isbn"><span class="label">ISBN: </span>
454 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
455 <span property="isbn">
456 <xsl:value-of select="."/>
458 <xsl:when test="position()=last()">
459 <xsl:text>.</xsl:text>
462 <xsl:text>; </xsl:text>
471 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
472 <span class="results_summary issn"><span class="label">ISSN: </span>
473 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
474 <span property="issn">
475 <xsl:value-of select="."/>
477 <xsl:when test="position()=last()">
478 <xsl:text>.</xsl:text>
481 <xsl:text>; </xsl:text>
489 <xsl:if test="marc:datafield[@tag=013]">
490 <span class="results_summary patent_info">
491 <span class="label">Patent information: </span>
492 <xsl:for-each select="marc:datafield[@tag=013]">
493 <xsl:call-template name="subfieldSelect">
494 <xsl:with-param name="codes">acdef</xsl:with-param>
495 <xsl:with-param name="delimeter">, </xsl:with-param>
497 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
502 <xsl:if test="marc:datafield[@tag=088]">
503 <span class="results_summary report_number">
504 <span class="label">Report number: </span>
505 <xsl:for-each select="marc:datafield[@tag=088]">
506 <xsl:call-template name="subfieldSelect">
507 <xsl:with-param name="codes">a</xsl:with-param>
509 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
514 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
515 <xsl:if test="$display880">
516 <xsl:call-template name="m880Select">
517 <xsl:with-param name="basetags">246</xsl:with-param>
518 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
519 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
520 <xsl:with-param name="label">Other title: </xsl:with-param>
524 <xsl:if test="marc:datafield[@tag=246]">
525 <span class="results_summary other_title"><span class="label">Other title: </span>
526 <xsl:for-each select="marc:datafield[@tag=246]">
527 <xsl:call-template name="chopPunctuation">
528 <xsl:with-param name="chopString">
529 <xsl:call-template name="subfieldSelect">
530 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
534 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
536 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
537 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
538 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
539 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
540 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
541 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
542 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
543 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
544 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
547 <xsl:if test="marc:subfield[@code='i']">
548 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
550 <!-- #13386 added separator | -->
551 <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>
556 <xsl:if test="marc:datafield[@tag=242]">
557 <span class="results_summary translated_title"><span class="label">Title translated: </span>
558 <xsl:for-each select="marc:datafield[@tag=242]">
559 <xsl:call-template name="chopPunctuation">
560 <xsl:with-param name="chopString">
561 <xsl:call-template name="subfieldSelect">
562 <xsl:with-param name="codes">abchnp</xsl:with-param>
566 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
571 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
572 <xsl:if test="$display880">
573 <xsl:call-template name="m880Select">
574 <xsl:with-param name="basetags">130,240</xsl:with-param>
575 <xsl:with-param name="codes">adfklmor</xsl:with-param>
576 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
577 <xsl:with-param name="label">Uniform title: </xsl:with-param>
581 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
582 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
583 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
584 <xsl:for-each select="marc:subfield">
585 <xsl:if test="contains('adfghklmnoprst',@code)">
586 <xsl:value-of select="text()"/>
587 <xsl:text> </xsl:text>
590 <xsl:if test="position() != last()">
591 <span class="separator"><xsl:text> | </xsl:text></span>
597 <!-- #13382 Added Related works 700$i -->
598 <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']]">
599 <span class="results_summary related_works"><span class="label">Related works: </span>
600 <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']]">
601 <xsl:variable name="str">
602 <xsl:call-template name="subfieldSelect">
603 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
606 <xsl:call-template name="chopPunctuation">
607 <xsl:with-param name="chopString">
608 <xsl:value-of select="$str"/>
611 <!-- add relator code too between brackets-->
612 <xsl:if test="marc:subfield[@code='4' or @code='e']">
613 <span class="relatorcode">
614 <xsl:text> [</xsl:text>
616 <xsl:when test="marc:subfield[@code='e']">
617 <xsl:for-each select="marc:subfield[@code='e']">
618 <xsl:value-of select="."/>
619 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
623 <xsl:for-each select="marc:subfield[@code='4']">
624 <xsl:value-of select="."/>
625 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
629 <xsl:text>]</xsl:text>
633 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
639 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
640 <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'])]">
641 <span class="results_summary contained_works"><span class="label">Contained works: </span>
642 <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'])]">
643 <xsl:variable name="str">
644 <xsl:call-template name="subfieldSelect">
645 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
648 <xsl:call-template name="chopPunctuation">
649 <xsl:with-param name="chopString">
650 <xsl:value-of select="$str"/>
653 <!-- add relator code too between brackets-->
654 <xsl:if test="marc:subfield[@code='4' or @code='e']">
655 <span class="relatorcode">
656 <xsl:text> [</xsl:text>
658 <xsl:when test="marc:subfield[@code='e']">
659 <xsl:for-each select="marc:subfield[@code='e']">
660 <xsl:value-of select="."/>
661 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
665 <xsl:for-each select="marc:subfield[@code='4']">
666 <xsl:value-of select="."/>
667 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
671 <xsl:text>]</xsl:text>
675 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
682 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
683 <span class="results_summary subjects"><span class="label">Subject(s): </span>
684 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
687 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
688 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
689 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
691 <xsl:when test="$TraceSubjectSubdivisions='1'">
692 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
693 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
694 <xsl:with-param name="delimeter"> AND </xsl:with-param>
695 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
696 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</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="translate(marc:subfield[@code='a'],'()','')"/><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="marc:subfield[@code=9]"/></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="marc:subfield[@code=9]"/></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>
759 <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>
762 <xsl:call-template name="subfieldSelect">
763 <xsl:with-param name="codes">avxyz</xsl:with-param>
764 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
765 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
768 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
773 <!-- MARC21 776 Additional Physical Form Entry -->
774 <xsl:if test="marc:datafield[@tag=776]">
775 <span class="results_summary add_physical_form">
776 <span class="label">Additional physical formats: </span>
777 <xsl:for-each select="marc:datafield[@tag=776]">
778 <xsl:variable name="linktext">
780 <xsl:when test="marc:subfield[@code='t']">
781 <xsl:value-of select="marc:subfield[@code='t']"/>
783 <xsl:when test="marc:subfield[@code='a']">
784 <xsl:value-of select="marc:subfield[@code='a']"/>
787 <xsl:text>No title</xsl:text>
791 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
792 <xsl:call-template name="subfieldSelect">
793 <xsl:with-param name="codes">i</xsl:with-param>
795 <xsl:text>: </xsl:text>
798 <xsl:when test="marc:subfield[@code='w']">
800 <xsl:attribute name="href">
801 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
802 <xsl:call-template name="extractControlNumber">
803 <xsl:with-param name="subfieldW">
804 <xsl:value-of select="marc:subfield[@code='w']"/>
808 <xsl:value-of select="$linktext"/>
812 <xsl:value-of select="$linktext"/>
815 <xsl:if test="position() != last()">
816 <xsl:text>; </xsl:text>
822 <!-- DDC classification -->
823 <xsl:if test="marc:datafield[@tag=082]">
824 <span class="results_summary ddc">
825 <span class="label">DDC classification: </span>
826 <xsl:for-each select="marc:datafield[@tag=082]">
827 <xsl:call-template name="subfieldSelect">
828 <xsl:with-param name="codes">a</xsl:with-param>
829 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
832 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
833 <xsl:otherwise> | </xsl:otherwise>
839 <!-- Other classification -->
840 <xsl:if test="marc:datafield[@tag=084]">
841 <span class="results_summary oc">
842 <span class="label">Other classification: </span>
843 <xsl:for-each select="marc:datafield[@tag=084]">
844 <xsl:call-template name="subfieldSelect">
845 <xsl:with-param name="codes">a</xsl:with-param>
846 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
849 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
850 <xsl:otherwise> | </xsl:otherwise>
856 <xsl:if test="marc:datafield[@tag=856]">
857 <span class="results_summary online_resources"><span class="label">Online resources: </span>
858 <xsl:for-each select="marc:datafield[@tag=856]">
859 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
860 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
862 <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')">
863 <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>
865 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
866 <xsl:call-template name="subfieldSelect">
867 <xsl:with-param name="codes">y3z</xsl:with-param>
870 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
872 <xsl:when test="$URLLinkText!=''">
873 <xsl:value-of select="$URLLinkText"/>
876 <xsl:text>Click here to access online</xsl:text>
883 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
884 <xsl:otherwise> | </xsl:otherwise>
890 <xsl:if test="marc:datafield[@tag=505]">
891 <div class="results_summary contents">
893 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
894 <span class="label">Contents:</span>
896 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
897 <span class="label">Incomplete contents:</span>
899 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
900 <span class="label">Partial contents:</span>
903 <xsl:for-each select="marc:datafield[@tag=505]">
904 <div class='contentblock'>
906 <xsl:when test="@ind2=0">
907 <xsl:call-template name="subfieldSelectSpan">
908 <xsl:with-param name="codes">tru</xsl:with-param>
912 <xsl:call-template name="subfieldSelectSpan">
913 <xsl:with-param name="codes">atru</xsl:with-param>
923 <xsl:if test="marc:datafield[@tag=586]">
924 <span class="results_summary awardsnote">
925 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
926 <span class="label">Awards: </span>
928 <xsl:for-each select="marc:datafield[@tag=586]">
929 <xsl:value-of select="marc:subfield[@code='a']"/>
930 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
936 <xsl:if test="marc:datafield[@tag=583]">
937 <xsl:for-each select="marc:datafield[@tag=583]">
938 <xsl:if test="@ind1=1 or @ind1=' '">
939 <span class="results_summary actionnote">
940 <span class="label">Action note: </span>
942 <xsl:when test="marc:subfield[@code='z']">
943 <xsl:value-of select="marc:subfield[@code='z']"/>
946 <xsl:call-template name="subfieldSelect">
947 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
957 <xsl:if test="marc:datafield[@tag=508]">
958 <div class="results_summary prod_credits">
959 <span class="label">Production credits: </span>
960 <xsl:for-each select="marc:datafield[@tag=508]">
961 <xsl:call-template name="subfieldSelectSpan">
962 <xsl:with-param name="codes">a</xsl:with-param>
964 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
970 <xsl:if test="marc:datafield[@tag=773]">
971 <xsl:for-each select="marc:datafield[@tag=773]">
972 <xsl:if test="@ind1 !=1">
973 <span class="results_summary in"><span class="label">
975 <xsl:when test="@ind2=' '">
978 <xsl:when test="@ind2=8">
979 <xsl:if test="marc:subfield[@code='i']">
980 <xsl:value-of select="marc:subfield[@code='i']"/>
985 <xsl:variable name="f773">
986 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
987 <xsl:with-param name="codes">a_t</xsl:with-param>
988 </xsl:call-template></xsl:with-param></xsl:call-template>
991 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
992 <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>
993 <xsl:value-of select="translate($f773, '()', '')"/>
995 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
997 <xsl:when test="marc:subfield[@code='0']">
998 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
999 <xsl:value-of select="$f773"/>
1003 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
1004 <xsl:value-of select="$f773"/>
1006 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
1011 <xsl:if test="marc:subfield[@code='n']">
1012 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1019 <xsl:if test="marc:datafield[@tag=502]">
1020 <span class="results_summary diss_note">
1021 <span class="label">Dissertation note: </span>
1022 <xsl:for-each select="marc:datafield[@tag=502]">
1023 <xsl:call-template name="subfieldSelect">
1024 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1025 </xsl:call-template>
1027 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1031 <!-- 866 textual holdings -->
1032 <xsl:if test="marc:datafield[@tag=866]">
1033 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
1034 <xsl:for-each select="marc:datafield[@tag=866]">
1035 <xsl:call-template name="subfieldSelect">
1036 <xsl:with-param name="codes">axz</xsl:with-param>
1037 </xsl:call-template>
1038 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1043 <!-- 775 Other Edition -->
1044 <xsl:if test="marc:datafield[@tag=775]">
1045 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1046 <xsl:for-each select="marc:datafield[@tag=775]">
1047 <xsl:variable name="f775">
1048 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1049 <xsl:with-param name="codes">a_t</xsl:with-param>
1050 </xsl:call-template></xsl:with-param></xsl:call-template>
1052 <xsl:if test="marc:subfield[@code='i']">
1053 <xsl:call-template name="subfieldSelect">
1054 <xsl:with-param name="codes">i</xsl:with-param>
1055 </xsl:call-template>
1056 <xsl:text>: </xsl:text>
1060 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1061 <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>
1064 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
1067 <xsl:call-template name="subfieldSelect">
1068 <xsl:with-param name="codes">a_t</xsl:with-param>
1069 </xsl:call-template>
1072 <xsl:when test="position()=last()"></xsl:when>
1073 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1080 <xsl:if test="marc:datafield[@tag=780]">
1081 <xsl:for-each select="marc:datafield[@tag=780]">
1082 <xsl:if test="@ind1=0">
1083 <span class="results_summary preceeding_entry">
1085 <xsl:when test="@ind2=0">
1086 <span class="label">Continues:</span>
1088 <xsl:when test="@ind2=1">
1089 <span class="label">Continues in part:</span>
1091 <xsl:when test="@ind2=2">
1092 <span class="label">Supersedes:</span>
1094 <xsl:when test="@ind2=3">
1095 <span class="label">Supersedes in part:</span>
1097 <xsl:when test="@ind2=4">
1098 <span class="label">Formed by the union: ... and: ...</span>
1100 <xsl:when test="@ind2=5">
1101 <span class="label">Absorbed:</span>
1103 <xsl:when test="@ind2=6">
1104 <span class="label">Absorbed in part:</span>
1106 <xsl:when test="@ind2=7">
1107 <span class="label">Separated from:</span>
1110 <xsl:text> </xsl:text>
1111 <xsl:variable name="f780">
1112 <xsl:call-template name="subfieldSelect">
1113 <xsl:with-param name="codes">a_t</xsl:with-param>
1114 </xsl:call-template>
1117 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1118 <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>
1119 <xsl:value-of select="translate($f780, '()', '')"/>
1123 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1124 <xsl:value-of select="translate($f780, '()', '')"/>
1130 <xsl:if test="marc:subfield[@code='n']">
1131 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1139 <xsl:if test="marc:datafield[@tag=785]">
1140 <xsl:for-each select="marc:datafield[@tag=785]">
1141 <span class="results_summary succeeding_entry">
1143 <xsl:when test="@ind2=0">
1144 <span class="label">Continued by:</span>
1146 <xsl:when test="@ind2=1">
1147 <span class="label">Continued in part by:</span>
1149 <xsl:when test="@ind2=2">
1150 <span class="label">Superseded by:</span>
1152 <xsl:when test="@ind2=3">
1153 <span class="label">Superseded in part by:</span>
1155 <xsl:when test="@ind2=4">
1156 <span class="label">Absorbed by:</span>
1158 <xsl:when test="@ind2=5">
1159 <span class="label">Absorbed in part by:</span>
1161 <xsl:when test="@ind2=6">
1162 <span class="label">Split into .. and ...:</span>
1164 <xsl:when test="@ind2=7">
1165 <span class="label">Merged with ... to form ...</span>
1167 <xsl:when test="@ind2=8">
1168 <span class="label">Changed back to:</span>
1171 <xsl:text> </xsl:text>
1172 <xsl:variable name="f785">
1173 <xsl:call-template name="subfieldSelect">
1174 <xsl:with-param name="codes">a_t</xsl:with-param>
1175 </xsl:call-template>
1179 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1180 <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>
1181 <xsl:value-of select="translate($f785, '()', '')"/>
1185 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1186 <xsl:value-of select="translate($f785, '()', '')"/>
1195 <xsl:if test="$OPACBaseURL!=''">
1196 <span class="results_summary"><span class="label">OPAC view: </span>
1197 <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>.
1203 <xsl:template name="nameABCQ">
1204 <xsl:call-template name="chopPunctuation">
1205 <xsl:with-param name="chopString">
1206 <xsl:call-template name="subfieldSelect">
1207 <xsl:with-param name="codes">abcq</xsl:with-param>
1208 </xsl:call-template>
1210 <xsl:with-param name="punctuation">
1211 <xsl:text>:,;/ </xsl:text>
1213 </xsl:call-template>
1216 <xsl:template name="nameABCDN">
1217 <xsl:call-template name="chopPunctuation">
1218 <xsl:with-param name="chopString">
1219 <xsl:call-template name="subfieldSelect">
1220 <xsl:with-param name="codes">abcdn</xsl:with-param>
1221 </xsl:call-template>
1223 <xsl:with-param name="punctuation">
1224 <xsl:text>:,;/ </xsl:text>
1226 </xsl:call-template>
1229 <xsl:template name="nameACDEQ">
1230 <xsl:call-template name="subfieldSelect">
1231 <xsl:with-param name="codes">acdeq</xsl:with-param>
1232 </xsl:call-template>
1235 <xsl:template name="part">
1236 <xsl:variable name="partNumber">
1237 <xsl:call-template name="specialSubfieldSelect">
1238 <xsl:with-param name="axis">n</xsl:with-param>
1239 <xsl:with-param name="anyCodes">n</xsl:with-param>
1240 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1241 </xsl:call-template>
1243 <xsl:variable name="partName">
1244 <xsl:call-template name="specialSubfieldSelect">
1245 <xsl:with-param name="axis">p</xsl:with-param>
1246 <xsl:with-param name="anyCodes">p</xsl:with-param>
1247 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1248 </xsl:call-template>
1250 <xsl:if test="string-length(normalize-space($partNumber))">
1251 <xsl:call-template name="chopPunctuation">
1252 <xsl:with-param name="chopString" select="$partNumber"/>
1253 </xsl:call-template>
1255 <xsl:if test="string-length(normalize-space($partName))">
1256 <xsl:call-template name="chopPunctuation">
1257 <xsl:with-param name="chopString" select="$partName"/>
1258 </xsl:call-template>
1262 <xsl:template name="specialSubfieldSelect">
1263 <xsl:param name="anyCodes"/>
1264 <xsl:param name="axis"/>
1265 <xsl:param name="beforeCodes"/>
1266 <xsl:param name="afterCodes"/>
1267 <xsl:variable name="str">
1268 <xsl:for-each select="marc:subfield">
1269 <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])">
1270 <xsl:value-of select="text()"/>
1271 <xsl:text> </xsl:text>
1275 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1278 <xsl:template name="showAuthor">
1279 <xsl:param name="authorfield"/>
1280 <xsl:param name="UseAuthoritiesForTracings"/>
1281 <xsl:if test="count($authorfield)>0">
1283 <xsl:for-each select="$authorfield">
1285 <xsl:when test="position()>1"/>
1287 <xsl:when test="@tag<700">By: </xsl:when>
1288 <!--#13382 Changed Additional author to contributor -->
1289 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1293 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1294 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1297 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1301 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1303 <xsl:call-template name="chopPunctuation">
1304 <xsl:with-param name="chopString">
1305 <xsl:call-template name="subfieldSelect">
1306 <xsl:with-param name="codes">
1308 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1309 <xsl:when test="@tag=111">aeq</xsl:when>
1310 <xsl:when test="@tag=110">ab</xsl:when>
1311 <xsl:otherwise>abcjq</xsl:otherwise>
1314 </xsl:call-template>
1316 <xsl:with-param name="punctuation">
1317 <xsl:text>:,;/ </xsl:text>
1319 </xsl:call-template>
1320 <!-- Display only name and title portion in 110 field -->
1321 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1322 <span class="titleportion">
1324 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1325 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1327 <xsl:call-template name="chopPunctuation">
1328 <xsl:with-param name="chopString">
1329 <xsl:call-template name="subfieldSelect">
1330 <xsl:with-param name="codes">cdnt</xsl:with-param>
1331 </xsl:call-template>
1333 </xsl:call-template>
1336 <!-- Display only name and title portion in 111 field -->
1337 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1338 <span class="titleportion">
1340 <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>
1341 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1344 <xsl:call-template name="chopPunctuation">
1345 <xsl:with-param name="chopString">
1346 <xsl:call-template name="subfieldSelect">
1347 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1348 </xsl:call-template>
1350 </xsl:call-template>
1353 <!-- Display only dates in 100 field -->
1354 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1355 <span class="authordates">
1356 <xsl:text>, </xsl:text>
1357 <xsl:call-template name="chopPunctuation">
1358 <xsl:with-param name="chopString">
1359 <xsl:call-template name="subfieldSelect">
1360 <xsl:with-param name="codes">d</xsl:with-param>
1361 </xsl:call-template>
1363 </xsl:call-template>
1368 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1369 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1370 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1371 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1372 <xsl:if test="@tag=710 or @tag=711">
1373 <xsl:call-template name="chopPunctuation">
1374 <xsl:with-param name="chopString">
1375 <xsl:call-template name="subfieldSelect">
1376 <xsl:with-param name="codes">
1378 <xsl:when test="@tag=711">aeq</xsl:when>
1379 <xsl:otherwise>ab</xsl:otherwise>
1382 </xsl:call-template>
1384 <xsl:with-param name="punctuation">
1385 <xsl:text>:,;/ </xsl:text>
1387 </xsl:call-template>
1388 <!-- Display only name and title portion in 711 field -->
1389 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1390 <span class="titleportion">
1392 <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>
1393 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1396 <xsl:call-template name="chopPunctuation">
1397 <xsl:with-param name="chopString">
1398 <xsl:call-template name="subfieldSelect">
1399 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1400 </xsl:call-template>
1402 </xsl:call-template>
1405 <!-- Display only name and title portion in 710 field -->
1406 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1407 <span class="titleportion">
1409 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1410 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1412 <xsl:call-template name="chopPunctuation">
1413 <xsl:with-param name="chopString">
1414 <xsl:call-template name="subfieldSelect">
1415 <xsl:with-param name="codes">cdnt</xsl:with-param>
1416 </xsl:call-template>
1418 </xsl:call-template>
1423 <!-- Display only name portion in 700 field -->
1424 <xsl:if test="@tag=700">
1425 <xsl:call-template name="chopPunctuation">
1426 <xsl:with-param name="chopString">
1427 <xsl:call-template name="subfieldSelect">
1428 <xsl:with-param name="codes">abcq</xsl:with-param>
1429 </xsl:call-template>
1431 </xsl:call-template>
1433 <!-- Display class "authordates" in 700 field -->
1434 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1435 <span class="authordates">
1436 <xsl:text>, </xsl:text>
1437 <xsl:call-template name="chopPunctuation">
1438 <xsl:with-param name="chopString">
1439 <xsl:call-template name="subfieldSelect">
1440 <xsl:with-param name="codes">d</xsl:with-param>
1441 </xsl:call-template>
1443 </xsl:call-template>
1446 <!-- Display class "titleportion" in 700 field -->
1447 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1448 <xsl:if test="@tag=700 and $titleportionfields">
1449 <span class="titleportion">
1450 <xsl:text>. </xsl:text>
1451 <xsl:call-template name="chopPunctuation">
1452 <xsl:with-param name="chopString">
1453 <xsl:call-template name="subfieldSelect">
1454 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1455 </xsl:call-template>
1457 </xsl:call-template>
1464 <!-- add relator code too between brackets-->
1465 <!-- #13383 include relator code j for field 111 -->
1466 <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1467 <span class="relatorcode">
1468 <xsl:text> [</xsl:text>
1470 <xsl:when test="@tag=111 or @tag=711">
1472 <!-- Prefer j over 4 for fields 111 and 711-->
1473 <xsl:when test="marc:subfield[@code='j']">
1474 <xsl:for-each select="marc:subfield[@code='j']">
1475 <xsl:value-of select="."/>
1476 <xsl:if test="position() != last()">, </xsl:if>
1480 <xsl:for-each select="marc:subfield[@code=4]">
1481 <xsl:value-of select="."/>
1482 <xsl:if test="position() != last()">, </xsl:if>
1487 <!-- Prefer e over 4 for fields 111 and 711-->
1488 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1489 <xsl:for-each select="marc:subfield[@code='e']">
1490 <xsl:value-of select="."/>
1491 <xsl:if test="position() != last()">, </xsl:if>
1495 <xsl:for-each select="marc:subfield[@code=4]">
1496 <xsl:value-of select="."/>
1497 <xsl:if test="position() != last()">, </xsl:if>
1501 <xsl:text>]</xsl:text>
1506 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1514 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1515 <xsl:template name="subfieldSelectSubject">
1516 <xsl:param name="codes"/>
1517 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1518 <xsl:param name="subdivCodes"/>
1519 <xsl:param name="subdivDelimiter"/>
1520 <xsl:param name="prefix"/>
1521 <xsl:param name="suffix"/>
1522 <xsl:variable name="str">
1523 <xsl:for-each select="marc:subfield">
1524 <xsl:if test="contains($codes, @code)">
1525 <xsl:if test="contains($subdivCodes, @code)">
1526 <xsl:value-of select="$subdivDelimiter"/>
1528 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1532 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>