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="TracingQuotesLeft">
30 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
31 <xsl:otherwise>"</xsl:otherwise>
34 <xsl:variable name="TracingQuotesRight">
36 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
37 <xsl:otherwise>"</xsl:otherwise>
40 <xsl:variable name="leader" select="marc:leader"/>
41 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
42 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
43 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
44 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
45 <xsl:variable name="materialTypeCode">
47 <xsl:when test="$leader19='a'">ST</xsl:when>
48 <xsl:when test="$leader6='a'">
50 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
51 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
52 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
55 <xsl:when test="$leader6='t'">BK</xsl:when>
56 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
57 <xsl:when test="$leader6='m'">CF</xsl:when>
58 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
59 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
60 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
61 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
64 <xsl:variable name="materialTypeLabel">
66 <xsl:when test="$leader19='a'">Set</xsl:when>
67 <xsl:when test="$leader6='a'">
69 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
70 <xsl:when test="$leader7='i' or $leader7='s'">
72 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
73 <xsl:otherwise>Series</xsl:otherwise>
76 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
79 <xsl:when test="$leader6='t'">Book</xsl:when>
80 <xsl:when test="$leader6='o'">Kit</xsl:when>
81 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
82 <xsl:when test="$leader6='m'">Computer File</xsl:when>
83 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
84 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual Material</xsl:when>
85 <xsl:when test="$leader6='j'">Music</xsl:when>
86 <xsl:when test="$leader6='i'">Sound</xsl:when>
87 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
91 <!-- Title Statement -->
92 <!-- Alternate Graphic Representation (MARC 880) -->
93 <xsl:if test="$display880">
95 <xsl:call-template name="m880Select">
96 <xsl:with-param name="basetags">245</xsl:with-param>
97 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
102 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
103 <xsl:if test="$display880">
104 <xsl:call-template name="m880Select">
105 <xsl:with-param name="basetags">250</xsl:with-param>
106 <xsl:with-param name="codes">ab</xsl:with-param>
107 <xsl:with-param name="class">results_summary edition</xsl:with-param>
108 <xsl:with-param name="label">Edition: </xsl:with-param>
112 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
113 <xsl:if test="$display880">
114 <xsl:call-template name="m880Select">
115 <xsl:with-param name="basetags">260</xsl:with-param>
116 <xsl:with-param name="codes">abcg</xsl:with-param>
117 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
118 <xsl:with-param name="label">Publisher: </xsl:with-param>
122 <!--Series: Alternate Graphic Representation (MARC 880) -->
123 <xsl:if test="$display880">
124 <xsl:call-template name="m880Select">
125 <xsl:with-param name="basetags">440,490</xsl:with-param>
126 <xsl:with-param name="codes">av</xsl:with-param>
127 <xsl:with-param name="class">results_summary series</xsl:with-param>
128 <xsl:with-param name="label">Series: </xsl:with-param>
129 <xsl:with-param name="index">se</xsl:with-param>
133 <!-- Description: Alternate Graphic Representation (MARC 880) -->
134 <xsl:if test="$display880">
135 <xsl:call-template name="m880Select">
136 <xsl:with-param name="basetags">300</xsl:with-param>
137 <xsl:with-param name="codes">abceg</xsl:with-param>
138 <xsl:with-param name="class">results_summary description</xsl:with-param>
139 <xsl:with-param name="label">Description: </xsl:with-param>
143 <xsl:if test="$materialTypeCode!=''">
144 <span class="results_summary type"><span class="label">Type: </span>
145 <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>
146 <xsl:text> </xsl:text>
147 <xsl:value-of select="$materialTypeLabel"/>
151 <xsl:if test="marc:datafield[@tag=080]">
152 <span class="results_summary udc"><span class="label">UDC </span>
153 <xsl:for-each select="marc:datafield[@tag=080]">
154 <xsl:variable name="udc" select="marc:subfield[@code='a']"/>
155 <xsl:value-of select="marc:subfield[@code='a']"/>
156 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
161 <xsl:if test="marc:datafield[@tag=084]">
162 <span class="results_summary othercc">
163 <xsl:for-each select="marc:datafield[@tag=084]">
164 <xsl:call-template name="subfieldSelect">
165 <xsl:with-param name="codes">2</xsl:with-param>
167 <xsl:text> </xsl:text>
168 <xsl:call-template name="subfieldSelect">
169 <xsl:with-param name="codes">a</xsl:with-param>
175 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
176 <xsl:if test="$display880">
178 <xsl:call-template name="m880Select">
179 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
180 <xsl:with-param name="codes">abc</xsl:with-param>
181 <xsl:with-param name="index">au</xsl:with-param>
182 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
183 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
188 <!-- Author Statement -->
189 <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>
190 <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>
193 <xsl:if test="marc:datafield[@tag=245]">
194 <span class="results_summary title">
196 <xsl:for-each select="marc:datafield[@tag=245]">
197 <xsl:call-template name="subfieldSelect">
198 <xsl:with-param name="codes">a</xsl:with-param>
202 <xsl:for-each select="marc:datafield[@tag=245]">
203 <xsl:if test="marc:subfield[@code='h']">
204 <xsl:text> </xsl:text>
205 <xsl:call-template name="subfieldSelect">
206 <xsl:with-param name="codes">h</xsl:with-param>
209 <xsl:if test="marc:subfield[@code='b']">
210 <xsl:text> </xsl:text>
211 <xsl:call-template name="subfieldSelect">
212 <xsl:with-param name="codes">b</xsl:with-param>
215 <xsl:text> </xsl:text>
216 <xsl:call-template name="subfieldSelect">
217 <xsl:with-param name="codes">cfgknps</xsl:with-param>
223 <xsl:if test="marc:datafield[@tag=250]">
224 <span class="results_summary edition">
225 <xsl:text> - </xsl:text>
226 <xsl:for-each select="marc:datafield[@tag=250]">
227 <xsl:call-template name="chopPunctuation">
228 <xsl:with-param name="chopString">
229 <xsl:call-template name="subfieldSelect">
230 <xsl:with-param name="codes">ab</xsl:with-param>
234 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
239 <xsl:if test="marc:datafield[@tag=260]">
240 <span class="results_summary publisher">
241 <xsl:text> - </xsl:text>
242 <xsl:for-each select="marc:datafield[@tag=260]">
243 <xsl:if test="marc:subfield[@code='a']">
244 <xsl:call-template name="subfieldSelect">
245 <xsl:with-param name="codes">a</xsl:with-param>
248 <xsl:text> </xsl:text>
249 <xsl:if test="marc:subfield[@code='b']">
250 <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
251 <xsl:call-template name="subfieldSelect">
252 <xsl:with-param name="codes">b</xsl:with-param>
256 <xsl:text> </xsl:text>
257 <xsl:call-template name="chopPunctuation">
258 <xsl:with-param name="chopString">
259 <xsl:call-template name="subfieldSelect">
260 <xsl:with-param name="codes">cg</xsl:with-param>
264 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
269 <xsl:if test="marc:datafield[@tag=300]">
270 <span class="results_summary description">
271 <xsl:text> - </xsl:text>
272 <xsl:for-each select="marc:datafield[@tag=300]">
273 <xsl:call-template name="chopPunctuation">
274 <xsl:with-param name="chopString">
275 <xsl:call-template name="subfieldSelect">
276 <xsl:with-param name="codes">abceg</xsl:with-param>
280 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
288 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
289 <span class="results_summary series">
291 <xsl:for-each select="marc:datafield[@tag=440]">
292 <xsl:text> - (</xsl:text>
293 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
294 <xsl:call-template name="chopPunctuation">
295 <xsl:with-param name="chopString">
296 <xsl:call-template name="subfieldSelect">
297 <xsl:with-param name="codes">av</xsl:with-param>
302 <xsl:call-template name="part"/>
303 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
304 <xsl:text>)</xsl:text>
307 <!-- 490 Series not traced, Ind1 = 0 -->
308 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
309 <xsl:text> - (</xsl:text>
310 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
311 <xsl:call-template name="chopPunctuation">
312 <xsl:with-param name="chopString">
313 <xsl:call-template name="subfieldSelect">
314 <xsl:with-param name="codes">av</xsl:with-param>
319 <xsl:call-template name="part"/>
320 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
321 <xsl:text>)</xsl:text>
323 <!-- 490 Series traced, Ind1 = 1 -->
324 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
325 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
327 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
328 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
329 <xsl:call-template name="chopPunctuation">
330 <xsl:with-param name="chopString">
331 <xsl:call-template name="subfieldSelect">
332 <xsl:with-param name="codes">a_t</xsl:with-param>
339 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
340 <xsl:call-template name="chopPunctuation">
341 <xsl:with-param name="chopString">
342 <xsl:call-template name="subfieldSelect">
343 <xsl:with-param name="codes">a_t</xsl:with-param>
348 <xsl:call-template name="part"/>
351 <xsl:text>: </xsl:text>
352 <xsl:value-of select="marc:subfield[@code='v']" />
353 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
363 <xsl:if test="$leader7='s'">
364 <span class="results_summary analytics"><span class="label">Analytics: </span>
367 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
368 <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>
371 <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>
374 <xsl:text>Show analytics</xsl:text>
379 <!-- Volumes of sets and traced series -->
380 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
381 <span class="results_summary volumes"><span class="label">Volumes: </span>
384 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
385 <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>
388 <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>
391 <xsl:text>Show volumes</xsl:text>
397 <xsl:if test="$leader19='c'">
398 <span class="results_summary set"><span class="label">Set: </span>
399 <xsl:for-each select="marc:datafield[@tag=773]">
402 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
403 <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>
406 <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>
409 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
412 <xsl:when test="position()=last()"></xsl:when>
413 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
419 <xsl:if test="marc:datafield[@tag=020]">
420 <span class="results_summary isbn"><span class="label">ISBN: </span>
421 <xsl:for-each select="marc:datafield[@tag=020]">
422 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
423 <xsl:value-of select="marc:subfield[@code='a']"/>
424 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
429 <xsl:if test="marc:datafield[@tag=022]">
430 <span class="results_summary issn"><span class="label">ISSN: </span>
431 <xsl:for-each select="marc:datafield[@tag=022]">
432 <xsl:value-of select="marc:subfield[@code='a']"/>
433 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
438 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
439 <xsl:if test="$display880">
440 <xsl:call-template name="m880Select">
441 <xsl:with-param name="basetags">246</xsl:with-param>
442 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
443 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
444 <xsl:with-param name="label">Other Title: </xsl:with-param>
448 <xsl:if test="marc:datafield[@tag=246]">
449 <span class="results_summary other_title"><span class="label">Other Title: </span>
450 <xsl:for-each select="marc:datafield[@tag=246]">
451 <xsl:call-template name="chopPunctuation">
452 <xsl:with-param name="chopString">
453 <xsl:call-template name="subfieldSelect">
454 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
458 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
463 <xsl:if test="marc:datafield[@tag=242]">
464 <span class="results_summary translated_title"><span class="label">Title translated: </span>
465 <xsl:for-each select="marc:datafield[@tag=242]">
466 <xsl:call-template name="chopPunctuation">
467 <xsl:with-param name="chopString">
468 <xsl:call-template name="subfieldSelect">
469 <xsl:with-param name="codes">abchnp</xsl:with-param>
473 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
478 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
479 <xsl:if test="$display880">
480 <xsl:call-template name="m880Select">
481 <xsl:with-param name="basetags">130,240</xsl:with-param>
482 <xsl:with-param name="codes">adfklmor</xsl:with-param>
483 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
484 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
488 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
489 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
490 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
491 <xsl:variable name="str">
492 <xsl:for-each select="marc:subfield">
493 <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'])))">
494 <xsl:value-of select="text()"/>
495 <xsl:text> </xsl:text>
499 <xsl:call-template name="chopPunctuation">
500 <xsl:with-param name="chopString">
501 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
505 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
510 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
511 <span class="results_summary subjects"><span class="label">Subject(s): </span>
512 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
515 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
516 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
518 <xsl:when test="$TraceSubjectSubdivisions='1'">
519 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
520 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
521 <xsl:with-param name="delimeter"> AND </xsl:with-param>
522 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
523 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
528 <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>
531 <xsl:call-template name="chopPunctuation">
532 <xsl:with-param name="chopString">
533 <xsl:call-template name="subfieldSelect">
534 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
535 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
536 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
542 <xsl:when test="position()=last()"></xsl:when>
543 <xsl:otherwise> | </xsl:otherwise>
550 <xsl:if test="marc:datafield[@tag=856]">
551 <span class="results_summary online_resources"><span class="label">Online Resources: </span>
552 <xsl:for-each select="marc:datafield[@tag=856]">
553 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
554 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
556 <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')">
557 <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>
559 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
560 <xsl:call-template name="subfieldSelect">
561 <xsl:with-param name="codes">y3z</xsl:with-param>
564 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
566 <xsl:when test="$URLLinkText!=''">
567 <xsl:value-of select="$URLLinkText"/>
570 <xsl:text>Click here to access online</xsl:text>
577 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
578 <xsl:otherwise> | </xsl:otherwise>
584 <xsl:if test="marc:datafield[@tag=505]">
585 <div class="results_summary contents">
587 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
588 <span class="label">Contents:</span>
590 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
591 <span class="label">Incomplete contents:</span>
593 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
594 <span class="label">Partial contents:</span>
597 <xsl:for-each select="marc:datafield[@tag=505]">
598 <div class='contentblock'>
600 <xsl:when test="@ind2=0">
601 <xsl:call-template name="subfieldSelectSpan">
602 <xsl:with-param name="codes">tru</xsl:with-param>
606 <xsl:call-template name="subfieldSelectSpan">
607 <xsl:with-param name="codes">atru</xsl:with-param>
617 <xsl:if test="marc:datafield[@tag=773]">
618 <xsl:for-each select="marc:datafield[@tag=773]">
619 <xsl:if test="@ind1=0">
620 <span class="results_summary in"><span class="label">
622 <xsl:when test="@ind2=' '">
625 <xsl:when test="@ind2=8">
626 <xsl:if test="marc:subfield[@code='i']">
627 <xsl:value-of select="marc:subfield[@code='i']"/>
632 <xsl:variable name="f773">
633 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
634 <xsl:with-param name="codes">at</xsl:with-param>
635 </xsl:call-template></xsl:with-param></xsl:call-template>
638 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
639 <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>
640 <xsl:value-of select="translate($f773, '()', '')"/>
642 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
644 <xsl:when test="marc:subfield[@code='0']">
645 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
646 <xsl:value-of select="$f773"/>
650 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
651 <xsl:value-of select="$f773"/>
653 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
658 <xsl:if test="marc:subfield[@code='n']">
659 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
666 <!-- 866 textual holdings -->
667 <xsl:if test="marc:datafield[@tag=866]">
668 <span class="results_summary holdings_note"><span class="label">Holdings Note: </span>
669 <xsl:for-each select="marc:datafield[@tag=866]">
670 <xsl:call-template name="subfieldSelect">
671 <xsl:with-param name="codes">axz</xsl:with-param>
673 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
678 <!-- 775 Other Edition -->
679 <xsl:if test="marc:datafield[@tag=775]">
680 <span class="results_summary other_editions"><span class="label">Other Editions: </span>
681 <xsl:for-each select="marc:datafield[@tag=775]">
682 <xsl:variable name="f775">
683 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
684 <xsl:with-param name="codes">a_t</xsl:with-param>
685 </xsl:call-template></xsl:with-param></xsl:call-template>
687 <xsl:if test="marc:subfield[@code='i']">
688 <xsl:call-template name="subfieldSelect">
689 <xsl:with-param name="codes">i</xsl:with-param>
691 <xsl:text>: </xsl:text>
695 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
696 <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>
699 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
702 <xsl:call-template name="subfieldSelect">
703 <xsl:with-param name="codes">a_t</xsl:with-param>
707 <xsl:when test="position()=last()"></xsl:when>
708 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
715 <xsl:if test="marc:datafield[@tag=780]">
716 <xsl:for-each select="marc:datafield[@tag=780]">
717 <xsl:if test="@ind1=0">
718 <span class="results_summary preceeding_entry">
720 <xsl:when test="@ind2=0">
721 <span class="label">Continues:</span>
723 <xsl:when test="@ind2=1">
724 <span class="label">Continues in part:</span>
726 <xsl:when test="@ind2=2">
727 <span class="label">Supersedes:</span>
729 <xsl:when test="@ind2=3">
730 <span class="label">Supersedes in part:</span>
732 <xsl:when test="@ind2=4">
733 <span class="label">Formed by the union: ... and: ...</span>
735 <xsl:when test="@ind2=5">
736 <span class="label">Absorbed:</span>
738 <xsl:when test="@ind2=6">
739 <span class="label">Absorbed in part:</span>
741 <xsl:when test="@ind2=7">
742 <span class="label">Separated from:</span>
745 <xsl:variable name="f780">
746 <xsl:call-template name="subfieldSelect">
747 <xsl:with-param name="codes">at</xsl:with-param>
751 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
752 <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>
753 <xsl:value-of select="translate($f780, '()', '')"/>
757 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
758 <xsl:value-of select="translate($f780, '()', '')"/>
764 <xsl:if test="marc:subfield[@code='n']">
765 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
773 <xsl:if test="marc:datafield[@tag=785]">
774 <xsl:for-each select="marc:datafield[@tag=785]">
775 <span class="results_summary succeeding_entry">
777 <xsl:when test="@ind2=0">
778 <span class="label">Continued by:</span>
780 <xsl:when test="@ind2=1">
781 <span class="label">Continued in part by:</span>
783 <xsl:when test="@ind2=2">
784 <span class="label">Superseded by:</span>
786 <xsl:when test="@ind2=3">
787 <span class="label">Superseded in part by:</span>
789 <xsl:when test="@ind2=4">
790 <span class="label">Absorbed by:</span>
792 <xsl:when test="@ind2=5">
793 <span class="label">Absorbed in part by:</span>
795 <xsl:when test="@ind2=6">
796 <span class="label">Split into .. and ...:</span>
798 <xsl:when test="@ind2=7">
799 <span class="label">Merged with ... to form ...</span>
801 <xsl:when test="@ind2=8">
802 <span class="label">Changed back to:</span>
806 <xsl:variable name="f785">
807 <xsl:call-template name="subfieldSelect">
808 <xsl:with-param name="codes">at</xsl:with-param>
813 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
814 <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>
815 <xsl:value-of select="translate($f785, '()', '')"/>
819 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
820 <xsl:value-of select="translate($f785, '()', '')"/>
829 <xsl:if test="$OPACBaseURL!=''">
830 <span class="results_summary"><span class="label">OPAC view: </span>
831 <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>.
835 <xsl:if test="marc:datafield[@tag=942]">
836 <span class="results_summary local"><span class="label">Old Callnumber: </span>
837 <xsl:for-each select="marc:datafield[@tag=942]">
838 <xsl:if test="marc:subfield[@code='d']">
839 <xsl:text> </xsl:text>
840 <xsl:call-template name="subfieldSelect">
841 <xsl:with-param name="codes">d</xsl:with-param>
850 <xsl:template name="nameABCDQ">
851 <xsl:call-template name="chopPunctuation">
852 <xsl:with-param name="chopString">
853 <xsl:call-template name="subfieldSelect">
854 <xsl:with-param name="codes">aq</xsl:with-param>
857 <xsl:with-param name="punctuation">
858 <xsl:text>:,;/ </xsl:text>
861 <xsl:call-template name="termsOfAddress"/>
864 <xsl:template name="nameABCDN">
865 <xsl:for-each select="marc:subfield[@code='a']">
866 <xsl:call-template name="chopPunctuation">
867 <xsl:with-param name="chopString" select="."/>
870 <xsl:for-each select="marc:subfield[@code='b']">
871 <xsl:value-of select="."/>
873 <xsl:when test="position() != last()">
874 <xsl:text> -- </xsl:text>
878 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
879 <xsl:call-template name="subfieldSelect">
880 <xsl:with-param name="codes">cdn</xsl:with-param>
885 <xsl:template name="nameACDEQ">
886 <xsl:call-template name="subfieldSelect">
887 <xsl:with-param name="codes">acdeq</xsl:with-param>
890 <xsl:template name="termsOfAddress">
891 <xsl:if test="marc:subfield[@code='b' or @code='c']">
892 <xsl:call-template name="chopPunctuation">
893 <xsl:with-param name="chopString">
894 <xsl:call-template name="subfieldSelect">
895 <xsl:with-param name="codes">bc</xsl:with-param>
902 <xsl:template name="part">
903 <xsl:variable name="partNumber">
904 <xsl:call-template name="specialSubfieldSelect">
905 <xsl:with-param name="axis">n</xsl:with-param>
906 <xsl:with-param name="anyCodes">n</xsl:with-param>
907 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
910 <xsl:variable name="partName">
911 <xsl:call-template name="specialSubfieldSelect">
912 <xsl:with-param name="axis">p</xsl:with-param>
913 <xsl:with-param name="anyCodes">p</xsl:with-param>
914 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
917 <xsl:if test="string-length(normalize-space($partNumber))">
918 <xsl:call-template name="chopPunctuation">
919 <xsl:with-param name="chopString" select="$partNumber"/>
922 <xsl:if test="string-length(normalize-space($partName))">
923 <xsl:call-template name="chopPunctuation">
924 <xsl:with-param name="chopString" select="$partName"/>
929 <xsl:template name="specialSubfieldSelect">
930 <xsl:param name="anyCodes"/>
931 <xsl:param name="axis"/>
932 <xsl:param name="beforeCodes"/>
933 <xsl:param name="afterCodes"/>
934 <xsl:variable name="str">
935 <xsl:for-each select="marc:subfield">
936 <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])">
937 <xsl:value-of select="text()"/>
938 <xsl:text> </xsl:text>
942 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
945 <xsl:template name="showAuthor">
946 <xsl:param name="authorfield"/>
947 <xsl:param name="UseAuthoritiesForTracings"/>
948 <xsl:if test="count($authorfield)>0">
950 <xsl:for-each select="$authorfield">
953 <xsl:when test="position()>1"/>
954 <xsl:when test="@tag<700">Author(s): </xsl:when>
955 <xsl:otherwise>Additional author(s): </xsl:otherwise>
960 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
961 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
964 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
968 <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
969 <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
970 <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
972 <!-- add relator code too between brackets-->
973 <xsl:if test="marc:subfield[@code='4' or @code='e']">
974 <span class="relatorcode">
975 <xsl:text> [</xsl:text>
977 <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
978 <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
980 <xsl:text>]</xsl:text>
985 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>