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]">
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>
254 <xsl:for-each select="marc:datafield[@tag=830]">
256 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
257 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
258 <xsl:call-template name="chopPunctuation">
259 <xsl:with-param name="chopString">
260 <xsl:call-template name="subfieldSelect">
261 <xsl:with-param name="codes">a_t</xsl:with-param>
268 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
269 <xsl:call-template name="chopPunctuation">
270 <xsl:with-param name="chopString">
271 <xsl:call-template name="subfieldSelect">
272 <xsl:with-param name="codes">a_t</xsl:with-param>
277 <xsl:call-template name="part"/>
280 <xsl:text>: </xsl:text>
281 <xsl:value-of select="marc:subfield[@code='v']" />
282 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
290 <xsl:if test="$leader7='s'">
291 <span class="results_summary analytics"><span class="label">Analytics: </span>
294 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
295 <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>
298 <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>
301 <xsl:text>Show analytics</xsl:text>
306 <!-- Volumes of sets and traced series -->
307 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
308 <span class="results_summary volumes"><span class="label">Volumes: </span>
311 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
312 <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>
315 <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>
318 <xsl:text>Show volumes</xsl:text>
324 <xsl:if test="$leader19='c'">
325 <span class="results_summary set"><span class="label">Set: </span>
326 <xsl:for-each select="marc:datafield[@tag=773]">
329 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
330 <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>
333 <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>
336 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
339 <xsl:when test="position()=last()"></xsl:when>
340 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
346 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
347 <xsl:if test="$display880">
348 <xsl:call-template name="m880Select">
349 <xsl:with-param name="basetags">260</xsl:with-param>
350 <xsl:with-param name="codes">abcg</xsl:with-param>
351 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
352 <xsl:with-param name="label">Publisher: </xsl:with-param>
356 <!-- Publisher info and RDA related info from tags 260, 264 -->
358 <xsl:when test="marc:datafield[@tag=264]">
359 <xsl:call-template name="showRDAtag264">
360 <xsl:with-param name="show_url">1</xsl:with-param>
363 <xsl:when test="marc:datafield[@tag=260]">
364 <span class="results_summary publisher"><span class="label">Publisher: </span>
365 <xsl:for-each select="marc:datafield[@tag=260]">
366 <xsl:if test="marc:subfield[@code='a']">
367 <xsl:call-template name="subfieldSelect">
368 <xsl:with-param name="codes">a</xsl:with-param>
371 <xsl:text> </xsl:text>
372 <xsl:if test="marc:subfield[@code='b']">
374 <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>
375 <xsl:call-template name="subfieldSelect">
376 <xsl:with-param name="codes">b</xsl:with-param>
380 <xsl:text> </xsl:text>
381 <xsl:call-template name="chopPunctuation">
382 <xsl:with-param name="chopString">
383 <xsl:call-template name="subfieldSelect">
384 <xsl:with-param name="codes">cg</xsl:with-param>
388 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
394 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
395 <xsl:if test="$display880">
396 <xsl:call-template name="m880Select">
397 <xsl:with-param name="basetags">250</xsl:with-param>
398 <xsl:with-param name="codes">ab</xsl:with-param>
399 <xsl:with-param name="class">results_summary edition</xsl:with-param>
400 <xsl:with-param name="label">Edition: </xsl:with-param>
404 <xsl:if test="marc:datafield[@tag=250]">
405 <span class="results_summary edition"><span class="label">Edition: </span>
406 <xsl:for-each select="marc:datafield[@tag=250]">
407 <xsl:call-template name="chopPunctuation">
408 <xsl:with-param name="chopString">
409 <xsl:call-template name="subfieldSelect">
410 <xsl:with-param name="codes">ab</xsl:with-param>
414 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
419 <!-- Description: Alternate Graphic Representation (MARC 880) -->
420 <xsl:if test="$display880">
421 <xsl:call-template name="m880Select">
422 <xsl:with-param name="basetags">300</xsl:with-param>
423 <xsl:with-param name="codes">abceg</xsl:with-param>
424 <xsl:with-param name="class">results_summary description</xsl:with-param>
425 <xsl:with-param name="label">Description: </xsl:with-param>
429 <xsl:if test="marc:datafield[@tag=300]">
430 <span class="results_summary description"><span class="label">Description: </span>
431 <xsl:for-each select="marc:datafield[@tag=300]">
432 <xsl:call-template name="chopPunctuation">
433 <xsl:with-param name="chopString">
434 <xsl:call-template name="subfieldSelect">
435 <xsl:with-param name="codes">abcefg</xsl:with-param>
439 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
444 <!-- Content Type -->
445 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
446 <span class="results_summary" id="content_type">
447 <xsl:if test="marc:datafield[@tag=336]">
448 <span class="label">Content type: </span>
449 <xsl:for-each select="marc:datafield[@tag=336]">
450 <xsl:call-template name="subfieldSelect">
451 <xsl:with-param name="codes">a</xsl:with-param>
452 <xsl:with-param name="delimeter">, </xsl:with-param>
454 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
457 <xsl:text> </xsl:text>
459 <xsl:if test="marc:datafield[@tag=337]">
460 <span class="label">Media type: </span>
461 <xsl:for-each select="marc:datafield[@tag=337]">
462 <xsl:call-template name="subfieldSelect">
463 <xsl:with-param name="codes">a</xsl:with-param>
464 <xsl:with-param name="delimeter">, </xsl:with-param>
466 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
469 <xsl:text> </xsl:text>
471 <xsl:if test="marc:datafield[@tag=338]">
472 <span class="label">Carrier type: </span>
473 <xsl:for-each select="marc:datafield[@tag=338]">
474 <xsl:call-template name="subfieldSelect">
475 <xsl:with-param name="codes">a</xsl:with-param>
476 <xsl:with-param name="delimeter">, </xsl:with-param>
478 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
485 <xsl:call-template name="showISBNISSN"/>
487 <xsl:if test="marc:datafield[@tag=013]">
488 <span class="results_summary patent_info">
489 <span class="label">Patent information: </span>
490 <xsl:for-each select="marc:datafield[@tag=013]">
491 <xsl:call-template name="subfieldSelect">
492 <xsl:with-param name="codes">acdef</xsl:with-param>
493 <xsl:with-param name="delimeter">, </xsl:with-param>
495 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
500 <xsl:if test="marc:datafield[@tag=088]">
501 <span class="results_summary report_number">
502 <span class="label">Report number: </span>
503 <xsl:for-each select="marc:datafield[@tag=088]">
504 <xsl:call-template name="subfieldSelect">
505 <xsl:with-param name="codes">a</xsl:with-param>
507 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
512 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
513 <xsl:if test="$display880">
514 <xsl:call-template name="m880Select">
515 <xsl:with-param name="basetags">246</xsl:with-param>
516 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
517 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
518 <xsl:with-param name="label">Other title: </xsl:with-param>
522 <xsl:if test="marc:datafield[@tag=246]">
523 <span class="results_summary other_title"><span class="label">Other title: </span>
524 <xsl:for-each select="marc:datafield[@tag=246]">
525 <xsl:call-template name="chopPunctuation">
526 <xsl:with-param name="chopString">
527 <xsl:call-template name="subfieldSelect">
528 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
532 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
534 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
535 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
536 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
537 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
538 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
539 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
540 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
541 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
542 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
545 <xsl:if test="marc:subfield[@code='i']">
546 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
548 <!-- #13386 added separator | -->
549 <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>
554 <xsl:if test="marc:datafield[@tag=242]">
555 <span class="results_summary translated_title"><span class="label">Title translated: </span>
556 <xsl:for-each select="marc:datafield[@tag=242]">
557 <xsl:call-template name="chopPunctuation">
558 <xsl:with-param name="chopString">
559 <xsl:call-template name="subfieldSelect">
560 <xsl:with-param name="codes">abchnp</xsl:with-param>
564 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
569 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
570 <xsl:if test="$display880">
571 <xsl:call-template name="m880Select">
572 <xsl:with-param name="basetags">130,240</xsl:with-param>
573 <xsl:with-param name="codes">adfklmor</xsl:with-param>
574 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
575 <xsl:with-param name="label">Uniform title: </xsl:with-param>
579 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
580 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
581 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
582 <xsl:for-each select="marc:subfield">
583 <xsl:if test="contains('adfghklmnoprst',@code)">
584 <xsl:value-of select="text()"/>
585 <xsl:text> </xsl:text>
588 <xsl:if test="position() != last()">
589 <span class="separator"><xsl:text> | </xsl:text></span>
595 <!-- #13382 Added Related works 700$i -->
596 <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']]">
597 <span class="results_summary related_works"><span class="label">Related works: </span>
598 <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']]">
599 <xsl:variable name="str">
600 <xsl:call-template name="subfieldSelect">
601 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
604 <xsl:call-template name="chopPunctuation">
605 <xsl:with-param name="chopString">
606 <xsl:value-of select="$str"/>
609 <!-- add relator code too between brackets-->
610 <xsl:if test="marc:subfield[@code='4' or @code='e']">
611 <span class="relatorcode">
612 <xsl:text> [</xsl:text>
614 <xsl:when test="marc:subfield[@code='e']">
615 <xsl:for-each select="marc:subfield[@code='e']">
616 <xsl:value-of select="."/>
617 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
621 <xsl:for-each select="marc:subfield[@code='4']">
622 <xsl:value-of select="."/>
623 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
627 <xsl:text>]</xsl:text>
631 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
637 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
638 <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'])]">
639 <span class="results_summary contained_works"><span class="label">Contained works: </span>
640 <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'])]">
641 <xsl:variable name="str">
642 <xsl:call-template name="subfieldSelect">
643 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
646 <xsl:call-template name="chopPunctuation">
647 <xsl:with-param name="chopString">
648 <xsl:value-of select="$str"/>
651 <!-- add relator code too between brackets-->
652 <xsl:if test="marc:subfield[@code='4' or @code='e']">
653 <span class="relatorcode">
654 <xsl:text> [</xsl:text>
656 <xsl:when test="marc:subfield[@code='e']">
657 <xsl:for-each select="marc:subfield[@code='e']">
658 <xsl:value-of select="."/>
659 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
663 <xsl:for-each select="marc:subfield[@code='4']">
664 <xsl:value-of select="."/>
665 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
669 <xsl:text>]</xsl:text>
673 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
680 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
681 <span class="results_summary subjects"><span class="label">Subject(s): </span>
682 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
685 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
686 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
687 <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>
689 <xsl:when test="$TraceSubjectSubdivisions='1'">
690 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
691 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
692 <xsl:with-param name="delimeter"> AND </xsl:with-param>
693 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
694 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
695 <xsl:with-param name="urlencode">1</xsl:with-param>
700 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
702 <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>
706 <xsl:call-template name="chopPunctuation">
707 <xsl:with-param name="chopString">
708 <xsl:call-template name="subfieldSelect">
709 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
710 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
711 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
717 <xsl:if test="marc:subfield[@code=9]">
718 <xsl:text> </xsl:text>
720 <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>
721 <xsl:element name="img">
722 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
723 <xsl:attribute name="alt"></xsl:attribute>
724 <xsl:attribute name="height">15</xsl:attribute>
725 <xsl:attribute name="width">15</xsl:attribute>
731 <xsl:when test="position()=last()"></xsl:when>
732 <xsl:otherwise> | </xsl:otherwise>
740 <xsl:if test="marc:datafield[@tag=655]">
741 <span class="results_summary genre"><span class="label">Genre/Form: </span>
742 <xsl:for-each select="marc:datafield[@tag=655]">
745 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
746 <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>
748 <xsl:when test="$TraceSubjectSubdivisions='1'">
749 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
750 <xsl:with-param name="codes">avxyz</xsl:with-param>
751 <xsl:with-param name="delimeter"> AND </xsl:with-param>
752 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
753 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
754 <xsl:with-param name="urlencode">1</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>
769 <xsl:if test="marc:subfield[@code=9]">
770 <xsl:text> </xsl:text>
772 <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>
773 <xsl:element name="img">
774 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
775 <xsl:attribute name="alt"></xsl:attribute>
776 <xsl:attribute name="height">15</xsl:attribute>
777 <xsl:attribute name="width">15</xsl:attribute>
781 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
786 <!-- MARC21 776 Additional Physical Form Entry -->
787 <xsl:if test="marc:datafield[@tag=776]">
788 <span class="results_summary add_physical_form">
789 <span class="label">Additional physical formats: </span>
790 <xsl:for-each select="marc:datafield[@tag=776]">
791 <xsl:variable name="linktext">
793 <xsl:when test="marc:subfield[@code='t']">
794 <xsl:value-of select="marc:subfield[@code='t']"/>
796 <xsl:when test="marc:subfield[@code='a']">
797 <xsl:value-of select="marc:subfield[@code='a']"/>
800 <xsl:text>No title</xsl:text>
804 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
805 <xsl:call-template name="subfieldSelect">
806 <xsl:with-param name="codes">i</xsl:with-param>
808 <xsl:text>: </xsl:text>
811 <xsl:when test="marc:subfield[@code='w']">
813 <xsl:attribute name="href">
814 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
815 <xsl:call-template name="extractControlNumber">
816 <xsl:with-param name="subfieldW">
817 <xsl:value-of select="marc:subfield[@code='w']"/>
821 <xsl:value-of select="$linktext"/>
825 <xsl:value-of select="$linktext"/>
828 <xsl:if test="position() != last()">
829 <xsl:text>; </xsl:text>
835 <!-- DDC classification -->
836 <xsl:if test="marc:datafield[@tag=082]">
837 <span class="results_summary ddc">
838 <span class="label">DDC classification: </span>
839 <xsl:for-each select="marc:datafield[@tag=082]">
840 <xsl:call-template name="subfieldSelect">
841 <xsl:with-param name="codes">a</xsl:with-param>
842 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
845 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
846 <xsl:otherwise> | </xsl:otherwise>
852 <!-- Other classification -->
853 <xsl:if test="marc:datafield[@tag=084]">
854 <span class="results_summary oc">
855 <span class="label">Other classification: </span>
856 <xsl:for-each select="marc:datafield[@tag=084]">
857 <xsl:call-template name="subfieldSelect">
858 <xsl:with-param name="codes">a</xsl:with-param>
859 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
862 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
863 <xsl:otherwise> | </xsl:otherwise>
869 <xsl:if test="marc:datafield[@tag=856]">
870 <span class="results_summary online_resources"><span class="label">Online resources: </span>
871 <xsl:for-each select="marc:datafield[@tag=856]">
872 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
873 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
875 <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')">
876 <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>
878 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
879 <xsl:call-template name="subfieldSelect">
880 <xsl:with-param name="codes">y3z</xsl:with-param>
883 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
885 <xsl:when test="$URLLinkText!=''">
886 <xsl:value-of select="$URLLinkText"/>
889 <xsl:text>Click here to access online</xsl:text>
896 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
897 <xsl:otherwise> | </xsl:otherwise>
903 <xsl:if test="marc:datafield[@tag=505]">
904 <div class="results_summary contents">
906 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
907 <span class="label">Contents:</span>
909 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
910 <span class="label">Incomplete contents:</span>
912 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
913 <span class="label">Partial contents:</span>
916 <xsl:for-each select="marc:datafield[@tag=505]">
917 <div class='contentblock'>
919 <xsl:when test="@ind2=0">
920 <xsl:call-template name="subfieldSelectSpan">
921 <xsl:with-param name="codes">tru</xsl:with-param>
925 <xsl:call-template name="subfieldSelectSpan">
926 <xsl:with-param name="codes">atru</xsl:with-param>
936 <xsl:if test="marc:datafield[@tag=586]">
937 <span class="results_summary awardsnote">
938 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
939 <span class="label">Awards: </span>
941 <xsl:for-each select="marc:datafield[@tag=586]">
942 <xsl:value-of select="marc:subfield[@code='a']"/>
943 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
949 <xsl:if test="marc:datafield[@tag=583]">
950 <xsl:for-each select="marc:datafield[@tag=583]">
951 <xsl:if test="@ind1=1 or @ind1=' '">
952 <span class="results_summary actionnote">
953 <span class="label">Action note: </span>
955 <xsl:when test="marc:subfield[@code='z']">
956 <xsl:value-of select="marc:subfield[@code='z']"/>
959 <xsl:call-template name="subfieldSelect">
960 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
970 <xsl:if test="marc:datafield[@tag=508]">
971 <div class="results_summary prod_credits">
972 <span class="label">Production credits: </span>
973 <xsl:for-each select="marc:datafield[@tag=508]">
974 <xsl:call-template name="subfieldSelectSpan">
975 <xsl:with-param name="codes">a</xsl:with-param>
977 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
983 <xsl:if test="marc:datafield[@tag=773]">
984 <xsl:for-each select="marc:datafield[@tag=773]">
985 <xsl:if test="@ind1 !=1">
986 <span class="results_summary in"><span class="label">
988 <xsl:when test="@ind2=' '">
991 <xsl:when test="@ind2=8">
992 <xsl:if test="marc:subfield[@code='i']">
993 <xsl:value-of select="marc:subfield[@code='i']"/>
998 <xsl:variable name="f773">
999 <xsl:call-template name="chopPunctuation">
1000 <xsl:with-param name="chopString">
1001 <xsl:call-template name="subfieldSelect">
1002 <xsl:with-param name="codes">a_t</xsl:with-param>
1003 </xsl:call-template>
1005 </xsl:call-template>
1008 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1009 <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>
1010 <xsl:value-of select="translate($f773, '()', '')"/>
1013 <xsl:when test="marc:subfield[@code='0']">
1014 <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>
1015 <xsl:value-of select="$f773"/>
1019 <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>
1020 <xsl:value-of select="$f773"/>
1024 <xsl:if test="marc:subfield[@code='g']">
1025 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1029 <xsl:if test="marc:subfield[@code='n']">
1030 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1037 <xsl:if test="marc:datafield[@tag=502]">
1038 <span class="results_summary diss_note">
1039 <span class="label">Dissertation note: </span>
1040 <xsl:for-each select="marc:datafield[@tag=502]">
1041 <xsl:call-template name="subfieldSelect">
1042 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1043 </xsl:call-template>
1045 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1049 <!-- 866 textual holdings -->
1050 <xsl:if test="marc:datafield[@tag=866]">
1051 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
1052 <xsl:for-each select="marc:datafield[@tag=866]">
1053 <xsl:call-template name="subfieldSelect">
1054 <xsl:with-param name="codes">axz</xsl:with-param>
1055 </xsl:call-template>
1056 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1061 <!-- 775 Other Edition -->
1062 <xsl:if test="marc:datafield[@tag=775]">
1063 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1064 <xsl:for-each select="marc:datafield[@tag=775]">
1065 <xsl:variable name="f775">
1066 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1067 <xsl:with-param name="codes">a_t</xsl:with-param>
1068 </xsl:call-template></xsl:with-param></xsl:call-template>
1070 <xsl:if test="marc:subfield[@code='i']">
1071 <xsl:call-template name="subfieldSelect">
1072 <xsl:with-param name="codes">i</xsl:with-param>
1073 </xsl:call-template>
1074 <xsl:text>: </xsl:text>
1078 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1079 <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>
1082 <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>
1085 <xsl:call-template name="subfieldSelect">
1086 <xsl:with-param name="codes">a_t</xsl:with-param>
1087 </xsl:call-template>
1090 <xsl:when test="position()=last()"></xsl:when>
1091 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1098 <xsl:if test="marc:datafield[@tag=780]">
1099 <xsl:for-each select="marc:datafield[@tag=780]">
1100 <xsl:if test="@ind1=0">
1101 <span class="results_summary preceeding_entry">
1103 <xsl:when test="@ind2=0">
1104 <span class="label">Continues:</span>
1106 <xsl:when test="@ind2=1">
1107 <span class="label">Continues in part:</span>
1109 <xsl:when test="@ind2=2">
1110 <span class="label">Supersedes:</span>
1112 <xsl:when test="@ind2=3">
1113 <span class="label">Supersedes in part:</span>
1115 <xsl:when test="@ind2=4">
1116 <span class="label">Formed by the union: ... and: ...</span>
1118 <xsl:when test="@ind2=5">
1119 <span class="label">Absorbed:</span>
1121 <xsl:when test="@ind2=6">
1122 <span class="label">Absorbed in part:</span>
1124 <xsl:when test="@ind2=7">
1125 <span class="label">Separated from:</span>
1128 <xsl:text> </xsl:text>
1129 <xsl:variable name="f780">
1130 <xsl:call-template name="subfieldSelect">
1131 <xsl:with-param name="codes">a_t</xsl:with-param>
1132 </xsl:call-template>
1135 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1136 <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>
1137 <xsl:value-of select="translate($f780, '()', '')"/>
1141 <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>
1142 <xsl:value-of select="translate($f780, '()', '')"/>
1148 <xsl:if test="marc:subfield[@code='n']">
1149 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1157 <xsl:if test="marc:datafield[@tag=785]">
1158 <xsl:for-each select="marc:datafield[@tag=785]">
1159 <span class="results_summary succeeding_entry">
1161 <xsl:when test="@ind2=0">
1162 <span class="label">Continued by:</span>
1164 <xsl:when test="@ind2=1">
1165 <span class="label">Continued in part by:</span>
1167 <xsl:when test="@ind2=2">
1168 <span class="label">Superseded by:</span>
1170 <xsl:when test="@ind2=3">
1171 <span class="label">Superseded in part by:</span>
1173 <xsl:when test="@ind2=4">
1174 <span class="label">Absorbed by:</span>
1176 <xsl:when test="@ind2=5">
1177 <span class="label">Absorbed in part by:</span>
1179 <xsl:when test="@ind2=6">
1180 <span class="label">Split into .. and ...:</span>
1182 <xsl:when test="@ind2=7">
1183 <span class="label">Merged with ... to form ...</span>
1185 <xsl:when test="@ind2=8">
1186 <span class="label">Changed back to:</span>
1189 <xsl:text> </xsl:text>
1190 <xsl:variable name="f785">
1191 <xsl:call-template name="subfieldSelect">
1192 <xsl:with-param name="codes">a_t</xsl:with-param>
1193 </xsl:call-template>
1197 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1198 <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>
1199 <xsl:value-of select="translate($f785, '()', '')"/>
1203 <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>
1204 <xsl:value-of select="translate($f785, '()', '')"/>
1213 <xsl:if test="$OPACBaseURL!=''">
1214 <span class="results_summary"><span class="label">OPAC view: </span>
1215 <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>.
1221 <xsl:template name="nameABCQ">
1222 <xsl:call-template name="chopPunctuation">
1223 <xsl:with-param name="chopString">
1224 <xsl:call-template name="subfieldSelect">
1225 <xsl:with-param name="codes">abcq</xsl:with-param>
1226 </xsl:call-template>
1228 <xsl:with-param name="punctuation">
1229 <xsl:text>:,;/ </xsl:text>
1231 </xsl:call-template>
1234 <xsl:template name="nameABCDN">
1235 <xsl:call-template name="chopPunctuation">
1236 <xsl:with-param name="chopString">
1237 <xsl:call-template name="subfieldSelect">
1238 <xsl:with-param name="codes">abcdn</xsl:with-param>
1239 </xsl:call-template>
1241 <xsl:with-param name="punctuation">
1242 <xsl:text>:,;/ </xsl:text>
1244 </xsl:call-template>
1247 <xsl:template name="nameACDEQ">
1248 <xsl:call-template name="subfieldSelect">
1249 <xsl:with-param name="codes">acdeq</xsl:with-param>
1250 </xsl:call-template>
1253 <xsl:template name="part">
1254 <xsl:variable name="partNumber">
1255 <xsl:call-template name="specialSubfieldSelect">
1256 <xsl:with-param name="axis">n</xsl:with-param>
1257 <xsl:with-param name="anyCodes">n</xsl:with-param>
1258 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1259 </xsl:call-template>
1261 <xsl:variable name="partName">
1262 <xsl:call-template name="specialSubfieldSelect">
1263 <xsl:with-param name="axis">p</xsl:with-param>
1264 <xsl:with-param name="anyCodes">p</xsl:with-param>
1265 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1266 </xsl:call-template>
1268 <xsl:if test="string-length(normalize-space($partNumber))">
1269 <xsl:call-template name="chopPunctuation">
1270 <xsl:with-param name="chopString" select="$partNumber"/>
1271 </xsl:call-template>
1273 <xsl:if test="string-length(normalize-space($partName))">
1274 <xsl:call-template name="chopPunctuation">
1275 <xsl:with-param name="chopString" select="$partName"/>
1276 </xsl:call-template>
1280 <xsl:template name="specialSubfieldSelect">
1281 <xsl:param name="anyCodes"/>
1282 <xsl:param name="axis"/>
1283 <xsl:param name="beforeCodes"/>
1284 <xsl:param name="afterCodes"/>
1285 <xsl:variable name="str">
1286 <xsl:for-each select="marc:subfield">
1287 <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])">
1288 <xsl:value-of select="text()"/>
1289 <xsl:text> </xsl:text>
1293 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1296 <xsl:template name="showAuthor">
1297 <xsl:param name="authorfield"/>
1298 <xsl:param name="UseAuthoritiesForTracings"/>
1299 <xsl:if test="count($authorfield)>0">
1301 <xsl:for-each select="$authorfield">
1303 <xsl:when test="position()>1"/>
1305 <xsl:when test="@tag<700">By: </xsl:when>
1306 <!--#13382 Changed Additional author to contributor -->
1307 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1311 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1312 <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>
1315 <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>
1319 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1321 <xsl:call-template name="chopPunctuation">
1322 <xsl:with-param name="chopString">
1323 <xsl:call-template name="subfieldSelect">
1324 <xsl:with-param name="codes">
1326 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1327 <xsl:when test="@tag=111">aeq</xsl:when>
1328 <xsl:when test="@tag=110">ab</xsl:when>
1329 <xsl:otherwise>abcjq</xsl:otherwise>
1332 </xsl:call-template>
1334 <xsl:with-param name="punctuation">
1335 <xsl:text>:,;/ </xsl:text>
1337 </xsl:call-template>
1338 <!-- Display only name and title portion in 110 field -->
1339 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1340 <span class="titleportion">
1342 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1343 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1345 <xsl:call-template name="chopPunctuation">
1346 <xsl:with-param name="chopString">
1347 <xsl:call-template name="subfieldSelect">
1348 <xsl:with-param name="codes">cdnt</xsl:with-param>
1349 </xsl:call-template>
1351 </xsl:call-template>
1354 <!-- Display only name and title portion in 111 field -->
1355 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1356 <span class="titleportion">
1358 <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>
1359 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1362 <xsl:call-template name="chopPunctuation">
1363 <xsl:with-param name="chopString">
1364 <xsl:call-template name="subfieldSelect">
1365 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1366 </xsl:call-template>
1368 </xsl:call-template>
1371 <!-- Display only dates in 100 field -->
1372 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1373 <span class="authordates">
1374 <xsl:text>, </xsl:text>
1375 <xsl:call-template name="chopPunctuation">
1376 <xsl:with-param name="chopString">
1377 <xsl:call-template name="subfieldSelect">
1378 <xsl:with-param name="codes">d</xsl:with-param>
1379 </xsl:call-template>
1381 </xsl:call-template>
1386 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1387 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1388 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1389 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1390 <xsl:if test="@tag=710 or @tag=711">
1391 <xsl:call-template name="chopPunctuation">
1392 <xsl:with-param name="chopString">
1393 <xsl:call-template name="subfieldSelect">
1394 <xsl:with-param name="codes">
1396 <xsl:when test="@tag=711">aeq</xsl:when>
1397 <xsl:otherwise>ab</xsl:otherwise>
1400 </xsl:call-template>
1402 <xsl:with-param name="punctuation">
1403 <xsl:text>:,;/ </xsl:text>
1405 </xsl:call-template>
1406 <!-- Display only name and title portion in 711 field -->
1407 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1408 <span class="titleportion">
1410 <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>
1411 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1414 <xsl:call-template name="chopPunctuation">
1415 <xsl:with-param name="chopString">
1416 <xsl:call-template name="subfieldSelect">
1417 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1418 </xsl:call-template>
1420 </xsl:call-template>
1423 <!-- Display only name and title portion in 710 field -->
1424 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1425 <span class="titleportion">
1427 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1428 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1430 <xsl:call-template name="chopPunctuation">
1431 <xsl:with-param name="chopString">
1432 <xsl:call-template name="subfieldSelect">
1433 <xsl:with-param name="codes">cdnt</xsl:with-param>
1434 </xsl:call-template>
1436 </xsl:call-template>
1441 <!-- Display only name portion in 700 field -->
1442 <xsl:if test="@tag=700">
1443 <xsl:call-template name="chopPunctuation">
1444 <xsl:with-param name="chopString">
1445 <xsl:call-template name="subfieldSelect">
1446 <xsl:with-param name="codes">abcq</xsl:with-param>
1447 </xsl:call-template>
1449 </xsl:call-template>
1451 <!-- Display class "authordates" in 700 field -->
1452 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1453 <span class="authordates">
1454 <xsl:text>, </xsl:text>
1455 <xsl:call-template name="chopPunctuation">
1456 <xsl:with-param name="chopString">
1457 <xsl:call-template name="subfieldSelect">
1458 <xsl:with-param name="codes">d</xsl:with-param>
1459 </xsl:call-template>
1461 </xsl:call-template>
1464 <!-- Display class "titleportion" in 700 field -->
1465 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1466 <xsl:if test="@tag=700 and $titleportionfields">
1467 <span class="titleportion">
1468 <xsl:text>. </xsl:text>
1469 <xsl:call-template name="chopPunctuation">
1470 <xsl:with-param name="chopString">
1471 <xsl:call-template name="subfieldSelect">
1472 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1473 </xsl:call-template>
1475 </xsl:call-template>
1482 <!-- add relator code too between brackets-->
1483 <!-- #13383 include relator code j for field 111 -->
1484 <xsl:if test="(@tag!=111 and @tag!=711 and marc:subfield[@code='4' or @code='e']) or ((@tag=111 or @tag=711) and marc:subfield[@code='4' or @code='j'])">
1485 <span class="relatorcode">
1486 <xsl:text> [</xsl:text>
1488 <xsl:when test="@tag=111 or @tag=711">
1490 <!-- Prefer j over 4 for fields 111 and 711-->
1491 <xsl:when test="marc:subfield[@code='j']">
1492 <xsl:for-each select="marc:subfield[@code='j']">
1493 <xsl:value-of select="."/>
1494 <xsl:if test="position() != last()">, </xsl:if>
1498 <xsl:for-each select="marc:subfield[@code=4]">
1499 <xsl:value-of select="."/>
1500 <xsl:if test="position() != last()">, </xsl:if>
1505 <!-- Prefer e over 4 for fields 111 and 711-->
1506 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1507 <xsl:for-each select="marc:subfield[@code='e']">
1508 <xsl:value-of select="."/>
1509 <xsl:if test="position() != last()">, </xsl:if>
1513 <xsl:for-each select="marc:subfield[@code=4]">
1514 <xsl:value-of select="."/>
1515 <xsl:if test="position() != last()">, </xsl:if>
1519 <xsl:text>]</xsl:text>
1524 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1532 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1533 <xsl:template name="subfieldSelectSubject">
1534 <xsl:param name="codes"/>
1535 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1536 <xsl:param name="subdivCodes"/>
1537 <xsl:param name="subdivDelimiter"/>
1538 <xsl:param name="prefix"/>
1539 <xsl:param name="suffix"/>
1540 <xsl:param name="urlencode"/>
1541 <xsl:variable name="str">
1542 <xsl:for-each select="marc:subfield">
1543 <xsl:if test="contains($codes, @code)">
1544 <xsl:if test="contains($subdivCodes, @code)">
1545 <xsl:value-of select="$subdivDelimiter"/>
1547 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1552 <xsl:when test="$urlencode=1">
1553 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1556 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>