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>
394 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
395 <span class="results_summary isbn"><span class="label">ISBN: </span>
396 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
397 <span property="isbn">
398 <xsl:value-of select="."/>
400 <xsl:when test="position()=last()">
401 <xsl:text>.</xsl:text>
404 <xsl:text>; </xsl:text>
413 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
414 <span class="results_summary issn"><span class="label">ISSN: </span>
415 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
416 <span property="issn">
417 <xsl:value-of select="."/>
419 <xsl:when test="position()=last()">
420 <xsl:text>.</xsl:text>
423 <xsl:text>; </xsl:text>
431 <xsl:if test="marc:datafield[@tag=013]">
432 <span class="results_summary patent_info">
433 <span class="label">Patent information: </span>
434 <xsl:for-each select="marc:datafield[@tag=013]">
435 <xsl:call-template name="subfieldSelect">
436 <xsl:with-param name="codes">acdef</xsl:with-param>
437 <xsl:with-param name="delimeter">, </xsl:with-param>
439 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
444 <xsl:if test="marc:datafield[@tag=088]">
445 <span class="results_summary report_number">
446 <span class="label">Report number: </span>
447 <xsl:for-each select="marc:datafield[@tag=088]">
448 <xsl:call-template name="subfieldSelect">
449 <xsl:with-param name="codes">a</xsl:with-param>
451 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
456 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
457 <xsl:if test="$display880">
458 <xsl:call-template name="m880Select">
459 <xsl:with-param name="basetags">246</xsl:with-param>
460 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
461 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
462 <xsl:with-param name="label">Other title: </xsl:with-param>
466 <xsl:if test="marc:datafield[@tag=246]">
467 <span class="results_summary other_title"><span class="label">Other title: </span>
468 <xsl:for-each select="marc:datafield[@tag=246]">
469 <xsl:call-template name="chopPunctuation">
470 <xsl:with-param name="chopString">
471 <xsl:call-template name="subfieldSelect">
472 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
476 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
481 <xsl:if test="marc:datafield[@tag=242]">
482 <span class="results_summary translated_title"><span class="label">Title translated: </span>
483 <xsl:for-each select="marc:datafield[@tag=242]">
484 <xsl:call-template name="chopPunctuation">
485 <xsl:with-param name="chopString">
486 <xsl:call-template name="subfieldSelect">
487 <xsl:with-param name="codes">abchnp</xsl:with-param>
491 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
496 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
497 <xsl:if test="$display880">
498 <xsl:call-template name="m880Select">
499 <xsl:with-param name="basetags">130,240</xsl:with-param>
500 <xsl:with-param name="codes">adfklmor</xsl:with-param>
501 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
502 <xsl:with-param name="label">Uniform title: </xsl:with-param>
506 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
507 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
508 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
509 <xsl:variable name="str">
510 <xsl:for-each select="marc:subfield">
511 <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'])))">
512 <xsl:value-of select="text()"/>
513 <xsl:text> </xsl:text>
517 <xsl:call-template name="chopPunctuation">
518 <xsl:with-param name="chopString">
519 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
523 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
528 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
529 <span class="results_summary subjects"><span class="label">Subject(s): </span>
530 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
533 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
534 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
536 <xsl:when test="$TraceSubjectSubdivisions='1'">
537 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
538 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
539 <xsl:with-param name="delimeter"> AND </xsl:with-param>
540 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
541 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
546 <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>
549 <xsl:call-template name="chopPunctuation">
550 <xsl:with-param name="chopString">
551 <xsl:call-template name="subfieldSelect">
552 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
553 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
554 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
560 <xsl:when test="position()=last()"></xsl:when>
561 <xsl:otherwise> | </xsl:otherwise>
569 <xsl:if test="marc:datafield[@tag=655]">
570 <span class="results_summary genre"><span class="label">Genre/Form: </span>
571 <xsl:for-each select="marc:datafield[@tag=655]">
574 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
575 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
577 <xsl:when test="$TraceSubjectSubdivisions='1'">
578 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
579 <xsl:with-param name="codes">avxyz</xsl:with-param>
580 <xsl:with-param name="delimeter"> AND </xsl:with-param>
581 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
582 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
587 <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>
590 <xsl:call-template name="subfieldSelect">
591 <xsl:with-param name="codes">avxyz</xsl:with-param>
592 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
593 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
596 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
601 <!-- DDC classification -->
602 <xsl:if test="marc:datafield[@tag=082]">
603 <span class="results_summary ddc">
604 <span class="label">DDC classification: </span>
605 <xsl:for-each select="marc:datafield[@tag=082]">
606 <xsl:call-template name="subfieldSelect">
607 <xsl:with-param name="codes">a</xsl:with-param>
610 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
611 <xsl:otherwise> | </xsl:otherwise>
617 <xsl:if test="marc:datafield[@tag=856]">
618 <span class="results_summary online_resources"><span class="label">Online resources: </span>
619 <xsl:for-each select="marc:datafield[@tag=856]">
620 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
621 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
623 <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')">
624 <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>
626 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
627 <xsl:call-template name="subfieldSelect">
628 <xsl:with-param name="codes">y3z</xsl:with-param>
631 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
633 <xsl:when test="$URLLinkText!=''">
634 <xsl:value-of select="$URLLinkText"/>
637 <xsl:text>Click here to access online</xsl:text>
644 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
645 <xsl:otherwise> | </xsl:otherwise>
651 <xsl:if test="marc:datafield[@tag=505]">
652 <div class="results_summary contents">
654 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
655 <span class="label">Contents:</span>
657 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
658 <span class="label">Incomplete contents:</span>
660 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
661 <span class="label">Partial contents:</span>
664 <xsl:for-each select="marc:datafield[@tag=505]">
665 <div class='contentblock'>
667 <xsl:when test="@ind2=0">
668 <xsl:call-template name="subfieldSelectSpan">
669 <xsl:with-param name="codes">tru</xsl:with-param>
673 <xsl:call-template name="subfieldSelectSpan">
674 <xsl:with-param name="codes">atru</xsl:with-param>
684 <xsl:if test="marc:datafield[@tag=586]">
685 <span class="results_summary awardsnote">
686 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
687 <span class="label">Awards: </span>
689 <xsl:for-each select="marc:datafield[@tag=586]">
690 <xsl:value-of select="marc:subfield[@code='a']"/>
691 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
697 <xsl:if test="marc:datafield[@tag=773]">
698 <xsl:for-each select="marc:datafield[@tag=773]">
699 <xsl:if test="@ind1=0">
700 <span class="results_summary in"><span class="label">
702 <xsl:when test="@ind2=' '">
705 <xsl:when test="@ind2=8">
706 <xsl:if test="marc:subfield[@code='i']">
707 <xsl:value-of select="marc:subfield[@code='i']"/>
712 <xsl:variable name="f773">
713 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
714 <xsl:with-param name="codes">a_t</xsl:with-param>
715 </xsl:call-template></xsl:with-param></xsl:call-template>
718 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
719 <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>
720 <xsl:value-of select="translate($f773, '()', '')"/>
722 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
724 <xsl:when test="marc:subfield[@code='0']">
725 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
726 <xsl:value-of select="$f773"/>
730 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
731 <xsl:value-of select="$f773"/>
733 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
738 <xsl:if test="marc:subfield[@code='n']">
739 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
746 <xsl:if test="marc:datafield[@tag=502]">
747 <span class="results_summary diss_note">
748 <span class="label">Dissertation note: </span>
749 <xsl:for-each select="marc:datafield[@tag=502]">
750 <xsl:call-template name="subfieldSelect">
751 <xsl:with-param name="codes">abcdgo</xsl:with-param>
754 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
758 <!-- 866 textual holdings -->
759 <xsl:if test="marc:datafield[@tag=866]">
760 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
761 <xsl:for-each select="marc:datafield[@tag=866]">
762 <xsl:call-template name="subfieldSelect">
763 <xsl:with-param name="codes">axz</xsl:with-param>
765 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
770 <!-- 775 Other Edition -->
771 <xsl:if test="marc:datafield[@tag=775]">
772 <span class="results_summary other_editions"><span class="label">Other editions: </span>
773 <xsl:for-each select="marc:datafield[@tag=775]">
774 <xsl:variable name="f775">
775 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
776 <xsl:with-param name="codes">a_t</xsl:with-param>
777 </xsl:call-template></xsl:with-param></xsl:call-template>
779 <xsl:if test="marc:subfield[@code='i']">
780 <xsl:call-template name="subfieldSelect">
781 <xsl:with-param name="codes">i</xsl:with-param>
783 <xsl:text>: </xsl:text>
787 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
788 <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>
791 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
794 <xsl:call-template name="subfieldSelect">
795 <xsl:with-param name="codes">a_t</xsl:with-param>
799 <xsl:when test="position()=last()"></xsl:when>
800 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
807 <xsl:if test="marc:datafield[@tag=780]">
808 <xsl:for-each select="marc:datafield[@tag=780]">
809 <xsl:if test="@ind1=0">
810 <span class="results_summary preceeding_entry">
812 <xsl:when test="@ind2=0">
813 <span class="label">Continues:</span>
815 <xsl:when test="@ind2=1">
816 <span class="label">Continues in part:</span>
818 <xsl:when test="@ind2=2">
819 <span class="label">Supersedes:</span>
821 <xsl:when test="@ind2=3">
822 <span class="label">Supersedes in part:</span>
824 <xsl:when test="@ind2=4">
825 <span class="label">Formed by the union: ... and: ...</span>
827 <xsl:when test="@ind2=5">
828 <span class="label">Absorbed:</span>
830 <xsl:when test="@ind2=6">
831 <span class="label">Absorbed in part:</span>
833 <xsl:when test="@ind2=7">
834 <span class="label">Separated from:</span>
837 <xsl:text> </xsl:text>
838 <xsl:variable name="f780">
839 <xsl:call-template name="subfieldSelect">
840 <xsl:with-param name="codes">a_t</xsl:with-param>
844 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
845 <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>
846 <xsl:value-of select="translate($f780, '()', '')"/>
850 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
851 <xsl:value-of select="translate($f780, '()', '')"/>
857 <xsl:if test="marc:subfield[@code='n']">
858 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
866 <xsl:if test="marc:datafield[@tag=785]">
867 <xsl:for-each select="marc:datafield[@tag=785]">
868 <span class="results_summary succeeding_entry">
870 <xsl:when test="@ind2=0">
871 <span class="label">Continued by:</span>
873 <xsl:when test="@ind2=1">
874 <span class="label">Continued in part by:</span>
876 <xsl:when test="@ind2=2">
877 <span class="label">Superseded by:</span>
879 <xsl:when test="@ind2=3">
880 <span class="label">Superseded in part by:</span>
882 <xsl:when test="@ind2=4">
883 <span class="label">Absorbed by:</span>
885 <xsl:when test="@ind2=5">
886 <span class="label">Absorbed in part by:</span>
888 <xsl:when test="@ind2=6">
889 <span class="label">Split into .. and ...:</span>
891 <xsl:when test="@ind2=7">
892 <span class="label">Merged with ... to form ...</span>
894 <xsl:when test="@ind2=8">
895 <span class="label">Changed back to:</span>
898 <xsl:text> </xsl:text>
899 <xsl:variable name="f785">
900 <xsl:call-template name="subfieldSelect">
901 <xsl:with-param name="codes">a_t</xsl:with-param>
906 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
907 <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>
908 <xsl:value-of select="translate($f785, '()', '')"/>
912 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
913 <xsl:value-of select="translate($f785, '()', '')"/>
922 <xsl:if test="$OPACBaseURL!=''">
923 <span class="results_summary"><span class="label">OPAC view: </span>
924 <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>.
930 <xsl:template name="nameABCQ">
931 <xsl:call-template name="chopPunctuation">
932 <xsl:with-param name="chopString">
933 <xsl:call-template name="subfieldSelect">
934 <xsl:with-param name="codes">abcq</xsl:with-param>
937 <xsl:with-param name="punctuation">
938 <xsl:text>:,;/ </xsl:text>
943 <xsl:template name="nameABCDN">
944 <xsl:call-template name="chopPunctuation">
945 <xsl:with-param name="chopString">
946 <xsl:call-template name="subfieldSelect">
947 <xsl:with-param name="codes">abcdn</xsl:with-param>
950 <xsl:with-param name="punctuation">
951 <xsl:text>:,;/ </xsl:text>
956 <xsl:template name="nameACDEQ">
957 <xsl:call-template name="subfieldSelect">
958 <xsl:with-param name="codes">acdeq</xsl:with-param>
962 <xsl:template name="part">
963 <xsl:variable name="partNumber">
964 <xsl:call-template name="specialSubfieldSelect">
965 <xsl:with-param name="axis">n</xsl:with-param>
966 <xsl:with-param name="anyCodes">n</xsl:with-param>
967 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
970 <xsl:variable name="partName">
971 <xsl:call-template name="specialSubfieldSelect">
972 <xsl:with-param name="axis">p</xsl:with-param>
973 <xsl:with-param name="anyCodes">p</xsl:with-param>
974 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
977 <xsl:if test="string-length(normalize-space($partNumber))">
978 <xsl:call-template name="chopPunctuation">
979 <xsl:with-param name="chopString" select="$partNumber"/>
982 <xsl:if test="string-length(normalize-space($partName))">
983 <xsl:call-template name="chopPunctuation">
984 <xsl:with-param name="chopString" select="$partName"/>
989 <xsl:template name="specialSubfieldSelect">
990 <xsl:param name="anyCodes"/>
991 <xsl:param name="axis"/>
992 <xsl:param name="beforeCodes"/>
993 <xsl:param name="afterCodes"/>
994 <xsl:variable name="str">
995 <xsl:for-each select="marc:subfield">
996 <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])">
997 <xsl:value-of select="text()"/>
998 <xsl:text> </xsl:text>
1002 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1005 <xsl:template name="showAuthor">
1006 <xsl:param name="authorfield"/>
1007 <xsl:param name="UseAuthoritiesForTracings"/>
1008 <xsl:if test="count($authorfield)>0">
1010 <xsl:for-each select="$authorfield">
1012 <xsl:when test="position()>1"/>
1013 <xsl:when test="@tag<700">Author(s): </xsl:when>
1014 <xsl:otherwise>Additional author(s): </xsl:otherwise>
1018 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1019 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1022 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1026 <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when>
1027 <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
1028 <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
1030 <!-- add relator code too between brackets-->
1031 <xsl:if test="marc:subfield[@code='4' or @code='e']">
1032 <span class="relatorcode">
1033 <xsl:text> [</xsl:text>
1035 <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
1036 <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
1038 <xsl:text>]</xsl:text>
1043 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>