1 <?xml version=
"1.0" encoding=
"UTF-8"?>
3 <!DOCTYPE stylesheet [
<!ENTITY nbsp
" " >]
>
5 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
6 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
7 <xsl:stylesheet version=
"1.0"
8 xmlns:
marc=
"http://www.loc.gov/MARC21/slim"
9 xmlns:
items=
"http://www.koha-community.org/items"
10 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
11 exclude-result-prefixes=
"marc items">
12 <xsl:import href=
"MARC21slimUtils.xsl"/>
13 <xsl:output method =
"html" indent=
"yes" omit-xml-declaration =
"yes" encoding=
"UTF-8"/>
14 <xsl:template match=
"/">
15 <xsl:apply-templates/>
18 <xsl:template match=
"marc:record">
20 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
21 <xsl:variable name=
"display880" select=
"boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name=
"UseControlNumber" select=
"marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name=
"URLLinkText" select=
"marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name=
"OPACBaseURL" select=
"marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
25 <xsl:variable name=
"SubjectModifier"><xsl:if test=
"marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield
</xsl:if></xsl:variable>
26 <xsl:variable name=
"UseAuthoritiesForTracings" select=
"marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
27 <xsl:variable name=
"TraceSubjectSubdivisions" select=
"marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
28 <xsl:variable name=
"Show856uAsImage" select=
"marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29 <xsl:variable name=
"DisplayIconsXSLT" select=
"marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
30 <xsl:variable name=
"TracingQuotesLeft">
32 <xsl:when test=
"marc:sysprefs/marc:syspref[@name='UseICU']='1'">{
</xsl:when>
33 <xsl:otherwise>"</xsl:otherwise>
36 <xsl:variable name="TracingQuotesRight
">
38 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='
1'
">}</xsl:when>
39 <xsl:otherwise>"</xsl:otherwise>
42 <xsl:variable name=
"leader" select=
"marc:leader"/>
43 <xsl:variable name=
"leader6" select=
"substring($leader,7,1)"/>
44 <xsl:variable name=
"leader7" select=
"substring($leader,8,1)"/>
45 <xsl:variable name=
"leader19" select=
"substring($leader,20,1)"/>
46 <xsl:variable name=
"controlField008" select=
"marc:controlfield[@tag=008]"/>
47 <xsl:variable name=
"materialTypeCode">
49 <xsl:when test=
"$leader19='a'">ST
</xsl:when>
50 <xsl:when test=
"$leader6='a'">
52 <xsl:when test=
"$leader7='c' or $leader7='d' or $leader7='m'">BK
</xsl:when>
53 <xsl:when test=
"$leader7='i' or $leader7='s'">SE
</xsl:when>
54 <xsl:when test=
"$leader7='a' or $leader7='b'">AR
</xsl:when>
57 <xsl:when test=
"$leader6='t'">BK
</xsl:when>
58 <xsl:when test=
"$leader6='o' or $leader6='p'">MX
</xsl:when>
59 <xsl:when test=
"$leader6='m'">CF
</xsl:when>
60 <xsl:when test=
"$leader6='e' or $leader6='f'">MP
</xsl:when>
61 <xsl:when test=
"$leader6='g' or $leader6='k' or $leader6='r'">VM
</xsl:when>
62 <xsl:when test=
"$leader6='i' or $leader6='j'">MU
</xsl:when>
63 <xsl:when test=
"$leader6='c' or $leader6='d'">PR
</xsl:when>
66 <xsl:variable name=
"materialTypeLabel">
68 <xsl:when test=
"$leader19='a'">Set
</xsl:when>
69 <xsl:when test=
"$leader6='a'">
71 <xsl:when test=
"$leader7='c' or $leader7='d' or $leader7='m'">Book
</xsl:when>
72 <xsl:when test=
"$leader7='i' or $leader7='s'">
74 <xsl:when test=
"substring($controlField008,22,1)!='m'">Continuing resource
</xsl:when>
75 <xsl:otherwise>Series
</xsl:otherwise>
78 <xsl:when test=
"$leader7='a' or $leader7='b'">Article
</xsl:when>
81 <xsl:when test=
"$leader6='t'">Book
</xsl:when>
82 <xsl:when test=
"$leader6='o'">Kit
</xsl:when>
83 <xsl:when test=
"$leader6='p'">Mixed materials
</xsl:when>
84 <xsl:when test=
"$leader6='m'">Computer file
</xsl:when>
85 <xsl:when test=
"$leader6='e' or $leader6='f'">Map
</xsl:when>
86 <xsl:when test=
"$leader6='g' or $leader6='k' or $leader6='r'">Visual material
</xsl:when>
87 <xsl:when test=
"$leader6='j'">Music
</xsl:when>
88 <xsl:when test=
"$leader6='i'">Sound
</xsl:when>
89 <xsl:when test=
"$leader6='c' or $leader6='d'">Score
</xsl:when>
93 <!-- Title Statement -->
94 <!-- Alternate Graphic Representation (MARC 880) -->
95 <xsl:if test=
"$display880">
97 <xsl:call-template name=
"m880Select">
98 <xsl:with-param name=
"basetags">245</xsl:with-param>
99 <xsl:with-param name=
"codes">abhfgknps
</xsl:with-param>
105 <xsl:if test=
"marc:datafield[@tag=245]">
106 <h1 class=
"title" property=
"name">
107 <xsl:for-each select=
"marc:datafield[@tag=245]">
108 <xsl:call-template name=
"subfieldSelect">
109 <xsl:with-param name=
"codes">a
</xsl:with-param>
111 <xsl:text> </xsl:text>
112 <!-- 13381 add additional subfields-->
113 <xsl:for-each select=
"marc:subfield[contains('bchknps', @code)]">
115 <xsl:when test=
"@code='h'">
116 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
117 <span class=
"title_medium"><xsl:apply-templates/> </span>
119 <xsl:when test=
"@code='c'">
120 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
121 <span class=
"title_resp_stmt"><xsl:apply-templates/> </span>
124 <xsl:apply-templates/>
125 <xsl:text> </xsl:text>
133 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
134 <xsl:if test=
"$display880">
136 <xsl:call-template name=
"m880Select">
137 <xsl:with-param name=
"basetags">100,
110,
111,
700,
710,
711</xsl:with-param>
138 <xsl:with-param name=
"codes">abc
</xsl:with-param>
139 <xsl:with-param name=
"index">au
</xsl:with-param>
140 <xsl:with-param name=
"UseAuthoritiesForTracings" select=
"$UseAuthoritiesForTracings"/>
141 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
146 <!-- Author Statement -->
147 <xsl:call-template name=
"showAuthor">
148 <xsl:with-param name=
"authorfield" select=
"marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
149 <xsl:with-param name=
"UseAuthoritiesForTracings" select=
"$UseAuthoritiesForTracings"/>
152 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
153 <xsl:call-template name=
"showAuthor">
154 <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'])]"/>
155 <xsl:with-param name=
"UseAuthoritiesForTracings" select=
"$UseAuthoritiesForTracings"/>
158 <xsl:if test=
"$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
159 <span class=
"results_summary type"><span class=
"label">Material type:
</span>
160 <xsl:element name=
"img"><xsl:attribute name=
"src">/intranet-tmpl/prog/img/famfamfam/
<xsl:value-of select=
"$materialTypeCode"/>.png
</xsl:attribute><xsl:attribute name=
"alt"></xsl:attribute></xsl:element>
161 <xsl:text> </xsl:text>
162 <xsl:value-of select=
"$materialTypeLabel"/>
167 <!--Series: Alternate Graphic Representation (MARC 880) -->
168 <xsl:if test=
"$display880">
169 <xsl:call-template name=
"m880Select">
170 <xsl:with-param name=
"basetags">440,
490</xsl:with-param>
171 <xsl:with-param name=
"codes">av
</xsl:with-param>
172 <xsl:with-param name=
"class">results_summary series
</xsl:with-param>
173 <xsl:with-param name=
"label">Series:
</xsl:with-param>
174 <xsl:with-param name=
"index">se
</xsl:with-param>
179 <xsl:if test=
"marc:datafield[@tag=440 or @tag=490]">
180 <span class=
"results_summary series"><span class=
"label">Series:
</span>
182 <xsl:for-each select=
"marc:datafield[@tag=440]">
183 <a><xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:
"<xsl:value-of select="marc:subfield[@code='a']
"/>"</xsl:attribute>
184 <xsl:call-template name=
"chopPunctuation">
185 <xsl:with-param name=
"chopString">
186 <xsl:call-template name=
"subfieldSelect">
187 <xsl:with-param name=
"codes">av
</xsl:with-param>
192 <xsl:call-template name=
"part"/>
193 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><xsl:text> ;
</xsl:text></xsl:otherwise></xsl:choose>
196 <!-- 490 Series not traced, Ind1 = 0 -->
197 <xsl:for-each select=
"marc:datafield[@tag=490][@ind1!=1]">
198 <a><xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:
"<xsl:value-of select="marc:subfield[@code='a']
"/>"</xsl:attribute>
199 <xsl:call-template name=
"chopPunctuation">
200 <xsl:with-param name=
"chopString">
201 <xsl:call-template name=
"subfieldSelect">
202 <xsl:with-param name=
"codes">av
</xsl:with-param>
207 <xsl:call-template name=
"part"/>
208 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
210 <!-- 490 Series traced, Ind1 = 1 -->
211 <xsl:if test=
"marc:datafield[@tag=490][@ind1=1]">
212 <xsl:for-each select=
"marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
214 <xsl:when test=
"$UseControlNumber = '1' and marc:subfield[@code='w']">
215 <a href=
"/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
216 <xsl:call-template name=
"chopPunctuation">
217 <xsl:with-param name=
"chopString">
218 <xsl:call-template name=
"subfieldSelect">
219 <xsl:with-param name=
"codes">a_t
</xsl:with-param>
226 <a><xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:
"<xsl:value-of select="marc:subfield[@code='a']
"/>"</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>
235 <xsl:call-template name=
"part"/>
238 <xsl:text>:
</xsl:text>
239 <xsl:value-of select=
"marc:subfield[@code='v']" />
240 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
248 <xsl:if test=
"$leader7='s'">
249 <span class=
"results_summary analytics"><span class=
"label">Analytics:
</span>
252 <xsl:when test=
"$UseControlNumber = '1' and marc:controlfield[@tag=001]">
253 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=rcn:
<xsl:value-of select=
"marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)
</xsl:attribute>
256 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:
<xsl:value-of select=
"translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
259 <xsl:text>Show analytics
</xsl:text>
264 <!-- Volumes of sets and traced series -->
265 <xsl:if test=
"$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
266 <span class=
"results_summary volumes"><span class=
"label">Volumes:
</span>
269 <xsl:when test=
"$UseControlNumber = '1' and marc:controlfield[@tag=001]">
270 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=rcn:
<xsl:value-of select=
"marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)
</xsl:attribute>
273 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:
<xsl:value-of select=
"translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
276 <xsl:text>Show volumes
</xsl:text>
282 <xsl:if test=
"$leader19='c'">
283 <span class=
"results_summary set"><span class=
"label">Set:
</span>
284 <xsl:for-each select=
"marc:datafield[@tag=773]">
287 <xsl:when test=
"$UseControlNumber = '1' and marc:subfield[@code='w']">
288 <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>
291 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:
<xsl:value-of select=
"translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
294 <xsl:value-of select=
"translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
297 <xsl:when test=
"position()=last()"></xsl:when>
298 <xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise>
304 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
305 <xsl:if test=
"$display880">
306 <xsl:call-template name=
"m880Select">
307 <xsl:with-param name=
"basetags">260</xsl:with-param>
308 <xsl:with-param name=
"codes">abcg
</xsl:with-param>
309 <xsl:with-param name=
"class">results_summary publisher
</xsl:with-param>
310 <xsl:with-param name=
"label">Publisher:
</xsl:with-param>
314 <!-- Publisher info and RDA related info from tags 260, 264 -->
316 <xsl:when test=
"marc:datafield[@tag=264]">
317 <xsl:call-template name=
"showRDAtag264"/>
319 <xsl:when test=
"marc:datafield[@tag=260]">
320 <span class=
"results_summary publisher"><span class=
"label">Publisher:
</span>
321 <xsl:for-each select=
"marc:datafield[@tag=260]">
322 <xsl:if test=
"marc:subfield[@code='a']">
323 <xsl:call-template name=
"subfieldSelect">
324 <xsl:with-param name=
"codes">a
</xsl:with-param>
327 <xsl:text> </xsl:text>
328 <xsl:if test=
"marc:subfield[@code='b']">
329 <a href=
"/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
330 <xsl:call-template name=
"subfieldSelect">
331 <xsl:with-param name=
"codes">b
</xsl:with-param>
335 <xsl:text> </xsl:text>
336 <xsl:call-template name=
"chopPunctuation">
337 <xsl:with-param name=
"chopString">
338 <xsl:call-template name=
"subfieldSelect">
339 <xsl:with-param name=
"codes">cg
</xsl:with-param>
343 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
349 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
350 <xsl:if test=
"$display880">
351 <xsl:call-template name=
"m880Select">
352 <xsl:with-param name=
"basetags">250</xsl:with-param>
353 <xsl:with-param name=
"codes">ab
</xsl:with-param>
354 <xsl:with-param name=
"class">results_summary edition
</xsl:with-param>
355 <xsl:with-param name=
"label">Edition:
</xsl:with-param>
359 <xsl:if test=
"marc:datafield[@tag=250]">
360 <span class=
"results_summary edition"><span class=
"label">Edition:
</span>
361 <xsl:for-each select=
"marc:datafield[@tag=250]">
362 <xsl:call-template name=
"chopPunctuation">
363 <xsl:with-param name=
"chopString">
364 <xsl:call-template name=
"subfieldSelect">
365 <xsl:with-param name=
"codes">ab
</xsl:with-param>
369 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
374 <!-- Description: Alternate Graphic Representation (MARC 880) -->
375 <xsl:if test=
"$display880">
376 <xsl:call-template name=
"m880Select">
377 <xsl:with-param name=
"basetags">300</xsl:with-param>
378 <xsl:with-param name=
"codes">abceg
</xsl:with-param>
379 <xsl:with-param name=
"class">results_summary description
</xsl:with-param>
380 <xsl:with-param name=
"label">Description:
</xsl:with-param>
384 <xsl:if test=
"marc:datafield[@tag=300]">
385 <span class=
"results_summary description"><span class=
"label">Description:
</span>
386 <xsl:for-each select=
"marc:datafield[@tag=300]">
387 <xsl:call-template name=
"chopPunctuation">
388 <xsl:with-param name=
"chopString">
389 <xsl:call-template name=
"subfieldSelect">
390 <xsl:with-param name=
"codes">abceg
</xsl:with-param>
394 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
399 <!-- Content Type -->
400 <xsl:if test=
"marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
401 <span class=
"results_summary" id=
"content_type">
402 <xsl:if test=
"marc:datafield[@tag=336]">
403 <span class=
"label">Content type:
</span>
404 <xsl:for-each select=
"marc:datafield[@tag=336]">
405 <xsl:call-template name=
"subfieldSelect">
406 <xsl:with-param name=
"codes">a
</xsl:with-param>
407 <xsl:with-param name=
"delimeter">,
</xsl:with-param>
409 <xsl:if test=
"position() != last()"><span class=
"separator"><xsl:text> |
</xsl:text></span></xsl:if>
412 <xsl:text> </xsl:text>
414 <xsl:if test=
"marc:datafield[@tag=337]">
415 <span class=
"label">Media type:
</span>
416 <xsl:for-each select=
"marc:datafield[@tag=337]">
417 <xsl:call-template name=
"subfieldSelect">
418 <xsl:with-param name=
"codes">a
</xsl:with-param>
419 <xsl:with-param name=
"delimeter">,
</xsl:with-param>
421 <xsl:if test=
"position() != last()"><span class=
"separator"><xsl:text> |
</xsl:text></span></xsl:if>
424 <xsl:text> </xsl:text>
426 <xsl:if test=
"marc:datafield[@tag=338]">
427 <span class=
"label">Carrier type:
</span>
428 <xsl:for-each select=
"marc:datafield[@tag=338]">
429 <xsl:call-template name=
"subfieldSelect">
430 <xsl:with-param name=
"codes">a
</xsl:with-param>
431 <xsl:with-param name=
"delimeter">,
</xsl:with-param>
433 <xsl:if test=
"position() != last()"><span class=
"separator"><xsl:text> |
</xsl:text></span></xsl:if>
441 <xsl:if test=
"marc:datafield[@tag=020]/marc:subfield[@code='a']">
442 <span class=
"results_summary isbn"><span class=
"label">ISBN:
</span>
443 <xsl:for-each select=
"marc:datafield[@tag=020]/marc:subfield[@code='a']">
444 <span property=
"isbn">
445 <xsl:value-of select=
"."/>
447 <xsl:when test=
"position()=last()">
448 <xsl:text>.
</xsl:text>
451 <xsl:text>;
</xsl:text>
460 <xsl:if test=
"marc:datafield[@tag=022]/marc:subfield[@code='a']">
461 <span class=
"results_summary issn"><span class=
"label">ISSN:
</span>
462 <xsl:for-each select=
"marc:datafield[@tag=022]/marc:subfield[@code='a']">
463 <span property=
"issn">
464 <xsl:value-of select=
"."/>
466 <xsl:when test=
"position()=last()">
467 <xsl:text>.
</xsl:text>
470 <xsl:text>;
</xsl:text>
478 <xsl:if test=
"marc:datafield[@tag=013]">
479 <span class=
"results_summary patent_info">
480 <span class=
"label">Patent information:
</span>
481 <xsl:for-each select=
"marc:datafield[@tag=013]">
482 <xsl:call-template name=
"subfieldSelect">
483 <xsl:with-param name=
"codes">acdef
</xsl:with-param>
484 <xsl:with-param name=
"delimeter">,
</xsl:with-param>
486 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
491 <xsl:if test=
"marc:datafield[@tag=088]">
492 <span class=
"results_summary report_number">
493 <span class=
"label">Report number:
</span>
494 <xsl:for-each select=
"marc:datafield[@tag=088]">
495 <xsl:call-template name=
"subfieldSelect">
496 <xsl:with-param name=
"codes">a
</xsl:with-param>
498 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
503 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
504 <xsl:if test=
"$display880">
505 <xsl:call-template name=
"m880Select">
506 <xsl:with-param name=
"basetags">246</xsl:with-param>
507 <xsl:with-param name=
"codes">abhfgnp
</xsl:with-param>
508 <xsl:with-param name=
"class">results_summary other_title
</xsl:with-param>
509 <xsl:with-param name=
"label">Other title:
</xsl:with-param>
513 <xsl:if test=
"marc:datafield[@tag=246]">
514 <span class=
"results_summary other_title"><span class=
"label">Other title:
</span>
515 <xsl:for-each select=
"marc:datafield[@tag=246]">
516 <xsl:call-template name=
"chopPunctuation">
517 <xsl:with-param name=
"chopString">
518 <xsl:call-template name=
"subfieldSelect">
519 <xsl:with-param name=
"codes">abhfgnp
</xsl:with-param>
523 <xsl:if test=
"@ind1=1 and not(marc:subfield[@code='i'])">
525 <xsl:when test=
"@ind2=0"> [Portion of title]
</xsl:when>
526 <xsl:when test=
"@ind2=1"> [Parallel title]
</xsl:when>
527 <xsl:when test=
"@ind2=2"> [Distinctive title]
</xsl:when>
528 <xsl:when test=
"@ind2=3"> [Other title]
</xsl:when>
529 <xsl:when test=
"@ind2=4"> [Cover title]
</xsl:when>
530 <xsl:when test=
"@ind2=5"> [Added title page title]
</xsl:when>
531 <xsl:when test=
"@ind2=6"> [Caption title]
</xsl:when>
532 <xsl:when test=
"@ind2=7"> [Running title]
</xsl:when>
533 <xsl:when test=
"@ind2=8"> [Spine title]
</xsl:when>
536 <xsl:if test=
"marc:subfield[@code='i']">
537 <xsl:value-of select=
"concat(' [',marc:subfield[@code='i'],']')"/>
539 <!-- #13386 added separator | -->
540 <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>
545 <xsl:if test=
"marc:datafield[@tag=242]">
546 <span class=
"results_summary translated_title"><span class=
"label">Title translated:
</span>
547 <xsl:for-each select=
"marc:datafield[@tag=242]">
548 <xsl:call-template name=
"chopPunctuation">
549 <xsl:with-param name=
"chopString">
550 <xsl:call-template name=
"subfieldSelect">
551 <xsl:with-param name=
"codes">abchnp
</xsl:with-param>
555 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
560 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
561 <xsl:if test=
"$display880">
562 <xsl:call-template name=
"m880Select">
563 <xsl:with-param name=
"basetags">130,
240</xsl:with-param>
564 <xsl:with-param name=
"codes">adfklmor
</xsl:with-param>
565 <xsl:with-param name=
"class">results_summary uniform_title
</xsl:with-param>
566 <xsl:with-param name=
"label">Uniform title:
</xsl:with-param>
570 <xsl:if test=
"marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
571 <span class=
"results_summary uniform_title"><span class=
"label">Uniform titles:
</span>
572 <xsl:for-each select=
"marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
573 <xsl:for-each select=
"marc:subfield">
574 <xsl:if test=
"contains('adfghklmnoprst',@code)">
575 <xsl:value-of select=
"text()"/>
576 <xsl:text> </xsl:text>
579 <xsl:if test=
"position() != last()">
580 <span class=
"separator"><xsl:text> |
</xsl:text></span>
586 <!-- #13382 Added Related works 700$i -->
587 <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']]">
588 <span class=
"results_summary related_works"><span class=
"label">Related works:
</span>
589 <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']]">
590 <xsl:variable name=
"str">
591 <xsl:call-template name=
"subfieldSelect">
592 <xsl:with-param name=
"codes">abcdfghiklmnporstux
</xsl:with-param>
595 <xsl:call-template name=
"chopPunctuation">
596 <xsl:with-param name=
"chopString">
597 <xsl:value-of select=
"$str"/>
600 <!-- add relator code too between brackets-->
601 <xsl:if test=
"marc:subfield[@code='4' or @code='e']">
602 <span class=
"relatorcode">
603 <xsl:text> [
</xsl:text>
605 <xsl:when test=
"marc:subfield[@code='e']">
606 <xsl:for-each select=
"marc:subfield[@code='e']">
607 <xsl:value-of select=
"."/>
608 <xsl:if test=
"position() != last()"><xsl:text>,
</xsl:text></xsl:if>
612 <xsl:for-each select=
"marc:subfield[@code='4']">
613 <xsl:value-of select=
"."/>
614 <xsl:if test=
"position() != last()"><xsl:text>,
</xsl:text></xsl:if>
618 <xsl:text>]
</xsl:text>
622 <xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><span class=
"separator"><xsl:text> |
</xsl:text></span></xsl:otherwise>
628 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
629 <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'])]">
630 <span class=
"results_summary contained_works"><span class=
"label">Contained works:
</span>
631 <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'])]">
632 <xsl:variable name=
"str">
633 <xsl:call-template name=
"subfieldSelect">
634 <xsl:with-param name=
"codes">abcdfghiklmnporstux
</xsl:with-param>
637 <xsl:call-template name=
"chopPunctuation">
638 <xsl:with-param name=
"chopString">
639 <xsl:value-of select=
"$str"/>
642 <!-- add relator code too between brackets-->
643 <xsl:if test=
"marc:subfield[@code='4' or @code='e']">
644 <span class=
"relatorcode">
645 <xsl:text> [
</xsl:text>
647 <xsl:when test=
"marc:subfield[@code='e']">
648 <xsl:for-each select=
"marc:subfield[@code='e']">
649 <xsl:value-of select=
"."/>
650 <xsl:if test=
"position() != last()"><xsl:text>,
</xsl:text></xsl:if>
654 <xsl:for-each select=
"marc:subfield[@code='4']">
655 <xsl:value-of select=
"."/>
656 <xsl:if test=
"position() != last()"><xsl:text>,
</xsl:text></xsl:if>
660 <xsl:text>]
</xsl:text>
664 <xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><span class=
"separator"><xsl:text> |
</xsl:text></span></xsl:otherwise>
671 <xsl:if test=
"marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
672 <span class=
"results_summary subjects"><span class=
"label">Subject(s):
</span>
673 <xsl:for-each select=
"marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
676 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
677 <xsl:when test=
"marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
678 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=an:
<xsl:value-of select=
"marc:subfield[@code=9]"/></xsl:attribute>
680 <xsl:when test=
"$TraceSubjectSubdivisions='1'">
681 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=
<xsl:call-template name=
"subfieldSelectSubject">
682 <xsl:with-param name=
"codes">abcdfgklmnopqrstvxyz
</xsl:with-param>
683 <xsl:with-param name=
"delimeter"> AND
</xsl:with-param>
684 <xsl:with-param name=
"prefix">(su
<xsl:value-of select=
"$SubjectModifier"/>:
<xsl:value-of select=
"$TracingQuotesLeft"/></xsl:with-param>
685 <xsl:with-param name=
"suffix"><xsl:value-of select=
"$TracingQuotesRight"/>)
</xsl:with-param>
689 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
691 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=su
<xsl:value-of select=
"$SubjectModifier"/>:
<xsl:value-of select=
"$TracingQuotesLeft"/><xsl:value-of select=
"translate(marc:subfield[@code='a'],'()','')"/><xsl:value-of select=
"$TracingQuotesRight"/></xsl:attribute>
694 <xsl:call-template name=
"chopPunctuation">
695 <xsl:with-param name=
"chopString">
696 <xsl:call-template name=
"subfieldSelect">
697 <xsl:with-param name=
"codes">abcdfgklmnopqrstvxyz
</xsl:with-param>
698 <xsl:with-param name=
"subdivCodes">vxyz
</xsl:with-param>
699 <xsl:with-param name=
"subdivDelimiter">--
</xsl:with-param>
705 <xsl:when test=
"position()=last()"></xsl:when>
706 <xsl:otherwise> |
</xsl:otherwise>
714 <xsl:if test=
"marc:datafield[@tag=655]">
715 <span class=
"results_summary genre"><span class=
"label">Genre/Form:
</span>
716 <xsl:for-each select=
"marc:datafield[@tag=655]">
719 <xsl:when test=
"marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
720 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=an:
<xsl:value-of select=
"marc:subfield[@code=9]"/></xsl:attribute>
722 <xsl:when test=
"$TraceSubjectSubdivisions='1'">
723 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=
<xsl:call-template name=
"subfieldSelect">
724 <xsl:with-param name=
"codes">avxyz
</xsl:with-param>
725 <xsl:with-param name=
"delimeter"> AND
</xsl:with-param>
726 <xsl:with-param name=
"prefix">(su
<xsl:value-of select=
"$SubjectModifier"/>:
<xsl:value-of select=
"$TracingQuotesLeft"/></xsl:with-param>
727 <xsl:with-param name=
"suffix"><xsl:value-of select=
"$TracingQuotesRight"/>)
</xsl:with-param>
732 <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>
735 <xsl:call-template name=
"subfieldSelect">
736 <xsl:with-param name=
"codes">avxyz
</xsl:with-param>
737 <xsl:with-param name=
"subdivCodes">vxyz
</xsl:with-param>
738 <xsl:with-param name=
"subdivDelimiter">--
</xsl:with-param>
741 <xsl:if test=
"position()!=last()"><span class=
"separator"> |
</span></xsl:if>
746 <!-- DDC classification -->
747 <xsl:if test=
"marc:datafield[@tag=082]">
748 <span class=
"results_summary ddc">
749 <span class=
"label">DDC classification:
</span>
750 <xsl:for-each select=
"marc:datafield[@tag=082]">
751 <xsl:call-template name=
"subfieldSelect">
752 <xsl:with-param name=
"codes">a
</xsl:with-param>
753 <xsl:with-param name=
"delimeter"><xsl:text> |
</xsl:text></xsl:with-param>
756 <xsl:when test=
"position()=last()"><xsl:text> </xsl:text></xsl:when>
757 <xsl:otherwise> |
</xsl:otherwise>
763 <xsl:if test=
"marc:datafield[@tag=856]">
764 <span class=
"results_summary online_resources"><span class=
"label">Online resources:
</span>
765 <xsl:for-each select=
"marc:datafield[@tag=856]">
766 <xsl:variable name=
"SubqText"><xsl:value-of select=
"marc:subfield[@code='q']"/></xsl:variable>
767 <a><xsl:attribute name=
"href"><xsl:value-of select=
"marc:subfield[@code='u']"/></xsl:attribute>
769 <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')">
770 <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>
772 <xsl:when test=
"marc:subfield[@code='y' or @code='3' or @code='z']">
773 <xsl:call-template name=
"subfieldSelect">
774 <xsl:with-param name=
"codes">y3z
</xsl:with-param>
777 <xsl:when test=
"not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
779 <xsl:when test=
"$URLLinkText!=''">
780 <xsl:value-of select=
"$URLLinkText"/>
783 <xsl:text>Click here to access online
</xsl:text>
790 <xsl:when test=
"position()=last()"><xsl:text> </xsl:text></xsl:when>
791 <xsl:otherwise> |
</xsl:otherwise>
797 <xsl:if test=
"marc:datafield[@tag=505]">
798 <div class=
"results_summary contents">
800 <xsl:when test=
"marc:datafield[@tag=505]/@ind1=0">
801 <span class=
"label">Contents:
</span>
803 <xsl:when test=
"marc:datafield[@tag=505]/@ind1=1">
804 <span class=
"label">Incomplete contents:
</span>
806 <xsl:when test=
"marc:datafield[@tag=505]/@ind1=2">
807 <span class=
"label">Partial contents:
</span>
810 <xsl:for-each select=
"marc:datafield[@tag=505]">
811 <div class='contentblock'
>
813 <xsl:when test=
"@ind2=0">
814 <xsl:call-template name=
"subfieldSelectSpan">
815 <xsl:with-param name=
"codes">tru
</xsl:with-param>
819 <xsl:call-template name=
"subfieldSelectSpan">
820 <xsl:with-param name=
"codes">atru
</xsl:with-param>
830 <xsl:if test=
"marc:datafield[@tag=586]">
831 <span class=
"results_summary awardsnote">
832 <xsl:if test=
"marc:datafield[@tag=586]/@ind1=' '">
833 <span class=
"label">Awards:
</span>
835 <xsl:for-each select=
"marc:datafield[@tag=586]">
836 <xsl:value-of select=
"marc:subfield[@code='a']"/>
837 <xsl:if test=
"position()!=last()"><span class=
"separator"><xsl:text> |
</xsl:text></span></xsl:if>
843 <xsl:if test=
"marc:datafield[@tag=508]">
844 <div class=
"results_summary prod_credits">
845 <span class=
"label">Production credits:
</span>
846 <xsl:for-each select=
"marc:datafield[@tag=508]">
847 <xsl:call-template name=
"subfieldSelectSpan">
848 <xsl:with-param name=
"codes">a
</xsl:with-param>
855 <xsl:if test=
"marc:datafield[@tag=773]">
856 <xsl:for-each select=
"marc:datafield[@tag=773]">
857 <xsl:if test=
"@ind1 !=1">
858 <span class=
"results_summary in"><span class=
"label">
860 <xsl:when test=
"@ind2=' '">
863 <xsl:when test=
"@ind2=8">
864 <xsl:if test=
"marc:subfield[@code='i']">
865 <xsl:value-of select=
"marc:subfield[@code='i']"/>
870 <xsl:variable name=
"f773">
871 <xsl:call-template name=
"chopPunctuation"><xsl:with-param name=
"chopString"><xsl:call-template name=
"subfieldSelect">
872 <xsl:with-param name=
"codes">a_t
</xsl:with-param>
873 </xsl:call-template></xsl:with-param></xsl:call-template>
876 <xsl:when test=
"$UseControlNumber = '1' and marc:subfield[@code='w']">
877 <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>
878 <xsl:value-of select=
"translate($f773, '()', '')"/>
880 <xsl:if test=
"marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select=
"marc:subfield[@code='g']"/></xsl:if>
882 <xsl:when test=
"marc:subfield[@code='0']">
883 <a><xsl:attribute name=
"href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=
<xsl:value-of select=
"marc:subfield[@code='0']"/></xsl:attribute>
884 <xsl:value-of select=
"$f773"/>
888 <a><xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:
<xsl:value-of select=
"translate($f773, '()', '')"/></xsl:attribute>
889 <xsl:value-of select=
"$f773"/>
891 <xsl:if test=
"marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select=
"marc:subfield[@code='g']"/></xsl:if>
896 <xsl:if test=
"marc:subfield[@code='n']">
897 <span class=
"results_summary"><xsl:value-of select=
"marc:subfield[@code='n']"/></span>
904 <xsl:if test=
"marc:datafield[@tag=502]">
905 <span class=
"results_summary diss_note">
906 <span class=
"label">Dissertation note:
</span>
907 <xsl:for-each select=
"marc:datafield[@tag=502]">
908 <xsl:call-template name=
"subfieldSelect">
909 <xsl:with-param name=
"codes">abcdgo
</xsl:with-param>
912 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
916 <!-- 866 textual holdings -->
917 <xsl:if test=
"marc:datafield[@tag=866]">
918 <span class=
"results_summary holdings_note"><span class=
"label">Holdings note:
</span>
919 <xsl:for-each select=
"marc:datafield[@tag=866]">
920 <xsl:call-template name=
"subfieldSelect">
921 <xsl:with-param name=
"codes">axz
</xsl:with-param>
923 <xsl:choose><xsl:when test=
"position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise></xsl:choose>
928 <!-- 775 Other Edition -->
929 <xsl:if test=
"marc:datafield[@tag=775]">
930 <span class=
"results_summary other_editions"><span class=
"label">Other editions:
</span>
931 <xsl:for-each select=
"marc:datafield[@tag=775]">
932 <xsl:variable name=
"f775">
933 <xsl:call-template name=
"chopPunctuation"><xsl:with-param name=
"chopString"><xsl:call-template name=
"subfieldSelect">
934 <xsl:with-param name=
"codes">a_t
</xsl:with-param>
935 </xsl:call-template></xsl:with-param></xsl:call-template>
937 <xsl:if test=
"marc:subfield[@code='i']">
938 <xsl:call-template name=
"subfieldSelect">
939 <xsl:with-param name=
"codes">i
</xsl:with-param>
941 <xsl:text>:
</xsl:text>
945 <xsl:when test=
"$UseControlNumber = '1' and marc:subfield[@code='w']">
946 <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>
949 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:
<xsl:value-of select=
"translate($f775, '()', '')"/></xsl:attribute>
952 <xsl:call-template name=
"subfieldSelect">
953 <xsl:with-param name=
"codes">a_t
</xsl:with-param>
957 <xsl:when test=
"position()=last()"></xsl:when>
958 <xsl:otherwise><xsl:text>;
</xsl:text></xsl:otherwise>
965 <xsl:if test=
"marc:datafield[@tag=780]">
966 <xsl:for-each select=
"marc:datafield[@tag=780]">
967 <xsl:if test=
"@ind1=0">
968 <span class=
"results_summary preceeding_entry">
970 <xsl:when test=
"@ind2=0">
971 <span class=
"label">Continues:
</span>
973 <xsl:when test=
"@ind2=1">
974 <span class=
"label">Continues in part:
</span>
976 <xsl:when test=
"@ind2=2">
977 <span class=
"label">Supersedes:
</span>
979 <xsl:when test=
"@ind2=3">
980 <span class=
"label">Supersedes in part:
</span>
982 <xsl:when test=
"@ind2=4">
983 <span class=
"label">Formed by the union: ... and: ...
</span>
985 <xsl:when test=
"@ind2=5">
986 <span class=
"label">Absorbed:
</span>
988 <xsl:when test=
"@ind2=6">
989 <span class=
"label">Absorbed in part:
</span>
991 <xsl:when test=
"@ind2=7">
992 <span class=
"label">Separated from:
</span>
995 <xsl:text> </xsl:text>
996 <xsl:variable name=
"f780">
997 <xsl:call-template name=
"subfieldSelect">
998 <xsl:with-param name=
"codes">a_t
</xsl:with-param>
1002 <xsl:when test=
"$UseControlNumber = '1' and marc:subfield[@code='w']">
1003 <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>
1004 <xsl:value-of select=
"translate($f780, '()', '')"/>
1008 <a><xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:
<xsl:value-of select=
"translate($f780, '()', '')"/></xsl:attribute>
1009 <xsl:value-of select=
"translate($f780, '()', '')"/>
1015 <xsl:if test=
"marc:subfield[@code='n']">
1016 <span class=
"results_summary"><xsl:value-of select=
"marc:subfield[@code='n']"/></span>
1024 <xsl:if test=
"marc:datafield[@tag=785]">
1025 <xsl:for-each select=
"marc:datafield[@tag=785]">
1026 <span class=
"results_summary succeeding_entry">
1028 <xsl:when test=
"@ind2=0">
1029 <span class=
"label">Continued by:
</span>
1031 <xsl:when test=
"@ind2=1">
1032 <span class=
"label">Continued in part by:
</span>
1034 <xsl:when test=
"@ind2=2">
1035 <span class=
"label">Superseded by:
</span>
1037 <xsl:when test=
"@ind2=3">
1038 <span class=
"label">Superseded in part by:
</span>
1040 <xsl:when test=
"@ind2=4">
1041 <span class=
"label">Absorbed by:
</span>
1043 <xsl:when test=
"@ind2=5">
1044 <span class=
"label">Absorbed in part by:
</span>
1046 <xsl:when test=
"@ind2=6">
1047 <span class=
"label">Split into .. and ...:
</span>
1049 <xsl:when test=
"@ind2=7">
1050 <span class=
"label">Merged with ... to form ...
</span>
1052 <xsl:when test=
"@ind2=8">
1053 <span class=
"label">Changed back to:
</span>
1056 <xsl:text> </xsl:text>
1057 <xsl:variable name=
"f785">
1058 <xsl:call-template name=
"subfieldSelect">
1059 <xsl:with-param name=
"codes">a_t
</xsl:with-param>
1060 </xsl:call-template>
1064 <xsl:when test=
"$UseControlNumber = '1' and marc:subfield[@code='w']">
1065 <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>
1066 <xsl:value-of select=
"translate($f785, '()', '')"/>
1070 <a><xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:
<xsl:value-of select=
"translate($f785, '()', '')"/></xsl:attribute>
1071 <xsl:value-of select=
"translate($f785, '()', '')"/>
1080 <xsl:if test=
"$OPACBaseURL!=''">
1081 <span class=
"results_summary"><span class=
"label">OPAC view:
</span>
1082 <a><xsl:attribute name=
"href"><xsl:value-of select=
"$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=
<xsl:value-of select=
"marc:datafield[@tag=999]/marc:subfield[@code='c']"/></xsl:attribute><xsl:attribute name=
"target">_blank
</xsl:attribute>Open in new window
</a>.
1088 <xsl:template name=
"nameABCQ">
1089 <xsl:call-template name=
"chopPunctuation">
1090 <xsl:with-param name=
"chopString">
1091 <xsl:call-template name=
"subfieldSelect">
1092 <xsl:with-param name=
"codes">abcq
</xsl:with-param>
1093 </xsl:call-template>
1095 <xsl:with-param name=
"punctuation">
1096 <xsl:text>:,;/
</xsl:text>
1098 </xsl:call-template>
1101 <xsl:template name=
"nameABCDN">
1102 <xsl:call-template name=
"chopPunctuation">
1103 <xsl:with-param name=
"chopString">
1104 <xsl:call-template name=
"subfieldSelect">
1105 <xsl:with-param name=
"codes">abcdn
</xsl:with-param>
1106 </xsl:call-template>
1108 <xsl:with-param name=
"punctuation">
1109 <xsl:text>:,;/
</xsl:text>
1111 </xsl:call-template>
1114 <xsl:template name=
"nameACDEQ">
1115 <xsl:call-template name=
"subfieldSelect">
1116 <xsl:with-param name=
"codes">acdeq
</xsl:with-param>
1117 </xsl:call-template>
1120 <xsl:template name=
"part">
1121 <xsl:variable name=
"partNumber">
1122 <xsl:call-template name=
"specialSubfieldSelect">
1123 <xsl:with-param name=
"axis">n
</xsl:with-param>
1124 <xsl:with-param name=
"anyCodes">n
</xsl:with-param>
1125 <xsl:with-param name=
"afterCodes">fghkdlmor
</xsl:with-param>
1126 </xsl:call-template>
1128 <xsl:variable name=
"partName">
1129 <xsl:call-template name=
"specialSubfieldSelect">
1130 <xsl:with-param name=
"axis">p
</xsl:with-param>
1131 <xsl:with-param name=
"anyCodes">p
</xsl:with-param>
1132 <xsl:with-param name=
"afterCodes">fghkdlmor
</xsl:with-param>
1133 </xsl:call-template>
1135 <xsl:if test=
"string-length(normalize-space($partNumber))">
1136 <xsl:call-template name=
"chopPunctuation">
1137 <xsl:with-param name=
"chopString" select=
"$partNumber"/>
1138 </xsl:call-template>
1140 <xsl:if test=
"string-length(normalize-space($partName))">
1141 <xsl:call-template name=
"chopPunctuation">
1142 <xsl:with-param name=
"chopString" select=
"$partName"/>
1143 </xsl:call-template>
1147 <xsl:template name=
"specialSubfieldSelect">
1148 <xsl:param name=
"anyCodes"/>
1149 <xsl:param name=
"axis"/>
1150 <xsl:param name=
"beforeCodes"/>
1151 <xsl:param name=
"afterCodes"/>
1152 <xsl:variable name=
"str">
1153 <xsl:for-each select=
"marc:subfield">
1154 <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])">
1155 <xsl:value-of select=
"text()"/>
1156 <xsl:text> </xsl:text>
1160 <xsl:value-of select=
"substring($str,1,string-length($str)-1)"/>
1163 <xsl:template name=
"showAuthor">
1164 <xsl:param name=
"authorfield"/>
1165 <xsl:param name=
"UseAuthoritiesForTracings"/>
1166 <xsl:if test=
"count($authorfield)>0">
1168 <xsl:for-each select=
"$authorfield">
1170 <xsl:when test=
"position()>1"/>
1172 <xsl:when test=
"@tag<700">By:
</xsl:when>
1173 <!--#13382 Changed Additional author to contributor -->
1174 <xsl:otherwise>Contributor(s):
</xsl:otherwise>
1178 <xsl:when test=
"marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1179 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=an:
<xsl:value-of select=
"marc:subfield[@code=9]"/></xsl:attribute>
1182 <xsl:attribute name=
"href">/cgi-bin/koha/catalogue/search.pl?q=au:
"<xsl:value-of select="marc:subfield[@code='a']
"/>"</xsl:attribute>
1186 <xsl:when test=
"@tag=100 or @tag=110 or @tag=111">
1188 <xsl:call-template name=
"chopPunctuation">
1189 <xsl:with-param name=
"chopString">
1190 <xsl:call-template name=
"subfieldSelect">
1191 <xsl:with-param name=
"codes">
1193 <!-- #13383 include subfield e for field 111 -->
1194 <xsl:when test=
"@tag=111">abcdeqt
</xsl:when>
1195 <xsl:otherwise>abcdjqt
</xsl:otherwise>
1198 </xsl:call-template>
1200 <xsl:with-param name=
"punctuation">
1201 <xsl:text>:,;/
</xsl:text>
1203 </xsl:call-template>
1205 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1206 <!--#13382 Added all relevant subfields 4, e, are handled separately -->
1207 <xsl:when test=
"@tag=700 or @tag=710 or @tag=711">
1208 <xsl:variable name=
"str">
1209 <xsl:call-template name=
"subfieldSelect">
1210 <xsl:with-param name=
"codes">abcdfghiklmnoprstux
</xsl:with-param>
1211 </xsl:call-template>
1213 <xsl:call-template name=
"chopPunctuation">
1214 <xsl:with-param name=
"chopString">
1215 <xsl:value-of select=
"$str"/>
1217 <xsl:with-param name=
"punctuation">
1218 <xsl:text>:,;/.
</xsl:text>
1220 </xsl:call-template>
1224 <!-- add relator code too between brackets-->
1225 <!-- #13383 include relator code j for field 111 -->
1226 <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'][. != ''])">
1227 <span class=
"relatorcode">
1228 <xsl:text> [
</xsl:text>
1230 <xsl:when test=
"@tag=111">
1232 <!-- Prefer j over 4 -->
1233 <xsl:when test=
"marc:subfield[@code='j']">
1234 <xsl:for-each select=
"marc:subfield[@code='j']">
1235 <xsl:value-of select=
"."/>
1236 <xsl:if test=
"position() != last()">,
</xsl:if>
1240 <xsl:for-each select=
"marc:subfield[@code=4]">
1241 <xsl:value-of select=
"."/>
1242 <xsl:if test=
"position() != last()">,
</xsl:if>
1247 <!-- Prefer e over 4 -->
1248 <xsl:when test=
"marc:subfield[@code='e']">
1249 <xsl:for-each select=
"marc:subfield[@code='e']">
1250 <xsl:value-of select=
"."/>
1251 <xsl:if test=
"position() != last()">,
</xsl:if>
1255 <xsl:for-each select=
"marc:subfield[@code=4]">
1256 <xsl:value-of select=
"."/>
1257 <xsl:if test=
"position() != last()">,
</xsl:if>
1261 <xsl:text>]
</xsl:text>
1266 <xsl:when test=
"position()=last()"><xsl:text>.
</xsl:text></xsl:when><xsl:otherwise><span class=
"separator"><xsl:text> |
</xsl:text></span></xsl:otherwise>
1274 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1275 <xsl:template name=
"subfieldSelectSubject">
1276 <xsl:param name=
"codes"/>
1277 <xsl:param name=
"delimeter"><xsl:text> </xsl:text></xsl:param>
1278 <xsl:param name=
"subdivCodes"/>
1279 <xsl:param name=
"subdivDelimiter"/>
1280 <xsl:param name=
"prefix"/>
1281 <xsl:param name=
"suffix"/>
1282 <xsl:variable name=
"str">
1283 <xsl:for-each select=
"marc:subfield">
1284 <xsl:if test=
"contains($codes, @code)">
1285 <xsl:if test=
"contains($subdivCodes, @code)">
1286 <xsl:value-of select=
"$subdivDelimiter"/>
1288 <xsl:value-of select=
"$prefix"/><xsl:value-of select=
"translate(text(),'()','')"/><xsl:value-of select=
"$suffix"/><xsl:value-of select=
"$delimeter"/>
1292 <xsl:value-of select=
"substring($str,1,string-length($str)-string-length($delimeter))"/>