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 = "xml" indent="yes" omit-xml-declaration = "yes" />
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']"/>
28 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29 <xsl:variable name="leader" select="marc:leader"/>
30 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
31 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
32 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
33 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
34 <xsl:variable name="materialTypeCode">
36 <xsl:when test="$leader19='a'">ST</xsl:when>
37 <xsl:when test="$leader6='a'">
39 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
40 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
41 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
44 <xsl:when test="$leader6='t'">BK</xsl:when>
45 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
46 <xsl:when test="$leader6='m'">CF</xsl:when>
47 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
48 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
49 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
50 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
53 <xsl:variable name="materialTypeLabel">
55 <xsl:when test="$leader19='a'">Set</xsl:when>
56 <xsl:when test="$leader6='a'">
58 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
59 <xsl:when test="$leader7='i' or $leader7='s'">
61 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
62 <xsl:otherwise>Series</xsl:otherwise>
65 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
68 <xsl:when test="$leader6='t'">Book</xsl:when>
69 <xsl:when test="$leader6='o'">Kit</xsl:when>
70 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
71 <xsl:when test="$leader6='m'">Computer File</xsl:when>
72 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
73 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual Material</xsl:when>
74 <xsl:when test="$leader6='j'">Music</xsl:when>
75 <xsl:when test="$leader6='i'">Sound</xsl:when>
76 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
80 <!-- Title Statement -->
81 <!-- Alternate Graphic Representation (MARC 880) -->
82 <xsl:if test="$display880">
84 <xsl:call-template name="m880Select">
85 <xsl:with-param name="basetags">245</xsl:with-param>
86 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
91 <xsl:if test="marc:datafield[@tag=245]">
93 <xsl:for-each select="marc:datafield[@tag=245]">
94 <xsl:call-template name="subfieldSelect">
95 <xsl:with-param name="codes">a</xsl:with-param>
97 <xsl:if test="marc:subfield[@code='h']">
98 <xsl:text> </xsl:text>
99 <xsl:call-template name="subfieldSelect">
100 <xsl:with-param name="codes">h</xsl:with-param>
103 <xsl:if test="marc:subfield[@code='b']">
104 <xsl:text> </xsl:text>
105 <xsl:call-template name="subfieldSelect">
106 <xsl:with-param name="codes">b</xsl:with-param>
109 <xsl:text> </xsl:text>
110 <xsl:call-template name="subfieldSelect">
111 <xsl:with-param name="codes">fgknps</xsl:with-param>
117 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
118 <xsl:if test="$display880">
120 <xsl:call-template name="m880Select">
121 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
122 <xsl:with-param name="codes">abc</xsl:with-param>
123 <xsl:with-param name="index">au</xsl:with-param>
124 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
125 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
130 <!-- Author Statement -->
131 <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>
132 <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>
134 <xsl:if test="$materialTypeCode!=''">
135 <span class="results_summary type"><span class="label">Type: </span>
136 <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>
137 <xsl:text> </xsl:text>
138 <xsl:value-of select="$materialTypeLabel"/>
142 <!--Series: Alternate Graphic Representation (MARC 880) -->
143 <xsl:if test="$display880">
144 <xsl:call-template name="m880Select">
145 <xsl:with-param name="basetags">440,490</xsl:with-param>
146 <xsl:with-param name="codes">av</xsl:with-param>
147 <xsl:with-param name="class">results_summary series</xsl:with-param>
148 <xsl:with-param name="label">Series: </xsl:with-param>
149 <xsl:with-param name="index">se</xsl:with-param>
154 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
155 <span class="results_summary series"><span class="label">Series: </span>
157 <xsl:for-each select="marc:datafield[@tag=440]">
158 <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
159 <xsl:call-template name="chopPunctuation">
160 <xsl:with-param name="chopString">
161 <xsl:call-template name="subfieldSelect">
162 <xsl:with-param name="codes">av</xsl:with-param>
167 <xsl:text> </xsl:text><xsl:call-template name="part"/>
168 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
171 <!-- 490 Series not traced, Ind1 = 0 -->
172 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
173 <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
174 <xsl:call-template name="chopPunctuation">
175 <xsl:with-param name="chopString">
176 <xsl:call-template name="subfieldSelect">
177 <xsl:with-param name="codes">av</xsl:with-param>
182 <xsl:call-template name="part"/>
183 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
185 <!-- 490 Series traced, Ind1 = 1 -->
186 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
187 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
189 <xsl:when test="marc:subfield[@code='w']">
190 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
191 <xsl:call-template name="chopPunctuation">
192 <xsl:with-param name="chopString">
193 <xsl:call-template name="subfieldSelect">
194 <xsl:with-param name="codes">at</xsl:with-param>
201 <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
202 <xsl:call-template name="chopPunctuation">
203 <xsl:with-param name="chopString">
204 <xsl:call-template name="subfieldSelect">
205 <xsl:with-param name="codes">at</xsl:with-param>
210 <xsl:call-template name="part"/>
213 <xsl:text>: </xsl:text>
214 <xsl:value-of select="marc:subfield[@code='v']" />
215 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
223 <xsl:if test="$leader7='s'">
224 <span class="results_summary analytics"><span class="label">Analytics: </span>
227 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
228 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
231 <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>
234 <xsl:text>Show analytics</xsl:text>
239 <!-- Volumes of sets and traced series -->
240 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
241 <span class="results_summary volumes"><span class="label">Volumes: </span>
244 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
245 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
248 <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>
251 <xsl:text>Show volumes</xsl:text>
257 <xsl:if test="$leader19='c'">
258 <span class="results_summary set"><span class="label">Set: </span>
259 <xsl:for-each select="marc:datafield[@tag=773]">
262 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
263 <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>
266 <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>
269 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
272 <xsl:when test="position()=last()"></xsl:when>
273 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
279 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
280 <xsl:if test="$display880">
281 <xsl:call-template name="m880Select">
282 <xsl:with-param name="basetags">260</xsl:with-param>
283 <xsl:with-param name="codes">abcg</xsl:with-param>
284 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
285 <xsl:with-param name="label">Publisher: </xsl:with-param>
289 <xsl:if test="marc:datafield[@tag=260]">
290 <span class="results_summary publisher"><span class="label">Publisher: </span>
291 <xsl:for-each select="marc:datafield[@tag=260]">
292 <xsl:if test="marc:subfield[@code='b']">
293 <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
294 <xsl:call-template name="subfieldSelect">
295 <xsl:with-param name="codes">b</xsl:with-param>
299 <xsl:text> </xsl:text>
300 <xsl:call-template name="chopPunctuation">
301 <xsl:with-param name="chopString">
302 <xsl:call-template name="subfieldSelect">
303 <xsl:with-param name="codes">acg</xsl:with-param>
307 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
312 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
313 <xsl:if test="$display880">
314 <xsl:call-template name="m880Select">
315 <xsl:with-param name="basetags">250</xsl:with-param>
316 <xsl:with-param name="codes">ab</xsl:with-param>
317 <xsl:with-param name="class">results_summary edition</xsl:with-param>
318 <xsl:with-param name="label">Edition: </xsl:with-param>
322 <xsl:if test="marc:datafield[@tag=250]">
323 <span class="results_summary edition"><span class="label">Edition: </span>
324 <xsl:for-each select="marc:datafield[@tag=250]">
325 <xsl:call-template name="chopPunctuation">
326 <xsl:with-param name="chopString">
327 <xsl:call-template name="subfieldSelect">
328 <xsl:with-param name="codes">ab</xsl:with-param>
332 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
337 <!-- Description: Alternate Graphic Representation (MARC 880) -->
338 <xsl:if test="$display880">
339 <xsl:call-template name="m880Select">
340 <xsl:with-param name="basetags">300</xsl:with-param>
341 <xsl:with-param name="codes">abceg</xsl:with-param>
342 <xsl:with-param name="class">results_summary description</xsl:with-param>
343 <xsl:with-param name="label">Description: </xsl:with-param>
347 <xsl:if test="marc:datafield[@tag=300]">
348 <span class="results_summary description"><span class="label">Description: </span>
349 <xsl:for-each select="marc:datafield[@tag=300]">
350 <xsl:call-template name="chopPunctuation">
351 <xsl:with-param name="chopString">
352 <xsl:call-template name="subfieldSelect">
353 <xsl:with-param name="codes">abceg</xsl:with-param>
357 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
362 <xsl:if test="marc:datafield[@tag=020]">
363 <span class="results_summary isbn"><span class="label">ISBN: </span>
364 <xsl:for-each select="marc:datafield[@tag=020]">
365 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
366 <xsl:value-of select="marc:subfield[@code='a']"/>
367 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
372 <xsl:if test="marc:datafield[@tag=022]">
373 <span class="results_summary issn"><span class="label">ISSN: </span>
374 <xsl:for-each select="marc:datafield[@tag=022]">
375 <xsl:value-of select="marc:subfield[@code='a']"/>
376 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
381 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
382 <xsl:if test="$display880">
383 <xsl:call-template name="m880Select">
384 <xsl:with-param name="basetags">246</xsl:with-param>
385 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
386 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
387 <xsl:with-param name="label">Other Title: </xsl:with-param>
391 <xsl:if test="marc:datafield[@tag=246]">
392 <span class="results_summary other_title"><span class="label">Other Title: </span>
393 <xsl:for-each select="marc:datafield[@tag=246]">
394 <xsl:call-template name="chopPunctuation">
395 <xsl:with-param name="chopString">
396 <xsl:call-template name="subfieldSelect">
397 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
401 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
406 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
407 <xsl:if test="$display880">
408 <xsl:call-template name="m880Select">
409 <xsl:with-param name="basetags">130,240</xsl:with-param>
410 <xsl:with-param name="codes">adfklmor</xsl:with-param>
411 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
412 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
416 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
417 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
418 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
419 <xsl:variable name="str">
420 <xsl:for-each select="marc:subfield">
421 <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'])))">
422 <xsl:value-of select="text()"/>
423 <xsl:text> </xsl:text>
427 <xsl:call-template name="chopPunctuation">
428 <xsl:with-param name="chopString">
429 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
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 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
439 <span class="results_summary subjects"><span class="label">Subject(s): </span>
440 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
443 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
444 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
446 <xsl:when test="$TraceSubjectSubdivisions='1'">
447 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
448 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
449 <xsl:with-param name="delimeter"> and </xsl:with-param>
450 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:{</xsl:with-param>
451 <xsl:with-param name="suffix">})</xsl:with-param>
456 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:{<xsl:value-of select="marc:subfield[@code='a']"/>}</xsl:attribute>
459 <xsl:call-template name="chopPunctuation">
460 <xsl:with-param name="chopString">
461 <xsl:call-template name="subfieldSelect">
462 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
463 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
464 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
470 <xsl:when test="position()=last()"></xsl:when>
471 <xsl:otherwise> | </xsl:otherwise>
478 <xsl:if test="marc:datafield[@tag=856]">
479 <span class="results_summary online_resources"><span class="label">Online Resources: </span>
480 <xsl:for-each select="marc:datafield[@tag=856]">
481 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
482 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
484 <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')">
485 <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>
487 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
488 <xsl:call-template name="subfieldSelect">
489 <xsl:with-param name="codes">y3z</xsl:with-param>
492 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
494 <xsl:when test="$URLLinkText!=''">
495 <xsl:value-of select="$URLLinkText"/>
498 <xsl:text>Click here to access online</xsl:text>
505 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
506 <xsl:otherwise> | </xsl:otherwise>
512 <xsl:if test="marc:datafield[@tag=505]">
513 <xsl:for-each select="marc:datafield[@tag=505]">
514 <span class="results_summary contents">
516 <xsl:when test="@ind1=0">
517 <span class="label">Contents:</span>
519 <xsl:when test="@ind1=1">
520 <span class="label">Incomplete contents:</span>
522 <xsl:when test="@ind1=1">
523 <span class="label">Partial contents:</span>
527 <xsl:when test="@ind2=0">
528 <xsl:call-template name="subfieldSelect">
529 <xsl:with-param name="codes">tru</xsl:with-param>
533 <xsl:call-template name="subfieldSelect">
534 <xsl:with-param name="codes">au</xsl:with-param>
543 <xsl:if test="marc:datafield[@tag=773]">
544 <xsl:for-each select="marc:datafield[@tag=773]">
545 <xsl:if test="@ind1=0">
546 <span class="results_summary in"><span class="label">
548 <xsl:when test="@ind2=' '">
551 <xsl:when test="@ind2=8">
552 <xsl:if test="marc:subfield[@code='i']">
553 <xsl:value-of select="marc:subfield[@code='i']"/>
558 <xsl:variable name="f773">
559 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
560 <xsl:with-param name="codes">at</xsl:with-param>
561 </xsl:call-template></xsl:with-param></xsl:call-template>
564 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
565 <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>
566 <xsl:value-of select="translate($f773, '()', '')"/>
568 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
570 <xsl:when test="marc:subfield[@code='0']">
571 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
572 <xsl:value-of select="$f773"/>
576 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
577 <xsl:value-of select="$f773"/>
579 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
584 <xsl:if test="marc:subfield[@code='n']">
585 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
592 <!-- 775 Other Edition -->
593 <xsl:if test="marc:datafield[@tag=775]">
594 <span class="results_summary other_editions"><span class="label">Other Editions: </span>
595 <xsl:for-each select="marc:datafield[@tag=775]">
596 <xsl:if test="marc:subfield[@code='i']">
597 <xsl:call-template name="subfieldSelect">
598 <xsl:with-param name="codes">i</xsl:with-param>
600 <xsl:text>: </xsl:text>
604 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
605 <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>
608 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
611 <xsl:call-template name="subfieldSelect">
612 <xsl:with-param name="codes">t</xsl:with-param>
616 <xsl:when test="position()=last()"></xsl:when>
617 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
624 <xsl:if test="marc:datafield[@tag=780]">
625 <xsl:for-each select="marc:datafield[@tag=780]">
626 <xsl:if test="@ind1=0">
627 <span class="results_summary preceeding_entry">
629 <xsl:when test="@ind2=0">
630 <span class="label">Continues:</span>
632 <xsl:when test="@ind2=1">
633 <span class="label">Continues in part:</span>
635 <xsl:when test="@ind2=2">
636 <span class="label">Supersedes:</span>
638 <xsl:when test="@ind2=3">
639 <span class="label">Supersedes in part:</span>
641 <xsl:when test="@ind2=4">
642 <span class="label">Formed by the union: ... and: ...</span>
644 <xsl:when test="@ind2=5">
645 <span class="label">Absorbed:</span>
647 <xsl:when test="@ind2=6">
648 <span class="label">Absorbed in part:</span>
650 <xsl:when test="@ind2=7">
651 <span class="label">Separated from:</span>
654 <xsl:variable name="f780">
655 <xsl:call-template name="subfieldSelect">
656 <xsl:with-param name="codes">at</xsl:with-param>
660 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
661 <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>
662 <xsl:value-of select="translate($f780, '()', '')"/>
666 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
667 <xsl:value-of select="translate($f780, '()', '')"/>
673 <xsl:if test="marc:subfield[@code='n']">
674 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
682 <xsl:if test="marc:datafield[@tag=785]">
683 <xsl:for-each select="marc:datafield[@tag=785]">
684 <span class="results_summary succeeding_entry">
686 <xsl:when test="@ind2=0">
687 <span class="label">Continued by:</span>
689 <xsl:when test="@ind2=1">
690 <span class="label">Continued in part by:</span>
692 <xsl:when test="@ind2=2">
693 <span class="label">Superseded by:</span>
695 <xsl:when test="@ind2=3">
696 <span class="label">Superseded in part by:</span>
698 <xsl:when test="@ind2=4">
699 <span class="label">Absorbed by:</span>
701 <xsl:when test="@ind2=5">
702 <span class="label">Absorbed in part by:</span>
704 <xsl:when test="@ind2=6">
705 <span class="label">Split into .. and ...:</span>
707 <xsl:when test="@ind2=7">
708 <span class="label">Merged with ... to form ...</span>
710 <xsl:when test="@ind2=8">
711 <span class="label">Changed back to:</span>
715 <xsl:variable name="f785">
716 <xsl:call-template name="subfieldSelect">
717 <xsl:with-param name="codes">at</xsl:with-param>
722 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
723 <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>
724 <xsl:value-of select="translate($f785, '()', '')"/>
728 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
729 <xsl:value-of select="translate($f785, '()', '')"/>
738 <xsl:if test="$OPACBaseURL!=''">
739 <span class="results_summary"><span class="label">OPAC view: </span>
740 <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>.
746 <xsl:template name="nameABCDQ">
747 <xsl:call-template name="chopPunctuation">
748 <xsl:with-param name="chopString">
749 <xsl:call-template name="subfieldSelect">
750 <xsl:with-param name="codes">aq</xsl:with-param>
753 <xsl:with-param name="punctuation">
754 <xsl:text>:,;/ </xsl:text>
757 <xsl:call-template name="termsOfAddress"/>
760 <xsl:template name="nameABCDN">
761 <xsl:for-each select="marc:subfield[@code='a']">
762 <xsl:call-template name="chopPunctuation">
763 <xsl:with-param name="chopString" select="."/>
766 <xsl:for-each select="marc:subfield[@code='b']">
767 <xsl:value-of select="."/>
769 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
770 <xsl:call-template name="subfieldSelect">
771 <xsl:with-param name="codes">cdn</xsl:with-param>
776 <xsl:template name="nameACDEQ">
777 <xsl:call-template name="subfieldSelect">
778 <xsl:with-param name="codes">acdeq</xsl:with-param>
781 <xsl:template name="termsOfAddress">
782 <xsl:if test="marc:subfield[@code='b' or @code='c']">
783 <xsl:call-template name="chopPunctuation">
784 <xsl:with-param name="chopString">
785 <xsl:call-template name="subfieldSelect">
786 <xsl:with-param name="codes">bc</xsl:with-param>
793 <xsl:template name="part">
794 <xsl:variable name="partNumber">
795 <xsl:call-template name="specialSubfieldSelect">
796 <xsl:with-param name="axis">n</xsl:with-param>
797 <xsl:with-param name="anyCodes">n</xsl:with-param>
798 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
801 <xsl:variable name="partName">
802 <xsl:call-template name="specialSubfieldSelect">
803 <xsl:with-param name="axis">p</xsl:with-param>
804 <xsl:with-param name="anyCodes">p</xsl:with-param>
805 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
808 <xsl:if test="string-length(normalize-space($partNumber))">
809 <xsl:call-template name="chopPunctuation">
810 <xsl:with-param name="chopString" select="$partNumber"/>
813 <xsl:if test="string-length(normalize-space($partName))">
814 <xsl:call-template name="chopPunctuation">
815 <xsl:with-param name="chopString" select="$partName"/>
820 <xsl:template name="specialSubfieldSelect">
821 <xsl:param name="anyCodes"/>
822 <xsl:param name="axis"/>
823 <xsl:param name="beforeCodes"/>
824 <xsl:param name="afterCodes"/>
825 <xsl:variable name="str">
826 <xsl:for-each select="marc:subfield">
827 <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])">
828 <xsl:value-of select="text()"/>
829 <xsl:text> </xsl:text>
833 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
836 <xsl:template name="showAuthor">
837 <xsl:param name="authorfield"/>
838 <xsl:param name="UseAuthoritiesForTracings"/>
839 <xsl:if test="count($authorfield)>0">
841 <xsl:for-each select="$authorfield">
843 <xsl:when test="position()>1"/>
844 <xsl:when test="@tag<700">Author(s): </xsl:when>
845 <xsl:otherwise>Additional author(s): </xsl:otherwise>
849 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
850 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
853 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
857 <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCDQ"/></xsl:when>
858 <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
859 <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
861 <!-- add relator code too between brackets-->
862 <xsl:if test="marc:subfield[@code='4' or @code='e']">
863 <xsl:text>[</xsl:text>
865 <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
866 <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
868 <xsl:text>]</xsl:text>
872 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>