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"/>
178 <!--Series: Alternate Graphic Representation (MARC 880) -->
179 <xsl:if test="$display880">
180 <xsl:call-template name="m880Select">
181 <xsl:with-param name="basetags">440,490</xsl:with-param>
182 <xsl:with-param name="codes">av</xsl:with-param>
183 <xsl:with-param name="class">results_summary series</xsl:with-param>
184 <xsl:with-param name="label">Series: </xsl:with-param>
185 <xsl:with-param name="index">se</xsl:with-param>
190 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
191 <span class="results_summary series"><span class="label">Series: </span>
193 <xsl:for-each select="marc:datafield[@tag=440]">
194 <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>
195 <xsl:call-template name="chopPunctuation">
196 <xsl:with-param name="chopString">
197 <xsl:call-template name="subfieldSelect">
198 <xsl:with-param name="codes">av</xsl:with-param>
203 <xsl:call-template name="part"/>
204 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
207 <!-- 490 Series not traced, Ind1 = 0 -->
208 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
209 <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>
210 <xsl:call-template name="chopPunctuation">
211 <xsl:with-param name="chopString">
212 <xsl:call-template name="subfieldSelect">
213 <xsl:with-param name="codes">av</xsl:with-param>
218 <xsl:call-template name="part"/>
219 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
221 <!-- 490 Series traced, Ind1 = 1 -->
222 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
223 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
225 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
226 <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>
227 <xsl:call-template name="chopPunctuation">
228 <xsl:with-param name="chopString">
229 <xsl:call-template name="subfieldSelect">
230 <xsl:with-param name="codes">a_t</xsl:with-param>
237 <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>
238 <xsl:call-template name="chopPunctuation">
239 <xsl:with-param name="chopString">
240 <xsl:call-template name="subfieldSelect">
241 <xsl:with-param name="codes">a_t</xsl:with-param>
246 <xsl:call-template name="part"/>
249 <xsl:text>: </xsl:text>
250 <xsl:value-of select="marc:subfield[@code='v']" />
251 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
259 <xsl:if test="$leader7='s'">
260 <span class="results_summary analytics"><span class="label">Analytics: </span>
263 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
264 <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>
267 <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>
270 <xsl:text>Show analytics</xsl:text>
275 <!-- Volumes of sets and traced series -->
276 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
277 <span class="results_summary volumes"><span class="label">Volumes: </span>
280 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
281 <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>
284 <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>
287 <xsl:text>Show volumes</xsl:text>
293 <xsl:if test="$leader19='c'">
294 <span class="results_summary set"><span class="label">Set: </span>
295 <xsl:for-each select="marc:datafield[@tag=773]">
298 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
299 <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>
302 <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>
305 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
308 <xsl:when test="position()=last()"></xsl:when>
309 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
315 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
316 <xsl:if test="$display880">
317 <xsl:call-template name="m880Select">
318 <xsl:with-param name="basetags">260</xsl:with-param>
319 <xsl:with-param name="codes">abcg</xsl:with-param>
320 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
321 <xsl:with-param name="label">Publisher: </xsl:with-param>
325 <!-- Publisher info and RDA related info from tags 260, 264 -->
327 <xsl:when test="marc:datafield[@tag=264]">
328 <xsl:call-template name="showRDAtag264">
329 <xsl:with-param name="show_url">1</xsl:with-param>
332 <xsl:when test="marc:datafield[@tag=260]">
333 <span class="results_summary publisher"><span class="label">Publisher: </span>
334 <xsl:for-each select="marc:datafield[@tag=260]">
335 <xsl:if test="marc:subfield[@code='a']">
336 <xsl:call-template name="subfieldSelect">
337 <xsl:with-param name="codes">a</xsl:with-param>
340 <xsl:text> </xsl:text>
341 <xsl:if test="marc:subfield[@code='b']">
343 <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>
344 <xsl:call-template name="subfieldSelect">
345 <xsl:with-param name="codes">b</xsl:with-param>
349 <xsl:text> </xsl:text>
350 <xsl:call-template name="chopPunctuation">
351 <xsl:with-param name="chopString">
352 <xsl:call-template name="subfieldSelect">
353 <xsl:with-param name="codes">cg</xsl:with-param>
357 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
363 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
364 <xsl:if test="$display880">
365 <xsl:call-template name="m880Select">
366 <xsl:with-param name="basetags">250</xsl:with-param>
367 <xsl:with-param name="codes">ab</xsl:with-param>
368 <xsl:with-param name="class">results_summary edition</xsl:with-param>
369 <xsl:with-param name="label">Edition: </xsl:with-param>
373 <xsl:if test="marc:datafield[@tag=250]">
374 <span class="results_summary edition"><span class="label">Edition: </span>
375 <xsl:for-each select="marc:datafield[@tag=250]">
376 <xsl:call-template name="chopPunctuation">
377 <xsl:with-param name="chopString">
378 <xsl:call-template name="subfieldSelect">
379 <xsl:with-param name="codes">ab</xsl:with-param>
383 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
388 <!-- Description: Alternate Graphic Representation (MARC 880) -->
389 <xsl:if test="$display880">
390 <xsl:call-template name="m880Select">
391 <xsl:with-param name="basetags">300</xsl:with-param>
392 <xsl:with-param name="codes">abceg</xsl:with-param>
393 <xsl:with-param name="class">results_summary description</xsl:with-param>
394 <xsl:with-param name="label">Description: </xsl:with-param>
398 <xsl:if test="marc:datafield[@tag=300]">
399 <span class="results_summary description"><span class="label">Description: </span>
400 <xsl:for-each select="marc:datafield[@tag=300]">
401 <xsl:call-template name="chopPunctuation">
402 <xsl:with-param name="chopString">
403 <xsl:call-template name="subfieldSelect">
404 <xsl:with-param name="codes">abcefg</xsl:with-param>
408 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
413 <!-- Content Type -->
414 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
415 <span class="results_summary" id="content_type">
416 <xsl:if test="marc:datafield[@tag=336]">
417 <span class="label">Content type: </span>
418 <xsl:for-each select="marc:datafield[@tag=336]">
419 <xsl:call-template name="subfieldSelect">
420 <xsl:with-param name="codes">a</xsl:with-param>
421 <xsl:with-param name="delimeter">, </xsl:with-param>
423 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
426 <xsl:text> </xsl:text>
428 <xsl:if test="marc:datafield[@tag=337]">
429 <span class="label">Media type: </span>
430 <xsl:for-each select="marc:datafield[@tag=337]">
431 <xsl:call-template name="subfieldSelect">
432 <xsl:with-param name="codes">a</xsl:with-param>
433 <xsl:with-param name="delimeter">, </xsl:with-param>
435 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
438 <xsl:text> </xsl:text>
440 <xsl:if test="marc:datafield[@tag=338]">
441 <span class="label">Carrier type: </span>
442 <xsl:for-each select="marc:datafield[@tag=338]">
443 <xsl:call-template name="subfieldSelect">
444 <xsl:with-param name="codes">a</xsl:with-param>
445 <xsl:with-param name="delimeter">, </xsl:with-param>
447 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
454 <xsl:call-template name="showISBNISSN"/>
456 <xsl:if test="marc:datafield[@tag=013]">
457 <span class="results_summary patent_info">
458 <span class="label">Patent information: </span>
459 <xsl:for-each select="marc:datafield[@tag=013]">
460 <xsl:call-template name="subfieldSelect">
461 <xsl:with-param name="codes">acdef</xsl:with-param>
462 <xsl:with-param name="delimeter">, </xsl:with-param>
464 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
469 <xsl:if test="marc:datafield[@tag=088]">
470 <span class="results_summary report_number">
471 <span class="label">Report number: </span>
472 <xsl:for-each select="marc:datafield[@tag=088]">
473 <xsl:call-template name="subfieldSelect">
474 <xsl:with-param name="codes">a</xsl:with-param>
476 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
481 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
482 <xsl:if test="$display880">
483 <xsl:call-template name="m880Select">
484 <xsl:with-param name="basetags">246</xsl:with-param>
485 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
486 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
487 <xsl:with-param name="label">Other title: </xsl:with-param>
491 <xsl:if test="marc:datafield[@tag=246]">
492 <span class="results_summary other_title"><span class="label">Other title: </span>
493 <xsl:for-each select="marc:datafield[@tag=246]">
494 <xsl:call-template name="chopPunctuation">
495 <xsl:with-param name="chopString">
496 <xsl:call-template name="subfieldSelect">
497 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
501 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
503 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
504 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
505 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
506 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
507 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
508 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
509 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
510 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
511 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
514 <xsl:if test="marc:subfield[@code='i']">
515 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
517 <!-- #13386 added separator | -->
518 <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>
523 <xsl:if test="marc:datafield[@tag=242]">
524 <span class="results_summary translated_title"><span class="label">Title translated: </span>
525 <xsl:for-each select="marc:datafield[@tag=242]">
526 <xsl:call-template name="chopPunctuation">
527 <xsl:with-param name="chopString">
528 <xsl:call-template name="subfieldSelect">
529 <xsl:with-param name="codes">abchnp</xsl:with-param>
533 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
538 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
539 <xsl:if test="$display880">
540 <xsl:call-template name="m880Select">
541 <xsl:with-param name="basetags">130,240</xsl:with-param>
542 <xsl:with-param name="codes">adfklmor</xsl:with-param>
543 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
544 <xsl:with-param name="label">Uniform title: </xsl:with-param>
548 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
549 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
550 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
551 <xsl:for-each select="marc:subfield">
552 <xsl:if test="contains('adfghklmnoprst',@code)">
553 <xsl:value-of select="text()"/>
554 <xsl:text> </xsl:text>
557 <xsl:if test="position() != last()">
558 <span class="separator"><xsl:text> | </xsl:text></span>
564 <!-- #13382 Added Related works 700$i -->
565 <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']]">
566 <span class="results_summary related_works"><span class="label">Related works: </span>
567 <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']]">
568 <xsl:variable name="str">
569 <xsl:call-template name="subfieldSelect">
570 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
573 <xsl:call-template name="chopPunctuation">
574 <xsl:with-param name="chopString">
575 <xsl:value-of select="$str"/>
578 <!-- add relator code too between brackets-->
579 <xsl:if test="marc:subfield[@code='4' or @code='e']">
580 <span class="relatorcode">
581 <xsl:text> [</xsl:text>
583 <xsl:when test="marc:subfield[@code='e']">
584 <xsl:for-each select="marc:subfield[@code='e']">
585 <xsl:value-of select="."/>
586 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
590 <xsl:for-each select="marc:subfield[@code='4']">
591 <xsl:value-of select="."/>
592 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
596 <xsl:text>]</xsl:text>
600 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
606 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
607 <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'])]">
608 <span class="results_summary contained_works"><span class="label">Contained works: </span>
609 <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'])]">
610 <xsl:variable name="str">
611 <xsl:call-template name="subfieldSelect">
612 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
615 <xsl:call-template name="chopPunctuation">
616 <xsl:with-param name="chopString">
617 <xsl:value-of select="$str"/>
620 <!-- add relator code too between brackets-->
621 <xsl:if test="marc:subfield[@code='4' or @code='e']">
622 <span class="relatorcode">
623 <xsl:text> [</xsl:text>
625 <xsl:when test="marc:subfield[@code='e']">
626 <xsl:for-each select="marc:subfield[@code='e']">
627 <xsl:value-of select="."/>
628 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
632 <xsl:for-each select="marc:subfield[@code='4']">
633 <xsl:value-of select="."/>
634 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
638 <xsl:text>]</xsl:text>
642 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
649 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
650 <span class="results_summary subjects"><span class="label">Subject(s): </span>
651 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
654 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
655 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
656 <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>
658 <xsl:when test="$TraceSubjectSubdivisions='1'">
659 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
660 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
661 <xsl:with-param name="delimeter"> AND </xsl:with-param>
662 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
663 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
664 <xsl:with-param name="urlencode">1</xsl:with-param>
669 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
671 <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>
675 <xsl:call-template name="chopPunctuation">
676 <xsl:with-param name="chopString">
677 <xsl:call-template name="subfieldSelect">
678 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
679 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
680 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
686 <xsl:if test="marc:subfield[@code=9]">
687 <xsl:text> </xsl:text>
689 <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>
690 <xsl:element name="img">
691 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
692 <xsl:attribute name="alt"></xsl:attribute>
693 <xsl:attribute name="height">15</xsl:attribute>
694 <xsl:attribute name="width">15</xsl:attribute>
700 <xsl:when test="position()=last()"></xsl:when>
701 <xsl:otherwise> | </xsl:otherwise>
709 <xsl:if test="marc:datafield[@tag=655]">
710 <span class="results_summary genre"><span class="label">Genre/Form: </span>
711 <xsl:for-each select="marc:datafield[@tag=655]">
714 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
715 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
717 <xsl:when test="$TraceSubjectSubdivisions='1'">
718 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
719 <xsl:with-param name="codes">avxyz</xsl:with-param>
720 <xsl:with-param name="delimeter"> AND </xsl:with-param>
721 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
722 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
723 <xsl:with-param name="urlencode">1</xsl:with-param>
728 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=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>
731 <xsl:call-template name="subfieldSelect">
732 <xsl:with-param name="codes">avxyz</xsl:with-param>
733 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
734 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
737 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
742 <!-- MARC21 776 Additional Physical Form Entry -->
743 <xsl:if test="marc:datafield[@tag=776]">
744 <span class="results_summary add_physical_form">
745 <span class="label">Additional physical formats: </span>
746 <xsl:for-each select="marc:datafield[@tag=776]">
747 <xsl:variable name="linktext">
749 <xsl:when test="marc:subfield[@code='t']">
750 <xsl:value-of select="marc:subfield[@code='t']"/>
752 <xsl:when test="marc:subfield[@code='a']">
753 <xsl:value-of select="marc:subfield[@code='a']"/>
756 <xsl:text>No title</xsl:text>
760 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
761 <xsl:call-template name="subfieldSelect">
762 <xsl:with-param name="codes">i</xsl:with-param>
764 <xsl:text>: </xsl:text>
767 <xsl:when test="marc:subfield[@code='w']">
769 <xsl:attribute name="href">
770 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
771 <xsl:call-template name="extractControlNumber">
772 <xsl:with-param name="subfieldW">
773 <xsl:value-of select="marc:subfield[@code='w']"/>
777 <xsl:value-of select="$linktext"/>
781 <xsl:value-of select="$linktext"/>
784 <xsl:if test="position() != last()">
785 <xsl:text>; </xsl:text>
791 <!-- DDC classification -->
792 <xsl:if test="marc:datafield[@tag=082]">
793 <span class="results_summary ddc">
794 <span class="label">DDC classification: </span>
795 <xsl:for-each select="marc:datafield[@tag=082]">
796 <xsl:call-template name="subfieldSelect">
797 <xsl:with-param name="codes">a</xsl:with-param>
798 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
801 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
802 <xsl:otherwise> | </xsl:otherwise>
808 <!-- Other classification -->
809 <xsl:if test="marc:datafield[@tag=084]">
810 <span class="results_summary oc">
811 <span class="label">Other classification: </span>
812 <xsl:for-each select="marc:datafield[@tag=084]">
813 <xsl:call-template name="subfieldSelect">
814 <xsl:with-param name="codes">a</xsl:with-param>
815 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
818 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
819 <xsl:otherwise> | </xsl:otherwise>
825 <xsl:if test="marc:datafield[@tag=856]">
826 <span class="results_summary online_resources"><span class="label">Online resources: </span>
827 <xsl:for-each select="marc:datafield[@tag=856]">
828 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
829 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
831 <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')">
832 <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>
834 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
835 <xsl:call-template name="subfieldSelect">
836 <xsl:with-param name="codes">y3z</xsl:with-param>
839 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
841 <xsl:when test="$URLLinkText!=''">
842 <xsl:value-of select="$URLLinkText"/>
845 <xsl:text>Click here to access online</xsl:text>
852 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
853 <xsl:otherwise> | </xsl:otherwise>
859 <xsl:if test="marc:datafield[@tag=505]">
860 <div class="results_summary contents">
862 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
863 <span class="label">Contents:</span>
865 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
866 <span class="label">Incomplete contents:</span>
868 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
869 <span class="label">Partial contents:</span>
872 <xsl:for-each select="marc:datafield[@tag=505]">
873 <div class='contentblock'>
875 <xsl:when test="@ind2=0">
876 <xsl:call-template name="subfieldSelectSpan">
877 <xsl:with-param name="codes">tru</xsl:with-param>
881 <xsl:call-template name="subfieldSelectSpan">
882 <xsl:with-param name="codes">atru</xsl:with-param>
892 <xsl:if test="marc:datafield[@tag=586]">
893 <span class="results_summary awardsnote">
894 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
895 <span class="label">Awards: </span>
897 <xsl:for-each select="marc:datafield[@tag=586]">
898 <xsl:value-of select="marc:subfield[@code='a']"/>
899 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
905 <xsl:if test="marc:datafield[@tag=583]">
906 <xsl:for-each select="marc:datafield[@tag=583]">
907 <xsl:if test="@ind1=1 or @ind1=' '">
908 <span class="results_summary actionnote">
909 <span class="label">Action note: </span>
911 <xsl:when test="marc:subfield[@code='z']">
912 <xsl:value-of select="marc:subfield[@code='z']"/>
915 <xsl:call-template name="subfieldSelect">
916 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
926 <xsl:if test="marc:datafield[@tag=508]">
927 <div class="results_summary prod_credits">
928 <span class="label">Production credits: </span>
929 <xsl:for-each select="marc:datafield[@tag=508]">
930 <xsl:call-template name="subfieldSelectSpan">
931 <xsl:with-param name="codes">a</xsl:with-param>
933 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
939 <xsl:if test="marc:datafield[@tag=773]">
940 <xsl:for-each select="marc:datafield[@tag=773]">
941 <xsl:if test="@ind1 !=1">
942 <span class="results_summary in"><span class="label">
944 <xsl:when test="@ind2=' '">
947 <xsl:when test="@ind2=8">
948 <xsl:if test="marc:subfield[@code='i']">
949 <xsl:value-of select="marc:subfield[@code='i']"/>
954 <xsl:variable name="f773">
955 <xsl:call-template name="chopPunctuation">
956 <xsl:with-param name="chopString">
957 <xsl:call-template name="subfieldSelect">
958 <xsl:with-param name="codes">a_t</xsl:with-param>
964 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
965 <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>
966 <xsl:value-of select="translate($f773, '()', '')"/>
969 <xsl:when test="marc:subfield[@code='0']">
970 <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>
971 <xsl:value-of select="$f773"/>
975 <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>
976 <xsl:value-of select="$f773"/>
980 <xsl:if test="marc:subfield[@code='g']">
981 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
985 <xsl:if test="marc:subfield[@code='n']">
986 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
993 <xsl:if test="marc:datafield[@tag=502]">
994 <span class="results_summary diss_note">
995 <span class="label">Dissertation note: </span>
996 <xsl:for-each select="marc:datafield[@tag=502]">
997 <xsl:call-template name="subfieldSelect">
998 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1001 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1005 <!-- 866 textual holdings -->
1006 <xsl:if test="marc:datafield[@tag=866]">
1007 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
1008 <xsl:for-each select="marc:datafield[@tag=866]">
1009 <xsl:call-template name="subfieldSelect">
1010 <xsl:with-param name="codes">axz</xsl:with-param>
1011 </xsl:call-template>
1012 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1017 <!-- 775 Other Edition -->
1018 <xsl:if test="marc:datafield[@tag=775]">
1019 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1020 <xsl:for-each select="marc:datafield[@tag=775]">
1021 <xsl:variable name="f775">
1022 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1023 <xsl:with-param name="codes">a_t</xsl:with-param>
1024 </xsl:call-template></xsl:with-param></xsl:call-template>
1026 <xsl:if test="marc:subfield[@code='i']">
1027 <xsl:call-template name="subfieldSelect">
1028 <xsl:with-param name="codes">i</xsl:with-param>
1029 </xsl:call-template>
1030 <xsl:text>: </xsl:text>
1034 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1035 <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>
1038 <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>
1041 <xsl:call-template name="subfieldSelect">
1042 <xsl:with-param name="codes">a_t</xsl:with-param>
1043 </xsl:call-template>
1046 <xsl:when test="position()=last()"></xsl:when>
1047 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1054 <xsl:if test="marc:datafield[@tag=780]">
1055 <xsl:for-each select="marc:datafield[@tag=780]">
1056 <xsl:if test="@ind1=0">
1057 <span class="results_summary preceeding_entry">
1059 <xsl:when test="@ind2=0">
1060 <span class="label">Continues:</span>
1062 <xsl:when test="@ind2=1">
1063 <span class="label">Continues in part:</span>
1065 <xsl:when test="@ind2=2">
1066 <span class="label">Supersedes:</span>
1068 <xsl:when test="@ind2=3">
1069 <span class="label">Supersedes in part:</span>
1071 <xsl:when test="@ind2=4">
1072 <span class="label">Formed by the union: ... and: ...</span>
1074 <xsl:when test="@ind2=5">
1075 <span class="label">Absorbed:</span>
1077 <xsl:when test="@ind2=6">
1078 <span class="label">Absorbed in part:</span>
1080 <xsl:when test="@ind2=7">
1081 <span class="label">Separated from:</span>
1084 <xsl:text> </xsl:text>
1085 <xsl:variable name="f780">
1086 <xsl:call-template name="subfieldSelect">
1087 <xsl:with-param name="codes">a_t</xsl:with-param>
1088 </xsl:call-template>
1091 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1092 <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>
1093 <xsl:value-of select="translate($f780, '()', '')"/>
1097 <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>
1098 <xsl:value-of select="translate($f780, '()', '')"/>
1104 <xsl:if test="marc:subfield[@code='n']">
1105 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1113 <xsl:if test="marc:datafield[@tag=785]">
1114 <xsl:for-each select="marc:datafield[@tag=785]">
1115 <span class="results_summary succeeding_entry">
1117 <xsl:when test="@ind2=0">
1118 <span class="label">Continued by:</span>
1120 <xsl:when test="@ind2=1">
1121 <span class="label">Continued in part by:</span>
1123 <xsl:when test="@ind2=2">
1124 <span class="label">Superseded by:</span>
1126 <xsl:when test="@ind2=3">
1127 <span class="label">Superseded in part by:</span>
1129 <xsl:when test="@ind2=4">
1130 <span class="label">Absorbed by:</span>
1132 <xsl:when test="@ind2=5">
1133 <span class="label">Absorbed in part by:</span>
1135 <xsl:when test="@ind2=6">
1136 <span class="label">Split into .. and ...:</span>
1138 <xsl:when test="@ind2=7">
1139 <span class="label">Merged with ... to form ...</span>
1141 <xsl:when test="@ind2=8">
1142 <span class="label">Changed back to:</span>
1145 <xsl:text> </xsl:text>
1146 <xsl:variable name="f785">
1147 <xsl:call-template name="subfieldSelect">
1148 <xsl:with-param name="codes">a_t</xsl:with-param>
1149 </xsl:call-template>
1153 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1154 <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>
1155 <xsl:value-of select="translate($f785, '()', '')"/>
1159 <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>
1160 <xsl:value-of select="translate($f785, '()', '')"/>
1169 <xsl:if test="$OPACBaseURL!=''">
1170 <span class="results_summary"><span class="label">OPAC view: </span>
1171 <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>.
1177 <xsl:template name="nameABCQ">
1178 <xsl:call-template name="chopPunctuation">
1179 <xsl:with-param name="chopString">
1180 <xsl:call-template name="subfieldSelect">
1181 <xsl:with-param name="codes">abcq</xsl:with-param>
1182 </xsl:call-template>
1184 <xsl:with-param name="punctuation">
1185 <xsl:text>:,;/ </xsl:text>
1187 </xsl:call-template>
1190 <xsl:template name="nameABCDN">
1191 <xsl:call-template name="chopPunctuation">
1192 <xsl:with-param name="chopString">
1193 <xsl:call-template name="subfieldSelect">
1194 <xsl:with-param name="codes">abcdn</xsl:with-param>
1195 </xsl:call-template>
1197 <xsl:with-param name="punctuation">
1198 <xsl:text>:,;/ </xsl:text>
1200 </xsl:call-template>
1203 <xsl:template name="nameACDEQ">
1204 <xsl:call-template name="subfieldSelect">
1205 <xsl:with-param name="codes">acdeq</xsl:with-param>
1206 </xsl:call-template>
1209 <xsl:template name="part">
1210 <xsl:variable name="partNumber">
1211 <xsl:call-template name="specialSubfieldSelect">
1212 <xsl:with-param name="axis">n</xsl:with-param>
1213 <xsl:with-param name="anyCodes">n</xsl:with-param>
1214 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1215 </xsl:call-template>
1217 <xsl:variable name="partName">
1218 <xsl:call-template name="specialSubfieldSelect">
1219 <xsl:with-param name="axis">p</xsl:with-param>
1220 <xsl:with-param name="anyCodes">p</xsl:with-param>
1221 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1222 </xsl:call-template>
1224 <xsl:if test="string-length(normalize-space($partNumber))">
1225 <xsl:call-template name="chopPunctuation">
1226 <xsl:with-param name="chopString" select="$partNumber"/>
1227 </xsl:call-template>
1229 <xsl:if test="string-length(normalize-space($partName))">
1230 <xsl:call-template name="chopPunctuation">
1231 <xsl:with-param name="chopString" select="$partName"/>
1232 </xsl:call-template>
1236 <xsl:template name="specialSubfieldSelect">
1237 <xsl:param name="anyCodes"/>
1238 <xsl:param name="axis"/>
1239 <xsl:param name="beforeCodes"/>
1240 <xsl:param name="afterCodes"/>
1241 <xsl:variable name="str">
1242 <xsl:for-each select="marc:subfield">
1243 <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])">
1244 <xsl:value-of select="text()"/>
1245 <xsl:text> </xsl:text>
1249 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1252 <xsl:template name="showAuthor">
1253 <xsl:param name="authorfield"/>
1254 <xsl:param name="UseAuthoritiesForTracings"/>
1255 <xsl:if test="count($authorfield)>0">
1257 <xsl:for-each select="$authorfield">
1259 <xsl:when test="position()>1"/>
1261 <xsl:when test="@tag<700">By: </xsl:when>
1262 <!--#13382 Changed Additional author to contributor -->
1263 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1267 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1268 <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>
1271 <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>
1275 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1277 <xsl:call-template name="chopPunctuation">
1278 <xsl:with-param name="chopString">
1279 <xsl:call-template name="subfieldSelect">
1280 <xsl:with-param name="codes">
1282 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1283 <xsl:when test="@tag=111">aeq</xsl:when>
1284 <xsl:when test="@tag=110">ab</xsl:when>
1285 <xsl:otherwise>abcjq</xsl:otherwise>
1288 </xsl:call-template>
1290 <xsl:with-param name="punctuation">
1291 <xsl:text>:,;/ </xsl:text>
1293 </xsl:call-template>
1294 <!-- Display only name and title portion in 110 field -->
1295 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1296 <span class="titleportion">
1298 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1299 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1301 <xsl:call-template name="chopPunctuation">
1302 <xsl:with-param name="chopString">
1303 <xsl:call-template name="subfieldSelect">
1304 <xsl:with-param name="codes">cdnt</xsl:with-param>
1305 </xsl:call-template>
1307 </xsl:call-template>
1310 <!-- Display only name and title portion in 111 field -->
1311 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1312 <span class="titleportion">
1314 <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>
1315 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1318 <xsl:call-template name="chopPunctuation">
1319 <xsl:with-param name="chopString">
1320 <xsl:call-template name="subfieldSelect">
1321 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1322 </xsl:call-template>
1324 </xsl:call-template>
1327 <!-- Display only dates in 100 field -->
1328 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1329 <span class="authordates">
1330 <xsl:text>, </xsl:text>
1331 <xsl:call-template name="chopPunctuation">
1332 <xsl:with-param name="chopString">
1333 <xsl:call-template name="subfieldSelect">
1334 <xsl:with-param name="codes">d</xsl:with-param>
1335 </xsl:call-template>
1337 </xsl:call-template>
1342 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1343 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1344 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1345 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1346 <xsl:if test="@tag=710 or @tag=711">
1347 <xsl:call-template name="chopPunctuation">
1348 <xsl:with-param name="chopString">
1349 <xsl:call-template name="subfieldSelect">
1350 <xsl:with-param name="codes">
1352 <xsl:when test="@tag=711">aeq</xsl:when>
1353 <xsl:otherwise>ab</xsl:otherwise>
1356 </xsl:call-template>
1358 <xsl:with-param name="punctuation">
1359 <xsl:text>:,;/ </xsl:text>
1361 </xsl:call-template>
1362 <!-- Display only name and title portion in 711 field -->
1363 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1364 <span class="titleportion">
1366 <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>
1367 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1370 <xsl:call-template name="chopPunctuation">
1371 <xsl:with-param name="chopString">
1372 <xsl:call-template name="subfieldSelect">
1373 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1374 </xsl:call-template>
1376 </xsl:call-template>
1379 <!-- Display only name and title portion in 710 field -->
1380 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1381 <span class="titleportion">
1383 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1384 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1386 <xsl:call-template name="chopPunctuation">
1387 <xsl:with-param name="chopString">
1388 <xsl:call-template name="subfieldSelect">
1389 <xsl:with-param name="codes">cdnt</xsl:with-param>
1390 </xsl:call-template>
1392 </xsl:call-template>
1397 <!-- Display only name portion in 700 field -->
1398 <xsl:if test="@tag=700">
1399 <xsl:call-template name="chopPunctuation">
1400 <xsl:with-param name="chopString">
1401 <xsl:call-template name="subfieldSelect">
1402 <xsl:with-param name="codes">abcq</xsl:with-param>
1403 </xsl:call-template>
1405 </xsl:call-template>
1407 <!-- Display class "authordates" in 700 field -->
1408 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1409 <span class="authordates">
1410 <xsl:text>, </xsl:text>
1411 <xsl:call-template name="chopPunctuation">
1412 <xsl:with-param name="chopString">
1413 <xsl:call-template name="subfieldSelect">
1414 <xsl:with-param name="codes">d</xsl:with-param>
1415 </xsl:call-template>
1417 </xsl:call-template>
1420 <!-- Display class "titleportion" in 700 field -->
1421 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1422 <xsl:if test="@tag=700 and $titleportionfields">
1423 <span class="titleportion">
1424 <xsl:text>. </xsl:text>
1425 <xsl:call-template name="chopPunctuation">
1426 <xsl:with-param name="chopString">
1427 <xsl:call-template name="subfieldSelect">
1428 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1429 </xsl:call-template>
1431 </xsl:call-template>
1438 <!-- add relator code too between brackets-->
1439 <!-- #13383 include relator code j for field 111 -->
1440 <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'][. != ''])">
1441 <span class="relatorcode">
1442 <xsl:text> [</xsl:text>
1444 <xsl:when test="@tag=111 or @tag=711">
1446 <!-- Prefer j over 4 for fields 111 and 711-->
1447 <xsl:when test="marc:subfield[@code='j']">
1448 <xsl:for-each select="marc:subfield[@code='j']">
1449 <xsl:value-of select="."/>
1450 <xsl:if test="position() != last()">, </xsl:if>
1454 <xsl:for-each select="marc:subfield[@code=4]">
1455 <xsl:value-of select="."/>
1456 <xsl:if test="position() != last()">, </xsl:if>
1461 <!-- Prefer e over 4 for fields 111 and 711-->
1462 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1463 <xsl:for-each select="marc:subfield[@code='e']">
1464 <xsl:value-of select="."/>
1465 <xsl:if test="position() != last()">, </xsl:if>
1469 <xsl:for-each select="marc:subfield[@code=4]">
1470 <xsl:value-of select="."/>
1471 <xsl:if test="position() != last()">, </xsl:if>
1475 <xsl:text>]</xsl:text>
1480 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1488 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1489 <xsl:template name="subfieldSelectSubject">
1490 <xsl:param name="codes"/>
1491 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1492 <xsl:param name="subdivCodes"/>
1493 <xsl:param name="subdivDelimiter"/>
1494 <xsl:param name="prefix"/>
1495 <xsl:param name="suffix"/>
1496 <xsl:param name="urlencode"/>
1497 <xsl:variable name="str">
1498 <xsl:for-each select="marc:subfield">
1499 <xsl:if test="contains($codes, @code)">
1500 <xsl:if test="contains($subdivCodes, @code)">
1501 <xsl:value-of select="$subdivDelimiter"/>
1503 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1508 <xsl:when test="$urlencode=1">
1509 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1512 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>