1 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
6 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
7 <xsl:stylesheet version="1.0"
8 xmlns:marc="http://www.loc.gov/MARC21/slim"
9 xmlns:items="http://www.koha-community.org/items"
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 exclude-result-prefixes="marc items">
12 <xsl:import href="MARC21slimUtils.xsl"/>
13 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
18 <xsl:template match="marc:record">
20 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
21 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
25 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
26 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
27 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
28 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
30 <xsl:variable name="OpacSuppression" select="marc:sysprefs/marc:syspref[@name='OpacSuppression']"/>
31 <xsl:variable name="TracingQuotesLeft">
33 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
34 <xsl:otherwise>"</xsl:otherwise>
37 <xsl:variable name="TracingQuotesRight">
39 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
40 <xsl:otherwise>"</xsl:otherwise>
44 <xsl:variable name="leader" select="marc:leader"/>
45 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
46 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
47 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
48 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
49 <xsl:variable name="materialTypeCode">
51 <xsl:when test="$leader19='a'">ST</xsl:when>
52 <xsl:when test="$leader6='a'">
54 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
55 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
56 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
59 <xsl:when test="$leader6='t'">BK</xsl:when>
60 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
61 <xsl:when test="$leader6='m'">CF</xsl:when>
62 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
63 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
64 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
65 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
68 <xsl:variable name="materialTypeLabel">
70 <xsl:when test="$leader19='a'">Set</xsl:when>
71 <xsl:when test="$leader6='a'">
73 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
74 <xsl:when test="$leader7='i' or $leader7='s'">
76 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
77 <xsl:otherwise>Series</xsl:otherwise>
80 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
83 <xsl:when test="$leader6='t'">Book</xsl:when>
84 <xsl:when test="$leader6='o'">Kit</xsl:when>
85 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
86 <xsl:when test="$leader6='m'">Computer file</xsl:when>
87 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
88 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
89 <xsl:when test="$leader6='j'">Music</xsl:when>
90 <xsl:when test="$leader6='i'">Sound</xsl:when>
91 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
95 <!-- Indicate if record is suppressed in OPAC -->
96 <xsl:if test="$OpacSuppression = 1">
97 <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
98 <span class="results_summary suppressed_opac">Suppressed in OPAC</span>
102 <!-- Title Statement -->
103 <!-- Alternate Graphic Representation (MARC 880) -->
104 <xsl:if test="$display880">
106 <xsl:call-template name="m880Select">
107 <xsl:with-param name="basetags">245</xsl:with-param>
108 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
114 <xsl:if test="marc:datafield[@tag=245]">
115 <h1 class="title" property="name">
116 <xsl:for-each select="marc:datafield[@tag=245]">
117 <xsl:call-template name="subfieldSelect">
118 <xsl:with-param name="codes">a</xsl:with-param>
120 <xsl:text> </xsl:text>
121 <!-- 13381 add additional subfields-->
122 <!-- bz 17625 adding subfields f and g -->
123 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
125 <xsl:when test="@code='h'">
126 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
127 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
129 <xsl:when test="@code='c'">
130 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
131 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
134 <xsl:apply-templates/>
135 <xsl:text> </xsl:text>
143 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
144 <xsl:if test="$display880">
146 <xsl:call-template name="m880Select">
147 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
148 <xsl:with-param name="codes">abc</xsl:with-param>
149 <xsl:with-param name="index">au</xsl:with-param>
150 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
151 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
156 <!-- Author Statement -->
157 <xsl:call-template name="showAuthor">
158 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
159 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
162 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
163 <xsl:call-template name="showAuthor">
164 <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'])]"/>
165 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
168 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
169 <span class="results_summary type"><span class="label">Material type: </span>
170 <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>
171 <xsl:text> </xsl:text>
172 <xsl:value-of select="$materialTypeLabel"/>
177 <!--Series: Alternate Graphic Representation (MARC 880) -->
178 <xsl:if test="$display880">
179 <xsl:call-template name="m880Select">
180 <xsl:with-param name="basetags">440,490</xsl:with-param>
181 <xsl:with-param name="codes">av</xsl:with-param>
182 <xsl:with-param name="class">results_summary series</xsl:with-param>
183 <xsl:with-param name="label">Series: </xsl:with-param>
184 <xsl:with-param name="index">se</xsl:with-param>
189 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
190 <span class="results_summary series"><span class="label">Series: </span>
192 <xsl:for-each select="marc:datafield[@tag=440]">
193 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
194 <xsl:call-template name="chopPunctuation">
195 <xsl:with-param name="chopString">
196 <xsl:call-template name="subfieldSelect">
197 <xsl:with-param name="codes">av</xsl:with-param>
202 <xsl:call-template name="part"/>
203 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
206 <!-- 490 Series not traced, Ind1 = 0 -->
207 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
208 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
209 <xsl:call-template name="chopPunctuation">
210 <xsl:with-param name="chopString">
211 <xsl:call-template name="subfieldSelect">
212 <xsl:with-param name="codes">av</xsl:with-param>
217 <xsl:call-template name="part"/>
218 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
220 <!-- 490 Series traced, Ind1 = 1 -->
221 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
222 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
224 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
225 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
226 <xsl:call-template name="chopPunctuation">
227 <xsl:with-param name="chopString">
228 <xsl:call-template name="subfieldSelect">
229 <xsl:with-param name="codes">a_t</xsl:with-param>
236 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='t']"/>"&q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
237 <xsl:call-template name="chopPunctuation">
238 <xsl:with-param name="chopString">
239 <xsl:call-template name="subfieldSelect">
240 <xsl:with-param name="codes">a_t</xsl:with-param>
245 <xsl:call-template name="part"/>
248 <xsl:text>: </xsl:text>
249 <xsl:value-of select="marc:subfield[@code='v']" />
250 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
258 <xsl:if test="$leader7='s'">
259 <span class="results_summary analytics"><span class="label">Analytics: </span>
262 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
263 <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>
266 <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>
269 <xsl:text>Show analytics</xsl:text>
274 <!-- Volumes of sets and traced series -->
275 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
276 <span class="results_summary volumes"><span class="label">Volumes: </span>
279 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
280 <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>
283 <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>
286 <xsl:text>Show volumes</xsl:text>
292 <xsl:if test="$leader19='c'">
293 <span class="results_summary set"><span class="label">Set: </span>
294 <xsl:for-each select="marc:datafield[@tag=773]">
297 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
298 <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>
301 <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>
304 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
307 <xsl:when test="position()=last()"></xsl:when>
308 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
314 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
315 <xsl:if test="$display880">
316 <xsl:call-template name="m880Select">
317 <xsl:with-param name="basetags">260</xsl:with-param>
318 <xsl:with-param name="codes">abcg</xsl:with-param>
319 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
320 <xsl:with-param name="label">Publisher: </xsl:with-param>
324 <!-- Publisher info and RDA related info from tags 260, 264 -->
326 <xsl:when test="marc:datafield[@tag=264]">
327 <xsl:call-template name="showRDAtag264">
328 <xsl:with-param name="show_url">1</xsl:with-param>
331 <xsl:when test="marc:datafield[@tag=260]">
332 <span class="results_summary publisher"><span class="label">Publisher: </span>
333 <xsl:for-each select="marc:datafield[@tag=260]">
334 <xsl:if test="marc:subfield[@code='a']">
335 <xsl:call-template name="subfieldSelect">
336 <xsl:with-param name="codes">a</xsl:with-param>
339 <xsl:text> </xsl:text>
340 <xsl:if test="marc:subfield[@code='b']">
341 <a href="/cgi-bin/koha/catalogue/search.pl?q=Provider:{marc:subfield[@code='b']}">
342 <xsl:call-template name="subfieldSelect">
343 <xsl:with-param name="codes">b</xsl:with-param>
347 <xsl:text> </xsl:text>
348 <xsl:call-template name="chopPunctuation">
349 <xsl:with-param name="chopString">
350 <xsl:call-template name="subfieldSelect">
351 <xsl:with-param name="codes">cg</xsl:with-param>
355 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
361 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
362 <xsl:if test="$display880">
363 <xsl:call-template name="m880Select">
364 <xsl:with-param name="basetags">250</xsl:with-param>
365 <xsl:with-param name="codes">ab</xsl:with-param>
366 <xsl:with-param name="class">results_summary edition</xsl:with-param>
367 <xsl:with-param name="label">Edition: </xsl:with-param>
371 <xsl:if test="marc:datafield[@tag=250]">
372 <span class="results_summary edition"><span class="label">Edition: </span>
373 <xsl:for-each select="marc:datafield[@tag=250]">
374 <xsl:call-template name="chopPunctuation">
375 <xsl:with-param name="chopString">
376 <xsl:call-template name="subfieldSelect">
377 <xsl:with-param name="codes">ab</xsl:with-param>
381 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
386 <!-- Description: Alternate Graphic Representation (MARC 880) -->
387 <xsl:if test="$display880">
388 <xsl:call-template name="m880Select">
389 <xsl:with-param name="basetags">300</xsl:with-param>
390 <xsl:with-param name="codes">abceg</xsl:with-param>
391 <xsl:with-param name="class">results_summary description</xsl:with-param>
392 <xsl:with-param name="label">Description: </xsl:with-param>
396 <xsl:if test="marc:datafield[@tag=300]">
397 <span class="results_summary description"><span class="label">Description: </span>
398 <xsl:for-each select="marc:datafield[@tag=300]">
399 <xsl:call-template name="chopPunctuation">
400 <xsl:with-param name="chopString">
401 <xsl:call-template name="subfieldSelect">
402 <xsl:with-param name="codes">abcefg</xsl:with-param>
406 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
411 <!-- Content Type -->
412 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
413 <span class="results_summary" id="content_type">
414 <xsl:if test="marc:datafield[@tag=336]">
415 <span class="label">Content type: </span>
416 <xsl:for-each select="marc:datafield[@tag=336]">
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=337]">
427 <span class="label">Media type: </span>
428 <xsl:for-each select="marc:datafield[@tag=337]">
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>
436 <xsl:text> </xsl:text>
438 <xsl:if test="marc:datafield[@tag=338]">
439 <span class="label">Carrier type: </span>
440 <xsl:for-each select="marc:datafield[@tag=338]">
441 <xsl:call-template name="subfieldSelect">
442 <xsl:with-param name="codes">a</xsl:with-param>
443 <xsl:with-param name="delimeter">, </xsl:with-param>
445 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
452 <xsl:call-template name="showISBNISSN"/>
454 <xsl:if test="marc:datafield[@tag=013]">
455 <span class="results_summary patent_info">
456 <span class="label">Patent information: </span>
457 <xsl:for-each select="marc:datafield[@tag=013]">
458 <xsl:call-template name="subfieldSelect">
459 <xsl:with-param name="codes">acdef</xsl:with-param>
460 <xsl:with-param name="delimeter">, </xsl:with-param>
462 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
467 <xsl:if test="marc:datafield[@tag=088]">
468 <span class="results_summary report_number">
469 <span class="label">Report number: </span>
470 <xsl:for-each select="marc:datafield[@tag=088]">
471 <xsl:call-template name="subfieldSelect">
472 <xsl:with-param name="codes">a</xsl:with-param>
474 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
479 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
480 <xsl:if test="$display880">
481 <xsl:call-template name="m880Select">
482 <xsl:with-param name="basetags">246</xsl:with-param>
483 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
484 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
485 <xsl:with-param name="label">Other title: </xsl:with-param>
489 <xsl:if test="marc:datafield[@tag=246]">
490 <span class="results_summary other_title"><span class="label">Other title: </span>
491 <xsl:for-each select="marc:datafield[@tag=246]">
492 <xsl:call-template name="chopPunctuation">
493 <xsl:with-param name="chopString">
494 <xsl:call-template name="subfieldSelect">
495 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
499 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
501 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
502 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
503 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
504 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
505 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
506 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
507 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
508 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
509 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
512 <xsl:if test="marc:subfield[@code='i']">
513 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
515 <!-- #13386 added separator | -->
516 <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>
521 <xsl:if test="marc:datafield[@tag=242]">
522 <span class="results_summary translated_title"><span class="label">Title translated: </span>
523 <xsl:for-each select="marc:datafield[@tag=242]">
524 <xsl:call-template name="chopPunctuation">
525 <xsl:with-param name="chopString">
526 <xsl:call-template name="subfieldSelect">
527 <xsl:with-param name="codes">abchnp</xsl:with-param>
531 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
536 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
537 <xsl:if test="$display880">
538 <xsl:call-template name="m880Select">
539 <xsl:with-param name="basetags">130,240</xsl:with-param>
540 <xsl:with-param name="codes">adfklmor</xsl:with-param>
541 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
542 <xsl:with-param name="label">Uniform title: </xsl:with-param>
546 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
547 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
548 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
549 <xsl:for-each select="marc:subfield">
550 <xsl:if test="contains('adfghklmnoprst',@code)">
551 <xsl:value-of select="text()"/>
552 <xsl:text> </xsl:text>
555 <xsl:if test="position() != last()">
556 <span class="separator"><xsl:text> | </xsl:text></span>
562 <!-- #13382 Added Related works 700$i -->
563 <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']]">
564 <span class="results_summary related_works"><span class="label">Related works: </span>
565 <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']]">
566 <xsl:variable name="str">
567 <xsl:call-template name="subfieldSelect">
568 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
571 <xsl:call-template name="chopPunctuation">
572 <xsl:with-param name="chopString">
573 <xsl:value-of select="$str"/>
576 <!-- add relator code too between brackets-->
577 <xsl:if test="marc:subfield[@code='4' or @code='e']">
578 <span class="relatorcode">
579 <xsl:text> [</xsl:text>
581 <xsl:when test="marc:subfield[@code='e']">
582 <xsl:for-each select="marc:subfield[@code='e']">
583 <xsl:value-of select="."/>
584 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
588 <xsl:for-each select="marc:subfield[@code='4']">
589 <xsl:value-of select="."/>
590 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
594 <xsl:text>]</xsl:text>
598 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
604 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
605 <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'])]">
606 <span class="results_summary contained_works"><span class="label">Contained works: </span>
607 <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'])]">
608 <xsl:variable name="str">
609 <xsl:call-template name="subfieldSelect">
610 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
613 <xsl:call-template name="chopPunctuation">
614 <xsl:with-param name="chopString">
615 <xsl:value-of select="$str"/>
618 <!-- add relator code too between brackets-->
619 <xsl:if test="marc:subfield[@code='4' or @code='e']">
620 <span class="relatorcode">
621 <xsl:text> [</xsl:text>
623 <xsl:when test="marc:subfield[@code='e']">
624 <xsl:for-each select="marc:subfield[@code='e']">
625 <xsl:value-of select="."/>
626 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
630 <xsl:for-each select="marc:subfield[@code='4']">
631 <xsl:value-of select="."/>
632 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
636 <xsl:text>]</xsl:text>
640 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
647 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
648 <span class="results_summary subjects"><span class="label">Subject(s): </span>
649 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
652 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
653 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
654 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
656 <xsl:when test="$TraceSubjectSubdivisions='1'">
657 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
658 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
659 <xsl:with-param name="delimeter"> AND </xsl:with-param>
660 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
661 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
666 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
668 <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>
672 <xsl:call-template name="chopPunctuation">
673 <xsl:with-param name="chopString">
674 <xsl:call-template name="subfieldSelect">
675 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
676 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
677 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
683 <xsl:if test="marc:subfield[@code=9]">
684 <xsl:text> </xsl:text>
686 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
687 <xsl:element name="img">
688 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
689 <xsl:attribute name="alt"></xsl:attribute>
690 <xsl:attribute name="height">15</xsl:attribute>
691 <xsl:attribute name="width">15</xsl:attribute>
697 <xsl:when test="position()=last()"></xsl:when>
698 <xsl:otherwise> | </xsl:otherwise>
706 <xsl:if test="marc:datafield[@tag=655]">
707 <span class="results_summary genre"><span class="label">Genre/Form: </span>
708 <xsl:for-each select="marc:datafield[@tag=655]">
711 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
712 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
714 <xsl:when test="$TraceSubjectSubdivisions='1'">
715 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
716 <xsl:with-param name="codes">avxyz</xsl:with-param>
717 <xsl:with-param name="delimeter"> AND </xsl:with-param>
718 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
719 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
724 <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>
727 <xsl:call-template name="subfieldSelect">
728 <xsl:with-param name="codes">avxyz</xsl:with-param>
729 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
730 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
733 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
738 <!-- MARC21 776 Additional Physical Form Entry -->
739 <xsl:if test="marc:datafield[@tag=776]">
740 <span class="results_summary add_physical_form">
741 <span class="label">Additional physical formats: </span>
742 <xsl:for-each select="marc:datafield[@tag=776]">
743 <xsl:variable name="linktext">
745 <xsl:when test="marc:subfield[@code='t']">
746 <xsl:value-of select="marc:subfield[@code='t']"/>
748 <xsl:when test="marc:subfield[@code='a']">
749 <xsl:value-of select="marc:subfield[@code='a']"/>
752 <xsl:text>No title</xsl:text>
756 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
757 <xsl:call-template name="subfieldSelect">
758 <xsl:with-param name="codes">i</xsl:with-param>
760 <xsl:text>: </xsl:text>
763 <xsl:when test="marc:subfield[@code='w']">
765 <xsl:attribute name="href">
766 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
767 <xsl:call-template name="extractControlNumber">
768 <xsl:with-param name="subfieldW">
769 <xsl:value-of select="marc:subfield[@code='w']"/>
773 <xsl:value-of select="$linktext"/>
777 <xsl:value-of select="$linktext"/>
780 <xsl:if test="position() != last()">
781 <xsl:text>; </xsl:text>
787 <!-- DDC classification -->
788 <xsl:if test="marc:datafield[@tag=082]">
789 <span class="results_summary ddc">
790 <span class="label">DDC classification: </span>
791 <xsl:for-each select="marc:datafield[@tag=082]">
792 <xsl:call-template name="subfieldSelect">
793 <xsl:with-param name="codes">a</xsl:with-param>
794 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
797 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
798 <xsl:otherwise> | </xsl:otherwise>
804 <!-- Other classification -->
805 <xsl:if test="marc:datafield[@tag=084]">
806 <span class="results_summary oc">
807 <span class="label">Other classification: </span>
808 <xsl:for-each select="marc:datafield[@tag=084]">
809 <xsl:call-template name="subfieldSelect">
810 <xsl:with-param name="codes">a</xsl:with-param>
811 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
814 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
815 <xsl:otherwise> | </xsl:otherwise>
821 <xsl:if test="marc:datafield[@tag=856]">
822 <span class="results_summary online_resources"><span class="label">Online resources: </span>
823 <xsl:for-each select="marc:datafield[@tag=856]">
824 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
825 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
827 <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')">
828 <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>
830 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
831 <xsl:call-template name="subfieldSelect">
832 <xsl:with-param name="codes">y3z</xsl:with-param>
835 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
837 <xsl:when test="$URLLinkText!=''">
838 <xsl:value-of select="$URLLinkText"/>
841 <xsl:text>Click here to access online</xsl:text>
848 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
849 <xsl:otherwise> | </xsl:otherwise>
855 <xsl:if test="marc:datafield[@tag=505]">
856 <div class="results_summary contents">
858 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
859 <span class="label">Contents:</span>
861 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
862 <span class="label">Incomplete contents:</span>
864 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
865 <span class="label">Partial contents:</span>
868 <xsl:for-each select="marc:datafield[@tag=505]">
869 <div class='contentblock'>
871 <xsl:when test="@ind2=0">
872 <xsl:call-template name="subfieldSelectSpan">
873 <xsl:with-param name="codes">tru</xsl:with-param>
877 <xsl:call-template name="subfieldSelectSpan">
878 <xsl:with-param name="codes">atru</xsl:with-param>
888 <xsl:if test="marc:datafield[@tag=586]">
889 <span class="results_summary awardsnote">
890 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
891 <span class="label">Awards: </span>
893 <xsl:for-each select="marc:datafield[@tag=586]">
894 <xsl:value-of select="marc:subfield[@code='a']"/>
895 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
901 <xsl:if test="marc:datafield[@tag=583]">
902 <xsl:for-each select="marc:datafield[@tag=583]">
903 <xsl:if test="@ind1=1 or @ind1=' '">
904 <span class="results_summary actionnote">
905 <span class="label">Action note: </span>
907 <xsl:when test="marc:subfield[@code='z']">
908 <xsl:value-of select="marc:subfield[@code='z']"/>
911 <xsl:call-template name="subfieldSelect">
912 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
922 <xsl:if test="marc:datafield[@tag=508]">
923 <div class="results_summary prod_credits">
924 <span class="label">Production credits: </span>
925 <xsl:for-each select="marc:datafield[@tag=508]">
926 <xsl:call-template name="subfieldSelectSpan">
927 <xsl:with-param name="codes">a</xsl:with-param>
929 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
935 <xsl:if test="marc:datafield[@tag=773]">
936 <xsl:for-each select="marc:datafield[@tag=773]">
937 <xsl:if test="@ind1 !=1">
938 <span class="results_summary in"><span class="label">
940 <xsl:when test="@ind2=' '">
943 <xsl:when test="@ind2=8">
944 <xsl:if test="marc:subfield[@code='i']">
945 <xsl:value-of select="marc:subfield[@code='i']"/>
950 <xsl:variable name="f773">
951 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
952 <xsl:with-param name="codes">a_t</xsl:with-param>
953 </xsl:call-template></xsl:with-param></xsl:call-template>
956 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
957 <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>
958 <xsl:value-of select="translate($f773, '()', '')"/>
961 <xsl:when test="marc:subfield[@code='0']">
962 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
963 <xsl:value-of select="$f773"/>
967 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
968 <xsl:value-of select="$f773"/>
972 <xsl:if test="marc:subfield[@code='g']">
973 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
978 <xsl:if test="marc:subfield[@code='n']">
979 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
986 <xsl:if test="marc:datafield[@tag=502]">
987 <span class="results_summary diss_note">
988 <span class="label">Dissertation note: </span>
989 <xsl:for-each select="marc:datafield[@tag=502]">
990 <xsl:call-template name="subfieldSelect">
991 <xsl:with-param name="codes">abcdgo</xsl:with-param>
994 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
998 <!-- 866 textual holdings -->
999 <xsl:if test="marc:datafield[@tag=866]">
1000 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
1001 <xsl:for-each select="marc:datafield[@tag=866]">
1002 <xsl:call-template name="subfieldSelect">
1003 <xsl:with-param name="codes">axz</xsl:with-param>
1004 </xsl:call-template>
1005 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1010 <!-- 775 Other Edition -->
1011 <xsl:if test="marc:datafield[@tag=775]">
1012 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1013 <xsl:for-each select="marc:datafield[@tag=775]">
1014 <xsl:variable name="f775">
1015 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1016 <xsl:with-param name="codes">a_t</xsl:with-param>
1017 </xsl:call-template></xsl:with-param></xsl:call-template>
1019 <xsl:if test="marc:subfield[@code='i']">
1020 <xsl:call-template name="subfieldSelect">
1021 <xsl:with-param name="codes">i</xsl:with-param>
1022 </xsl:call-template>
1023 <xsl:text>: </xsl:text>
1027 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1028 <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>
1031 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
1034 <xsl:call-template name="subfieldSelect">
1035 <xsl:with-param name="codes">a_t</xsl:with-param>
1036 </xsl:call-template>
1039 <xsl:when test="position()=last()"></xsl:when>
1040 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1047 <xsl:if test="marc:datafield[@tag=780]">
1048 <xsl:for-each select="marc:datafield[@tag=780]">
1049 <xsl:if test="@ind1=0">
1050 <span class="results_summary preceeding_entry">
1052 <xsl:when test="@ind2=0">
1053 <span class="label">Continues:</span>
1055 <xsl:when test="@ind2=1">
1056 <span class="label">Continues in part:</span>
1058 <xsl:when test="@ind2=2">
1059 <span class="label">Supersedes:</span>
1061 <xsl:when test="@ind2=3">
1062 <span class="label">Supersedes in part:</span>
1064 <xsl:when test="@ind2=4">
1065 <span class="label">Formed by the union: ... and: ...</span>
1067 <xsl:when test="@ind2=5">
1068 <span class="label">Absorbed:</span>
1070 <xsl:when test="@ind2=6">
1071 <span class="label">Absorbed in part:</span>
1073 <xsl:when test="@ind2=7">
1074 <span class="label">Separated from:</span>
1077 <xsl:text> </xsl:text>
1078 <xsl:variable name="f780">
1079 <xsl:call-template name="subfieldSelect">
1080 <xsl:with-param name="codes">a_t</xsl:with-param>
1081 </xsl:call-template>
1084 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1085 <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>
1086 <xsl:value-of select="translate($f780, '()', '')"/>
1090 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1091 <xsl:value-of select="translate($f780, '()', '')"/>
1097 <xsl:if test="marc:subfield[@code='n']">
1098 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1106 <xsl:if test="marc:datafield[@tag=785]">
1107 <xsl:for-each select="marc:datafield[@tag=785]">
1108 <span class="results_summary succeeding_entry">
1110 <xsl:when test="@ind2=0">
1111 <span class="label">Continued by:</span>
1113 <xsl:when test="@ind2=1">
1114 <span class="label">Continued in part by:</span>
1116 <xsl:when test="@ind2=2">
1117 <span class="label">Superseded by:</span>
1119 <xsl:when test="@ind2=3">
1120 <span class="label">Superseded in part by:</span>
1122 <xsl:when test="@ind2=4">
1123 <span class="label">Absorbed by:</span>
1125 <xsl:when test="@ind2=5">
1126 <span class="label">Absorbed in part by:</span>
1128 <xsl:when test="@ind2=6">
1129 <span class="label">Split into .. and ...:</span>
1131 <xsl:when test="@ind2=7">
1132 <span class="label">Merged with ... to form ...</span>
1134 <xsl:when test="@ind2=8">
1135 <span class="label">Changed back to:</span>
1138 <xsl:text> </xsl:text>
1139 <xsl:variable name="f785">
1140 <xsl:call-template name="subfieldSelect">
1141 <xsl:with-param name="codes">a_t</xsl:with-param>
1142 </xsl:call-template>
1146 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1147 <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>
1148 <xsl:value-of select="translate($f785, '()', '')"/>
1152 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1153 <xsl:value-of select="translate($f785, '()', '')"/>
1162 <xsl:if test="$OPACBaseURL!=''">
1163 <span class="results_summary"><span class="label">OPAC view: </span>
1164 <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>.
1170 <xsl:template name="nameABCQ">
1171 <xsl:call-template name="chopPunctuation">
1172 <xsl:with-param name="chopString">
1173 <xsl:call-template name="subfieldSelect">
1174 <xsl:with-param name="codes">abcq</xsl:with-param>
1175 </xsl:call-template>
1177 <xsl:with-param name="punctuation">
1178 <xsl:text>:,;/ </xsl:text>
1180 </xsl:call-template>
1183 <xsl:template name="nameABCDN">
1184 <xsl:call-template name="chopPunctuation">
1185 <xsl:with-param name="chopString">
1186 <xsl:call-template name="subfieldSelect">
1187 <xsl:with-param name="codes">abcdn</xsl:with-param>
1188 </xsl:call-template>
1190 <xsl:with-param name="punctuation">
1191 <xsl:text>:,;/ </xsl:text>
1193 </xsl:call-template>
1196 <xsl:template name="nameACDEQ">
1197 <xsl:call-template name="subfieldSelect">
1198 <xsl:with-param name="codes">acdeq</xsl:with-param>
1199 </xsl:call-template>
1202 <xsl:template name="part">
1203 <xsl:variable name="partNumber">
1204 <xsl:call-template name="specialSubfieldSelect">
1205 <xsl:with-param name="axis">n</xsl:with-param>
1206 <xsl:with-param name="anyCodes">n</xsl:with-param>
1207 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1208 </xsl:call-template>
1210 <xsl:variable name="partName">
1211 <xsl:call-template name="specialSubfieldSelect">
1212 <xsl:with-param name="axis">p</xsl:with-param>
1213 <xsl:with-param name="anyCodes">p</xsl:with-param>
1214 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1215 </xsl:call-template>
1217 <xsl:if test="string-length(normalize-space($partNumber))">
1218 <xsl:call-template name="chopPunctuation">
1219 <xsl:with-param name="chopString" select="$partNumber"/>
1220 </xsl:call-template>
1222 <xsl:if test="string-length(normalize-space($partName))">
1223 <xsl:call-template name="chopPunctuation">
1224 <xsl:with-param name="chopString" select="$partName"/>
1225 </xsl:call-template>
1229 <xsl:template name="specialSubfieldSelect">
1230 <xsl:param name="anyCodes"/>
1231 <xsl:param name="axis"/>
1232 <xsl:param name="beforeCodes"/>
1233 <xsl:param name="afterCodes"/>
1234 <xsl:variable name="str">
1235 <xsl:for-each select="marc:subfield">
1236 <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])">
1237 <xsl:value-of select="text()"/>
1238 <xsl:text> </xsl:text>
1242 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1245 <xsl:template name="showAuthor">
1246 <xsl:param name="authorfield"/>
1247 <xsl:param name="UseAuthoritiesForTracings"/>
1248 <xsl:if test="count($authorfield)>0">
1250 <xsl:for-each select="$authorfield">
1252 <xsl:when test="position()>1"/>
1254 <xsl:when test="@tag<700">By: </xsl:when>
1255 <!--#13382 Changed Additional author to contributor -->
1256 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1260 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1261 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1264 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1268 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1270 <xsl:call-template name="chopPunctuation">
1271 <xsl:with-param name="chopString">
1272 <xsl:call-template name="subfieldSelect">
1273 <xsl:with-param name="codes">
1275 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1276 <xsl:when test="@tag=111">aeq</xsl:when>
1277 <xsl:when test="@tag=110">ab</xsl:when>
1278 <xsl:otherwise>abcjq</xsl:otherwise>
1281 </xsl:call-template>
1283 <xsl:with-param name="punctuation">
1284 <xsl:text>:,;/ </xsl:text>
1286 </xsl:call-template>
1287 <!-- Display only name and title portion in 110 field -->
1288 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1289 <span class="titleportion">
1291 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1292 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1294 <xsl:call-template name="chopPunctuation">
1295 <xsl:with-param name="chopString">
1296 <xsl:call-template name="subfieldSelect">
1297 <xsl:with-param name="codes">cdnt</xsl:with-param>
1298 </xsl:call-template>
1300 </xsl:call-template>
1303 <!-- Display only name and title portion in 111 field -->
1304 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1305 <span class="titleportion">
1307 <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>
1308 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1311 <xsl:call-template name="chopPunctuation">
1312 <xsl:with-param name="chopString">
1313 <xsl:call-template name="subfieldSelect">
1314 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1315 </xsl:call-template>
1317 </xsl:call-template>
1320 <!-- Display only dates in 100 field -->
1321 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1322 <span class="authordates">
1323 <xsl:text>, </xsl:text>
1324 <xsl:call-template name="chopPunctuation">
1325 <xsl:with-param name="chopString">
1326 <xsl:call-template name="subfieldSelect">
1327 <xsl:with-param name="codes">d</xsl:with-param>
1328 </xsl:call-template>
1330 </xsl:call-template>
1335 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1336 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1337 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1338 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1339 <xsl:if test="@tag=710 or @tag=711">
1340 <xsl:call-template name="chopPunctuation">
1341 <xsl:with-param name="chopString">
1342 <xsl:call-template name="subfieldSelect">
1343 <xsl:with-param name="codes">
1345 <xsl:when test="@tag=711">aeq</xsl:when>
1346 <xsl:otherwise>ab</xsl:otherwise>
1349 </xsl:call-template>
1351 <xsl:with-param name="punctuation">
1352 <xsl:text>:,;/ </xsl:text>
1354 </xsl:call-template>
1355 <!-- Display only name and title portion in 711 field -->
1356 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1357 <span class="titleportion">
1359 <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>
1360 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1363 <xsl:call-template name="chopPunctuation">
1364 <xsl:with-param name="chopString">
1365 <xsl:call-template name="subfieldSelect">
1366 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1367 </xsl:call-template>
1369 </xsl:call-template>
1372 <!-- Display only name and title portion in 710 field -->
1373 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1374 <span class="titleportion">
1376 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1377 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1379 <xsl:call-template name="chopPunctuation">
1380 <xsl:with-param name="chopString">
1381 <xsl:call-template name="subfieldSelect">
1382 <xsl:with-param name="codes">cdnt</xsl:with-param>
1383 </xsl:call-template>
1385 </xsl:call-template>
1390 <!-- Display only name portion in 700 field -->
1391 <xsl:if test="@tag=700">
1392 <xsl:call-template name="chopPunctuation">
1393 <xsl:with-param name="chopString">
1394 <xsl:call-template name="subfieldSelect">
1395 <xsl:with-param name="codes">abcq</xsl:with-param>
1396 </xsl:call-template>
1398 </xsl:call-template>
1400 <!-- Display class "authordates" in 700 field -->
1401 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1402 <span class="authordates">
1403 <xsl:text>, </xsl:text>
1404 <xsl:call-template name="chopPunctuation">
1405 <xsl:with-param name="chopString">
1406 <xsl:call-template name="subfieldSelect">
1407 <xsl:with-param name="codes">d</xsl:with-param>
1408 </xsl:call-template>
1410 </xsl:call-template>
1413 <!-- Display class "titleportion" in 700 field -->
1414 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1415 <xsl:if test="@tag=700 and $titleportionfields">
1416 <span class="titleportion">
1417 <xsl:text>. </xsl:text>
1418 <xsl:call-template name="chopPunctuation">
1419 <xsl:with-param name="chopString">
1420 <xsl:call-template name="subfieldSelect">
1421 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1422 </xsl:call-template>
1424 </xsl:call-template>
1431 <!-- add relator code too between brackets-->
1432 <!-- #13383 include relator code j for field 111 -->
1433 <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'][. != ''])">
1434 <span class="relatorcode">
1435 <xsl:text> [</xsl:text>
1437 <xsl:when test="@tag=111 or @tag=711">
1439 <!-- Prefer j over 4 for fields 111 and 711-->
1440 <xsl:when test="marc:subfield[@code='j']">
1441 <xsl:for-each select="marc:subfield[@code='j']">
1442 <xsl:value-of select="."/>
1443 <xsl:if test="position() != last()">, </xsl:if>
1447 <xsl:for-each select="marc:subfield[@code=4]">
1448 <xsl:value-of select="."/>
1449 <xsl:if test="position() != last()">, </xsl:if>
1454 <!-- Prefer e over 4 for fields 111 and 711-->
1455 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1456 <xsl:for-each select="marc:subfield[@code='e']">
1457 <xsl:value-of select="."/>
1458 <xsl:if test="position() != last()">, </xsl:if>
1462 <xsl:for-each select="marc:subfield[@code=4]">
1463 <xsl:value-of select="."/>
1464 <xsl:if test="position() != last()">, </xsl:if>
1468 <xsl:text>]</xsl:text>
1473 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1481 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1482 <xsl:template name="subfieldSelectSubject">
1483 <xsl:param name="codes"/>
1484 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1485 <xsl:param name="subdivCodes"/>
1486 <xsl:param name="subdivDelimiter"/>
1487 <xsl:param name="prefix"/>
1488 <xsl:param name="suffix"/>
1489 <xsl:variable name="str">
1490 <xsl:for-each select="marc:subfield">
1491 <xsl:if test="contains($codes, @code)">
1492 <xsl:if test="contains($subdivCodes, @code)">
1493 <xsl:value-of select="$subdivDelimiter"/>
1495 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1499 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>