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 <xsl:stylesheet version="1.0"
7 xmlns:marc="http://www.loc.gov/MARC21/slim"
8 xmlns:items="http://www.koha-community.org/items"
9 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 exclude-result-prefixes="marc items">
11 <xsl:import href="MARC21slimUtils.xsl"/>
12 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
13 <xsl:template match="/">
14 <xsl:apply-templates/>
17 <xsl:template match="marc:record">
19 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
20 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
21 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
22 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
23 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
24 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
25 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
26 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
27 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
28 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
29 <xsl:variable name="TracingQuotesLeft">
31 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
32 <xsl:otherwise>"</xsl:otherwise>
35 <xsl:variable name="TracingQuotesRight">
37 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
38 <xsl:otherwise>"</xsl:otherwise>
41 <xsl:variable name="leader" select="marc:leader"/>
42 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
43 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
44 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
45 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
46 <xsl:variable name="materialTypeCode">
48 <xsl:when test="$leader19='a'">ST</xsl:when>
49 <xsl:when test="$leader6='a'">
51 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
52 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
53 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
56 <xsl:when test="$leader6='t'">BK</xsl:when>
57 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
58 <xsl:when test="$leader6='m'">CF</xsl:when>
59 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
60 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
61 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
62 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
65 <xsl:variable name="materialTypeLabel">
67 <xsl:when test="$leader19='a'">Set</xsl:when>
68 <xsl:when test="$leader6='a'">
70 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
71 <xsl:when test="$leader7='i' or $leader7='s'">
73 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
74 <xsl:otherwise>Series</xsl:otherwise>
77 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
80 <xsl:when test="$leader6='t'">Book</xsl:when>
81 <xsl:when test="$leader6='o'">Kit</xsl:when>
82 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
83 <xsl:when test="$leader6='m'">Computer file</xsl:when>
84 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
85 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
86 <xsl:when test="$leader6='j'">Music</xsl:when>
87 <xsl:when test="$leader6='i'">Sound</xsl:when>
88 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
92 <!-- Title Statement -->
93 <!-- Alternate Graphic Representation (MARC 880) -->
94 <xsl:if test="$display880">
96 <xsl:call-template name="m880Select">
97 <xsl:with-param name="basetags">245</xsl:with-param>
98 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
103 <xsl:if test="marc:datafield[@tag=245]">
105 <xsl:for-each select="marc:datafield[@tag=245]">
106 <xsl:call-template name="subfieldSelect">
107 <xsl:with-param name="codes">a</xsl:with-param>
109 <xsl:if test="marc:subfield[@code='h']">
110 <xsl:text> </xsl:text>
111 <xsl:call-template name="subfieldSelect">
112 <xsl:with-param name="codes">h</xsl:with-param>
115 <xsl:if test="marc:subfield[@code='b']">
116 <xsl:text> </xsl:text>
117 <xsl:call-template name="subfieldSelect">
118 <xsl:with-param name="codes">b</xsl:with-param>
121 <xsl:text> </xsl:text>
122 <xsl:call-template name="subfieldSelect">
123 <xsl:with-param name="codes">fgknps</xsl:with-param>
129 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
130 <xsl:if test="$display880">
132 <xsl:call-template name="m880Select">
133 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
134 <xsl:with-param name="codes">abc</xsl:with-param>
135 <xsl:with-param name="index">au</xsl:with-param>
136 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
137 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
142 <!-- Author Statement -->
143 <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
144 <xsl:call-template name="showAuthor"><xsl:with-param name="authorfield" select="marc:datafield[@tag=700 or @tag=710 or @tag=711]"/><xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/></xsl:call-template>
146 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
147 <span class="results_summary type"><span class="label">Material type: </span>
148 <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>
149 <xsl:text> </xsl:text>
150 <xsl:value-of select="$materialTypeLabel"/>
155 <!--Series: Alternate Graphic Representation (MARC 880) -->
156 <xsl:if test="$display880">
157 <xsl:call-template name="m880Select">
158 <xsl:with-param name="basetags">440,490</xsl:with-param>
159 <xsl:with-param name="codes">av</xsl:with-param>
160 <xsl:with-param name="class">results_summary series</xsl:with-param>
161 <xsl:with-param name="label">Series: </xsl:with-param>
162 <xsl:with-param name="index">se</xsl:with-param>
167 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
168 <span class="results_summary series"><span class="label">Series: </span>
170 <xsl:for-each select="marc:datafield[@tag=440]">
171 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
172 <xsl:call-template name="chopPunctuation">
173 <xsl:with-param name="chopString">
174 <xsl:call-template name="subfieldSelect">
175 <xsl:with-param name="codes">av</xsl:with-param>
180 <xsl:call-template name="part"/>
181 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
184 <!-- 490 Series not traced, Ind1 = 0 -->
185 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
186 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
187 <xsl:call-template name="chopPunctuation">
188 <xsl:with-param name="chopString">
189 <xsl:call-template name="subfieldSelect">
190 <xsl:with-param name="codes">av</xsl:with-param>
195 <xsl:call-template name="part"/>
196 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
198 <!-- 490 Series traced, Ind1 = 1 -->
199 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
200 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
202 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
203 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
204 <xsl:call-template name="chopPunctuation">
205 <xsl:with-param name="chopString">
206 <xsl:call-template name="subfieldSelect">
207 <xsl:with-param name="codes">a_t</xsl:with-param>
214 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
215 <xsl:call-template name="chopPunctuation">
216 <xsl:with-param name="chopString">
217 <xsl:call-template name="subfieldSelect">
218 <xsl:with-param name="codes">a_t</xsl:with-param>
223 <xsl:call-template name="part"/>
226 <xsl:text>: </xsl:text>
227 <xsl:value-of select="marc:subfield[@code='v']" />
228 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
236 <xsl:if test="$leader7='s'">
237 <span class="results_summary analytics"><span class="label">Analytics: </span>
240 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
241 <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>
244 <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>
247 <xsl:text>Show analytics</xsl:text>
252 <!-- Volumes of sets and traced series -->
253 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
254 <span class="results_summary volumes"><span class="label">Volumes: </span>
257 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
258 <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>
261 <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>
264 <xsl:text>Show volumes</xsl:text>
270 <xsl:if test="$leader19='c'">
271 <span class="results_summary set"><span class="label">Set: </span>
272 <xsl:for-each select="marc:datafield[@tag=773]">
275 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
276 <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>
279 <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>
282 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
285 <xsl:when test="position()=last()"></xsl:when>
286 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
292 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
293 <xsl:if test="$display880">
294 <xsl:call-template name="m880Select">
295 <xsl:with-param name="basetags">260</xsl:with-param>
296 <xsl:with-param name="codes">abcg</xsl:with-param>
297 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
298 <xsl:with-param name="label">Publisher: </xsl:with-param>
302 <!-- Publisher info and RDA related info from tags 260, 264 -->
304 <xsl:when test="marc:datafield[@tag=260]">
305 <span class="results_summary publisher"><span class="label">Publisher: </span>
306 <xsl:for-each select="marc:datafield[@tag=260]">
307 <xsl:if test="marc:subfield[@code='a']">
308 <xsl:call-template name="subfieldSelect">
309 <xsl:with-param name="codes">a</xsl:with-param>
312 <xsl:text> </xsl:text>
313 <xsl:if test="marc:subfield[@code='b']">
314 <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
315 <xsl:call-template name="subfieldSelect">
316 <xsl:with-param name="codes">b</xsl:with-param>
320 <xsl:text> </xsl:text>
321 <xsl:call-template name="chopPunctuation">
322 <xsl:with-param name="chopString">
323 <xsl:call-template name="subfieldSelect">
324 <xsl:with-param name="codes">cg</xsl:with-param>
328 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
330 <xsl:if test="marc:datafield[@tag=264]">
331 <xsl:text>; </xsl:text>
332 <xsl:call-template name="showRDAtag264"/>
336 <xsl:when test="marc:datafield[@tag=264]">
337 <span class="results_summary">
338 <xsl:call-template name="showRDAtag264"/>
343 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
344 <xsl:if test="$display880">
345 <xsl:call-template name="m880Select">
346 <xsl:with-param name="basetags">250</xsl:with-param>
347 <xsl:with-param name="codes">ab</xsl:with-param>
348 <xsl:with-param name="class">results_summary edition</xsl:with-param>
349 <xsl:with-param name="label">Edition: </xsl:with-param>
353 <xsl:if test="marc:datafield[@tag=250]">
354 <span class="results_summary edition"><span class="label">Edition: </span>
355 <xsl:for-each select="marc:datafield[@tag=250]">
356 <xsl:call-template name="chopPunctuation">
357 <xsl:with-param name="chopString">
358 <xsl:call-template name="subfieldSelect">
359 <xsl:with-param name="codes">ab</xsl:with-param>
363 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
368 <!-- Description: Alternate Graphic Representation (MARC 880) -->
369 <xsl:if test="$display880">
370 <xsl:call-template name="m880Select">
371 <xsl:with-param name="basetags">300</xsl:with-param>
372 <xsl:with-param name="codes">abceg</xsl:with-param>
373 <xsl:with-param name="class">results_summary description</xsl:with-param>
374 <xsl:with-param name="label">Description: </xsl:with-param>
378 <xsl:if test="marc:datafield[@tag=300]">
379 <span class="results_summary description"><span class="label">Description: </span>
380 <xsl:for-each select="marc:datafield[@tag=300]">
381 <xsl:call-template name="chopPunctuation">
382 <xsl:with-param name="chopString">
383 <xsl:call-template name="subfieldSelect">
384 <xsl:with-param name="codes">abceg</xsl:with-param>
388 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
393 <xsl:if test="marc:datafield[@tag=020]">
394 <span class="results_summary isbn"><span class="label">ISBN: </span>
395 <xsl:for-each select="marc:datafield[@tag=020]">
396 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
397 <xsl:value-of select="marc:subfield[@code='a']"/>
398 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
404 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
405 <span class="results_summary issn"><span class="label">ISSN: </span>
406 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
407 <span property="issn">
408 <xsl:value-of select="."/>
410 <xsl:when test="position()=last()">
411 <xsl:text>.</xsl:text>
414 <xsl:text>; </xsl:text>
422 <xsl:if test="marc:datafield[@tag=013]">
423 <span class="results_summary patent_info">
424 <span class="label">Patent information: </span>
425 <xsl:for-each select="marc:datafield[@tag=013]">
426 <xsl:call-template name="subfieldSelect">
427 <xsl:with-param name="codes">acdef</xsl:with-param>
428 <xsl:with-param name="delimeter">, </xsl:with-param>
430 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
435 <xsl:if test="marc:datafield[@tag=088]">
436 <span class="results_summary report_number">
437 <span class="label">Report number: </span>
438 <xsl:for-each select="marc:datafield[@tag=088]">
439 <xsl:call-template name="subfieldSelect">
440 <xsl:with-param name="codes">a</xsl:with-param>
442 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
447 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
448 <xsl:if test="$display880">
449 <xsl:call-template name="m880Select">
450 <xsl:with-param name="basetags">246</xsl:with-param>
451 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
452 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
453 <xsl:with-param name="label">Other title: </xsl:with-param>
457 <xsl:if test="marc:datafield[@tag=246]">
458 <span class="results_summary other_title"><span class="label">Other title: </span>
459 <xsl:for-each select="marc:datafield[@tag=246]">
460 <xsl:call-template name="chopPunctuation">
461 <xsl:with-param name="chopString">
462 <xsl:call-template name="subfieldSelect">
463 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
467 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
472 <xsl:if test="marc:datafield[@tag=242]">
473 <span class="results_summary translated_title"><span class="label">Title translated: </span>
474 <xsl:for-each select="marc:datafield[@tag=242]">
475 <xsl:call-template name="chopPunctuation">
476 <xsl:with-param name="chopString">
477 <xsl:call-template name="subfieldSelect">
478 <xsl:with-param name="codes">abchnp</xsl:with-param>
482 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
487 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
488 <xsl:if test="$display880">
489 <xsl:call-template name="m880Select">
490 <xsl:with-param name="basetags">130,240</xsl:with-param>
491 <xsl:with-param name="codes">adfklmor</xsl:with-param>
492 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
493 <xsl:with-param name="label">Uniform title: </xsl:with-param>
497 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
498 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
499 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
500 <xsl:variable name="str">
501 <xsl:for-each select="marc:subfield">
502 <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
503 <xsl:value-of select="text()"/>
504 <xsl:text> </xsl:text>
508 <xsl:call-template name="chopPunctuation">
509 <xsl:with-param name="chopString">
510 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
514 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
519 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
520 <span class="results_summary subjects"><span class="label">Subject(s): </span>
521 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
524 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
525 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
527 <xsl:when test="$TraceSubjectSubdivisions='1'">
528 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
529 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
530 <xsl:with-param name="delimeter"> AND </xsl:with-param>
531 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
532 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
537 <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>
540 <xsl:call-template name="chopPunctuation">
541 <xsl:with-param name="chopString">
542 <xsl:call-template name="subfieldSelect">
543 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
544 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
545 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
551 <xsl:when test="position()=last()"></xsl:when>
552 <xsl:otherwise> | </xsl:otherwise>
559 <xsl:if test="marc:datafield[@tag=856]">
560 <span class="results_summary online_resources"><span class="label">Online resources: </span>
561 <xsl:for-each select="marc:datafield[@tag=856]">
562 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
563 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
565 <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')">
566 <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>
568 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
569 <xsl:call-template name="subfieldSelect">
570 <xsl:with-param name="codes">y3z</xsl:with-param>
573 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
575 <xsl:when test="$URLLinkText!=''">
576 <xsl:value-of select="$URLLinkText"/>
579 <xsl:text>Click here to access online</xsl:text>
586 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
587 <xsl:otherwise> | </xsl:otherwise>
593 <xsl:if test="marc:datafield[@tag=505]">
594 <div class="results_summary contents">
596 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
597 <span class="label">Contents:</span>
599 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
600 <span class="label">Incomplete contents:</span>
602 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
603 <span class="label">Partial contents:</span>
606 <xsl:for-each select="marc:datafield[@tag=505]">
607 <div class='contentblock'>
609 <xsl:when test="@ind2=0">
610 <xsl:call-template name="subfieldSelectSpan">
611 <xsl:with-param name="codes">tru</xsl:with-param>
615 <xsl:call-template name="subfieldSelectSpan">
616 <xsl:with-param name="codes">atru</xsl:with-param>
626 <xsl:if test="marc:datafield[@tag=773]">
627 <xsl:for-each select="marc:datafield[@tag=773]">
628 <xsl:if test="@ind1=0">
629 <span class="results_summary in"><span class="label">
631 <xsl:when test="@ind2=' '">
634 <xsl:when test="@ind2=8">
635 <xsl:if test="marc:subfield[@code='i']">
636 <xsl:value-of select="marc:subfield[@code='i']"/>
641 <xsl:variable name="f773">
642 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
643 <xsl:with-param name="codes">a_t</xsl:with-param>
644 </xsl:call-template></xsl:with-param></xsl:call-template>
647 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
648 <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>
649 <xsl:value-of select="translate($f773, '()', '')"/>
651 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
653 <xsl:when test="marc:subfield[@code='0']">
654 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
655 <xsl:value-of select="$f773"/>
659 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
660 <xsl:value-of select="$f773"/>
662 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
667 <xsl:if test="marc:subfield[@code='n']">
668 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
675 <xsl:if test="marc:datafield[@tag=502]">
676 <span class="results_summary diss_note">
677 <span class="label">Dissertation note: </span>
678 <xsl:for-each select="marc:datafield[@tag=502]">
679 <xsl:call-template name="subfieldSelect">
680 <xsl:with-param name="codes">abcdgo</xsl:with-param>
683 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
687 <!-- 866 textual holdings -->
688 <xsl:if test="marc:datafield[@tag=866]">
689 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
690 <xsl:for-each select="marc:datafield[@tag=866]">
691 <xsl:call-template name="subfieldSelect">
692 <xsl:with-param name="codes">axz</xsl:with-param>
694 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
699 <!-- 775 Other Edition -->
700 <xsl:if test="marc:datafield[@tag=775]">
701 <span class="results_summary other_editions"><span class="label">Other editions: </span>
702 <xsl:for-each select="marc:datafield[@tag=775]">
703 <xsl:variable name="f775">
704 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
705 <xsl:with-param name="codes">a_t</xsl:with-param>
706 </xsl:call-template></xsl:with-param></xsl:call-template>
708 <xsl:if test="marc:subfield[@code='i']">
709 <xsl:call-template name="subfieldSelect">
710 <xsl:with-param name="codes">i</xsl:with-param>
712 <xsl:text>: </xsl:text>
716 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
717 <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>
720 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
723 <xsl:call-template name="subfieldSelect">
724 <xsl:with-param name="codes">a_t</xsl:with-param>
728 <xsl:when test="position()=last()"></xsl:when>
729 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
736 <xsl:if test="marc:datafield[@tag=780]">
737 <xsl:for-each select="marc:datafield[@tag=780]">
738 <xsl:if test="@ind1=0">
739 <span class="results_summary preceeding_entry">
741 <xsl:when test="@ind2=0">
742 <span class="label">Continues:</span>
744 <xsl:when test="@ind2=1">
745 <span class="label">Continues in part:</span>
747 <xsl:when test="@ind2=2">
748 <span class="label">Supersedes:</span>
750 <xsl:when test="@ind2=3">
751 <span class="label">Supersedes in part:</span>
753 <xsl:when test="@ind2=4">
754 <span class="label">Formed by the union: ... and: ...</span>
756 <xsl:when test="@ind2=5">
757 <span class="label">Absorbed:</span>
759 <xsl:when test="@ind2=6">
760 <span class="label">Absorbed in part:</span>
762 <xsl:when test="@ind2=7">
763 <span class="label">Separated from:</span>
766 <xsl:text> </xsl:text>
767 <xsl:variable name="f780">
768 <xsl:call-template name="subfieldSelect">
769 <xsl:with-param name="codes">a_t</xsl:with-param>
773 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
774 <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>
775 <xsl:value-of select="translate($f780, '()', '')"/>
779 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
780 <xsl:value-of select="translate($f780, '()', '')"/>
786 <xsl:if test="marc:subfield[@code='n']">
787 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
795 <xsl:if test="marc:datafield[@tag=785]">
796 <xsl:for-each select="marc:datafield[@tag=785]">
797 <span class="results_summary succeeding_entry">
799 <xsl:when test="@ind2=0">
800 <span class="label">Continued by:</span>
802 <xsl:when test="@ind2=1">
803 <span class="label">Continued in part by:</span>
805 <xsl:when test="@ind2=2">
806 <span class="label">Superseded by:</span>
808 <xsl:when test="@ind2=3">
809 <span class="label">Superseded in part by:</span>
811 <xsl:when test="@ind2=4">
812 <span class="label">Absorbed by:</span>
814 <xsl:when test="@ind2=5">
815 <span class="label">Absorbed in part by:</span>
817 <xsl:when test="@ind2=6">
818 <span class="label">Split into .. and ...:</span>
820 <xsl:when test="@ind2=7">
821 <span class="label">Merged with ... to form ...</span>
823 <xsl:when test="@ind2=8">
824 <span class="label">Changed back to:</span>
827 <xsl:text> </xsl:text>
828 <xsl:variable name="f785">
829 <xsl:call-template name="subfieldSelect">
830 <xsl:with-param name="codes">a_t</xsl:with-param>
835 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
836 <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>
837 <xsl:value-of select="translate($f785, '()', '')"/>
841 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
842 <xsl:value-of select="translate($f785, '()', '')"/>
851 <xsl:if test="$OPACBaseURL!=''">
852 <span class="results_summary"><span class="label">OPAC view: </span>
853 <a><xsl:attribute name="href">http://<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>.
859 <xsl:template name="nameABCQ">
860 <xsl:call-template name="chopPunctuation">
861 <xsl:with-param name="chopString">
862 <xsl:call-template name="subfieldSelect">
863 <xsl:with-param name="codes">abcq</xsl:with-param>
866 <xsl:with-param name="punctuation">
867 <xsl:text>:,;/ </xsl:text>
872 <xsl:template name="nameABCDN">
873 <xsl:call-template name="chopPunctuation">
874 <xsl:with-param name="chopString">
875 <xsl:call-template name="subfieldSelect">
876 <xsl:with-param name="codes">abcdn</xsl:with-param>
879 <xsl:with-param name="punctuation">
880 <xsl:text>:,;/ </xsl:text>
885 <xsl:template name="nameACDEQ">
886 <xsl:call-template name="subfieldSelect">
887 <xsl:with-param name="codes">acdeq</xsl:with-param>
891 <xsl:template name="part">
892 <xsl:variable name="partNumber">
893 <xsl:call-template name="specialSubfieldSelect">
894 <xsl:with-param name="axis">n</xsl:with-param>
895 <xsl:with-param name="anyCodes">n</xsl:with-param>
896 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
899 <xsl:variable name="partName">
900 <xsl:call-template name="specialSubfieldSelect">
901 <xsl:with-param name="axis">p</xsl:with-param>
902 <xsl:with-param name="anyCodes">p</xsl:with-param>
903 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
906 <xsl:if test="string-length(normalize-space($partNumber))">
907 <xsl:call-template name="chopPunctuation">
908 <xsl:with-param name="chopString" select="$partNumber"/>
911 <xsl:if test="string-length(normalize-space($partName))">
912 <xsl:call-template name="chopPunctuation">
913 <xsl:with-param name="chopString" select="$partName"/>
918 <xsl:template name="specialSubfieldSelect">
919 <xsl:param name="anyCodes"/>
920 <xsl:param name="axis"/>
921 <xsl:param name="beforeCodes"/>
922 <xsl:param name="afterCodes"/>
923 <xsl:variable name="str">
924 <xsl:for-each select="marc:subfield">
925 <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])">
926 <xsl:value-of select="text()"/>
927 <xsl:text> </xsl:text>
931 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
934 <xsl:template name="showAuthor">
935 <xsl:param name="authorfield"/>
936 <xsl:param name="UseAuthoritiesForTracings"/>
937 <xsl:if test="count($authorfield)>0">
939 <xsl:for-each select="$authorfield">
941 <xsl:when test="position()>1"/>
942 <xsl:when test="@tag<700">Author(s): </xsl:when>
943 <xsl:otherwise>Additional author(s): </xsl:otherwise>
947 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
948 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
951 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
955 <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when>
956 <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
957 <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
959 <!-- add relator code too between brackets-->
960 <xsl:if test="marc:subfield[@code='4' or @code='e']">
961 <span class="relatorcode">
962 <xsl:text> [</xsl:text>
964 <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
965 <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
967 <xsl:text>]</xsl:text>
972 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>