1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
4 <xsl:stylesheet version="1.0"
5 xmlns:marc="http://www.loc.gov/MARC21/slim"
6 xmlns:items="http://www.koha-community.org/items"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 exclude-result-prefixes="marc items">
9 <xsl:import href="MARC21slimUtils.xsl"/>
10 <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
11 <xsl:template match="/">
12 <xsl:apply-templates/>
15 <xsl:template match="marc:record">
17 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
18 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
20 <xsl:variable name="UseControlNumber" select="1"/>
21 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
22 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
23 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
26 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
27 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
28 <xsl:variable name="leader" select="marc:leader"/>
29 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
30 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
31 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
32 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
33 <xsl:variable name="materialTypeCode">
35 <xsl:when test="$leader19='a'">ST</xsl:when>
36 <xsl:when test="$leader6='a'">
38 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
39 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
40 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
43 <xsl:when test="$leader6='t'">BK</xsl:when>
44 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
45 <xsl:when test="$leader6='m'">CF</xsl:when>
46 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
47 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
48 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
49 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
52 <xsl:variable name="materialTypeLabel">
54 <xsl:when test="$leader19='a'">Set</xsl:when>
55 <xsl:when test="$leader6='a'">
57 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
58 <xsl:when test="$leader7='i' or $leader7='s'">
60 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
61 <xsl:otherwise>Series</xsl:otherwise>
64 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
67 <xsl:when test="$leader6='t'">Book</xsl:when>
68 <xsl:when test="$leader6='o'">Kit</xsl:when>
69 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
70 <xsl:when test="$leader6='m'">Computer File</xsl:when>
71 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
72 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual Material</xsl:when>
73 <xsl:when test="$leader6='j'">Music</xsl:when>
74 <xsl:when test="$leader6='i'">Sound</xsl:when>
75 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
79 <!-- Title Statement -->
80 <!-- Alternate Graphic Representation (MARC 880) -->
81 <xsl:if test="$display880">
83 <xsl:call-template name="m880Select">
84 <xsl:with-param name="basetags">245</xsl:with-param>
85 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
90 <xsl:if test="marc:datafield[@tag=245]">
92 <xsl:for-each select="marc:datafield[@tag=245]">
93 <xsl:call-template name="subfieldSelect">
94 <xsl:with-param name="codes">a</xsl:with-param>
96 <xsl:if test="marc:subfield[@code='b']">
97 <xsl:text> </xsl:text>
98 <xsl:call-template name="subfieldSelect">
99 <xsl:with-param name="codes">b</xsl:with-param>
102 <xsl:if test="marc:subfield[@code='h']">
103 <xsl:text> </xsl:text>
104 <xsl:call-template name="subfieldSelect">
105 <xsl:with-param name="codes">h</xsl:with-param>
108 <xsl:text> </xsl:text>
109 <xsl:call-template name="subfieldSelect">
110 <xsl:with-param name="codes">fgknps</xsl:with-param>
116 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
117 <xsl:if test="$display880">
119 <xsl:call-template name="m880Select">
120 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
121 <xsl:with-param name="codes">abc</xsl:with-param>
122 <xsl:with-param name="index">au</xsl:with-param>
123 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
129 <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
130 <h5 class="author">by
131 <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
134 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
135 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
138 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
141 <xsl:call-template name="nameABCDQ"/></a>
143 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
146 <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
149 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
150 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
153 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
156 <xsl:call-template name="nameABCDN"/></a>
157 <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
160 <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
162 <xsl:when test="marc:subfield[@code='n']">
163 <xsl:text> </xsl:text>
164 <xsl:call-template name="subfieldSelect">
165 <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template>
166 <xsl:text> </xsl:text>
171 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
172 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
175 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
178 <xsl:call-template name="nameACDEQ"/></a>
179 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
186 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
187 <xsl:if test="$materialTypeCode!=''">
188 <span class="results_summary"><span class="label">Type: </span>
189 <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
190 <xsl:value-of select="$materialTypeLabel"/>
195 <!--Series: Alternate Graphic Representation (MARC 880) -->
196 <xsl:if test="$display880">
197 <xsl:call-template name="m880Select">
198 <xsl:with-param name="basetags">440,490</xsl:with-param>
199 <xsl:with-param name="codes">av</xsl:with-param>
200 <xsl:with-param name="class">results_summary</xsl:with-param>
201 <xsl:with-param name="label">Series: </xsl:with-param>
202 <xsl:with-param name="index">se</xsl:with-param>
207 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
208 <span class="results_summary"><span class="label">Series: </span>
210 <xsl:for-each select="marc:datafield[@tag=440]">
211 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
212 <xsl:call-template name="chopPunctuation">
213 <xsl:with-param name="chopString">
214 <xsl:call-template name="subfieldSelect">
215 <xsl:with-param name="codes">av</xsl:with-param>
220 <xsl:text> </xsl:text><xsl:call-template name="part"/>
221 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
224 <!-- 490 Series not traced, Ind1 = 0 -->
225 <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
226 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
227 <xsl:call-template name="chopPunctuation">
228 <xsl:with-param name="chopString">
229 <xsl:call-template name="subfieldSelect">
230 <xsl:with-param name="codes">av</xsl:with-param>
235 <xsl:call-template name="part"/>
236 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
238 <!-- 490 Series traced, Ind1 = 1 -->
239 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
240 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
242 <xsl:when test="marc:subfield[@code='w']">
243 <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
244 <xsl:call-template name="chopPunctuation">
245 <xsl:with-param name="chopString">
246 <xsl:call-template name="subfieldSelect">
247 <xsl:with-param name="codes">at</xsl:with-param>
254 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='t']}">
255 <xsl:call-template name="chopPunctuation">
256 <xsl:with-param name="chopString">
257 <xsl:call-template name="subfieldSelect">
258 <xsl:with-param name="codes">at</xsl:with-param>
263 <xsl:call-template name="part"/>
266 <xsl:text>: </xsl:text>
267 <xsl:value-of select="marc:subfield[@code='v']" />
268 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
274 <!-- Volumes of sets and traced series -->
275 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
276 <span class="results_summary"><span class="label">Volumes: </span>
279 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
280 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
283 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
286 <xsl:text>Show volumes</xsl:text>
292 <xsl:if test="$leader19='c'">
293 <span class="results_summary"><span class="label">Set: </span>
294 <xsl:for-each select="marc:datafield[@tag=773]">
297 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
298 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:subfield[@code='w']"/></xsl:attribute>
301 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
304 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
307 <xsl:when test="position()=last()"></xsl:when>
308 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
314 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
315 <xsl:if test="$display880">
316 <xsl:call-template name="m880Select">
317 <xsl:with-param name="basetags">260</xsl:with-param>
318 <xsl:with-param name="codes">abcg</xsl:with-param>
319 <xsl:with-param name="class">results_summary</xsl:with-param>
320 <xsl:with-param name="label">Publisher: </xsl:with-param>
324 <xsl:if test="marc:datafield[@tag=260]">
325 <span class="results_summary"><span class="label">Publisher: </span>
326 <xsl:for-each select="marc:datafield[@tag=260]">
327 <xsl:if test="marc:subfield[@code='b']">
328 <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
329 <xsl:call-template name="subfieldSelect">
330 <xsl:with-param name="codes">b</xsl:with-param>
334 <xsl:text> </xsl:text>
335 <xsl:call-template name="chopPunctuation">
336 <xsl:with-param name="chopString">
337 <xsl:call-template name="subfieldSelect">
338 <xsl:with-param name="codes">acg</xsl:with-param>
342 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
347 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
348 <xsl:if test="$display880">
349 <xsl:call-template name="m880Select">
350 <xsl:with-param name="basetags">250</xsl:with-param>
351 <xsl:with-param name="codes">ab</xsl:with-param>
352 <xsl:with-param name="class">results_summary</xsl:with-param>
353 <xsl:with-param name="label">Edition: </xsl:with-param>
357 <xsl:if test="marc:datafield[@tag=250]">
358 <span class="results_summary"><span class="label">Edition: </span>
359 <xsl:for-each select="marc:datafield[@tag=250]">
360 <xsl:call-template name="chopPunctuation">
361 <xsl:with-param name="chopString">
362 <xsl:call-template name="subfieldSelect">
363 <xsl:with-param name="codes">ab</xsl:with-param>
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 <!-- Description: Alternate Graphic Representation (MARC 880) -->
373 <xsl:if test="$display880">
374 <xsl:call-template name="m880Select">
375 <xsl:with-param name="basetags">300</xsl:with-param>
376 <xsl:with-param name="codes">abceg</xsl:with-param>
377 <xsl:with-param name="class">results_summary</xsl:with-param>
378 <xsl:with-param name="label">Description: </xsl:with-param>
382 <xsl:if test="marc:datafield[@tag=300]">
383 <span class="results_summary"><span class="label">Description: </span>
384 <xsl:for-each select="marc:datafield[@tag=300]">
385 <xsl:call-template name="chopPunctuation">
386 <xsl:with-param name="chopString">
387 <xsl:call-template name="subfieldSelect">
388 <xsl:with-param name="codes">abceg</xsl:with-param>
392 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
397 <xsl:if test="marc:datafield[@tag=020]">
398 <span class="results_summary"><span class="label">ISBN: </span>
399 <xsl:for-each select="marc:datafield[@tag=020]">
400 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
401 <xsl:value-of select="marc:subfield[@code='a']"/>
402 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
407 <xsl:if test="marc:datafield[@tag=022]">
408 <span class="results_summary"><span class="label">ISSN: </span>
409 <xsl:for-each select="marc:datafield[@tag=022]">
410 <xsl:value-of select="marc:subfield[@code='a']"/>
411 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
416 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
417 <xsl:if test="$display880">
418 <xsl:call-template name="m880Select">
419 <xsl:with-param name="basetags">246</xsl:with-param>
420 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
421 <xsl:with-param name="class">results_summary</xsl:with-param>
422 <xsl:with-param name="label">Other Title: </xsl:with-param>
426 <xsl:if test="marc:datafield[@tag=246]">
427 <span class="results_summary"><span class="label">Other Title: </span>
428 <xsl:for-each select="marc:datafield[@tag=246]">
429 <xsl:call-template name="chopPunctuation">
430 <xsl:with-param name="chopString">
431 <xsl:call-template name="subfieldSelect">
432 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
436 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
441 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
442 <xsl:if test="$display880">
443 <xsl:call-template name="m880Select">
444 <xsl:with-param name="basetags">130,240</xsl:with-param>
445 <xsl:with-param name="codes">adfklmor</xsl:with-param>
446 <xsl:with-param name="class">results_summary</xsl:with-param>
447 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
451 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
452 <span class="results_summary"><span class="label">Uniform titles: </span>
453 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
454 <xsl:variable name="str">
455 <xsl:for-each select="marc:subfield">
456 <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'])))">
457 <xsl:value-of select="text()"/>
458 <xsl:text> </xsl:text>
462 <xsl:call-template name="chopPunctuation">
463 <xsl:with-param name="chopString">
464 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
468 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
473 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
474 <span class="results_summary"><span class="label">Subject(s): </span>
475 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
478 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
479 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
482 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
485 <xsl:call-template name="chopPunctuation">
486 <xsl:with-param name="chopString">
487 <xsl:call-template name="subfieldSelect">
488 <xsl:with-param name="codes">abcdtvxyz</xsl:with-param>
489 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
490 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
496 <xsl:when test="position()=last()"></xsl:when>
497 <xsl:otherwise> | </xsl:otherwise>
504 <xsl:if test="marc:datafield[@tag=856]">
505 <span class="results_summary"><span class="label">Online Resources: </span>
506 <xsl:for-each select="marc:datafield[@tag=856]">
507 <xsl:if test="$OPACURLOpenInNewWindow='0'">
508 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
510 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
511 <xsl:call-template name="subfieldSelect">
512 <xsl:with-param name="codes">y3z</xsl:with-param>
515 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
517 <xsl:when test="$URLLinkText!=''">
518 <xsl:value-of select="$URLLinkText"/>
521 <xsl:text>Click here to access online</xsl:text>
528 <xsl:if test="$OPACURLOpenInNewWindow='1'">
529 <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
531 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
532 <xsl:call-template name="subfieldSelect">
533 <xsl:with-param name="codes">y3z</xsl:with-param>
536 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
538 <xsl:when test="$URLLinkText!=''">
539 <xsl:value-of select="$URLLinkText"/>
542 <xsl:text>Click here to access online</xsl:text>
550 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
551 <xsl:otherwise> | </xsl:otherwise>
557 <xsl:if test="marc:datafield[@tag=505]">
558 <xsl:for-each select="marc:datafield[@tag=505]">
559 <span class="results_summary">
561 <xsl:when test="@ind1=1">
562 <span class="label">Incomplete contents:</span>
564 <xsl:when test="@ind1=1">
565 <span class="label">Partial contents:</span>
568 <span class="label">Contents:</span>
572 <xsl:when test="@ind2=0">
573 <xsl:call-template name="subfieldSelect">
574 <xsl:with-param name="codes">tru</xsl:with-param>
578 <xsl:call-template name="subfieldSelect">
579 <xsl:with-param name="codes">au</xsl:with-param>
588 <xsl:if test="marc:datafield[@tag=773]">
589 <xsl:for-each select="marc:datafield[@tag=773]">
590 <xsl:if test="@ind1=0">
591 <span class="results_summary"><span class="label">
593 <xsl:when test="@ind2=' '">
596 <xsl:when test="@ind2=8">
597 <xsl:if test="marc:subfield[@code='i']">
598 <xsl:value-of select="marc:subfield[@code='i']"/>
603 <xsl:variable name="f773">
604 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
605 <xsl:with-param name="codes">at</xsl:with-param>
606 </xsl:call-template></xsl:with-param></xsl:call-template>
609 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
610 <a><xsl:attribute name="href">/cgi-bin/koha/opac-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>
611 <xsl:value-of select="translate($f773, '()', '')"/><xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
615 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
616 <xsl:value-of select="$f773"/><xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
622 <xsl:if test="marc:subfield[@code='n']">
623 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
630 <xsl:for-each select="marc:datafield[@tag=520]">
631 <span class="results_summary"><span class="label">
633 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
634 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
635 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
636 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
637 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
638 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
641 <xsl:call-template name="subfieldSelect">
642 <xsl:with-param name="codes">abcu</xsl:with-param>
647 <!-- 866 holdings public note -->
648 <xsl:if test="marc:datafield[@tag=866]">
649 <span class="results_summary"><span class="label">Holdings Note: </span>
650 <xsl:for-each select="marc:datafield[@tag=866]">
651 <xsl:value-of select="marc:subfield[@code='z']"/>
652 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
657 <!-- 775 Other Edition -->
658 <xsl:if test="marc:datafield[@tag=775]">
659 <span class="results_summary"><span class="label">Other Editions: </span>
660 <xsl:for-each select="marc:datafield[@tag=775]">
661 <xsl:if test="marc:subfield[@code='i']">
662 <xsl:call-template name="subfieldSelect">
663 <xsl:with-param name="codes">i</xsl:with-param>
665 <xsl:text>: </xsl:text>
669 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
670 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:subfield[@code='w']"/></xsl:attribute>
673 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
676 <xsl:call-template name="subfieldSelect">
677 <xsl:with-param name="codes">t</xsl:with-param>
681 <xsl:when test="position()=last()"></xsl:when>
682 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
689 <xsl:if test="marc:datafield[@tag=780]">
690 <xsl:for-each select="marc:datafield[@tag=780]">
691 <xsl:if test="@ind1=0">
692 <span class="results_summary">
694 <xsl:when test="@ind2=0">
695 <span class="label">Continues:</span>
697 <xsl:when test="@ind2=1">
698 <span class="label">Continues in part:</span>
700 <xsl:when test="@ind2=2">
701 <span class="label">Supersedes:</span>
703 <xsl:when test="@ind2=3">
704 <span class="label">Supersedes in part:</span>
706 <xsl:when test="@ind2=4">
707 <span class="label">Formed by the union: ... and: ...</span>
709 <xsl:when test="@ind2=5">
710 <span class="label">Absorbed:</span>
712 <xsl:when test="@ind2=6">
713 <span class="label">Absorbed in part:</span>
715 <xsl:when test="@ind2=7">
716 <span class="label">Separated from:</span>
719 <xsl:variable name="f780">
720 <xsl:call-template name="subfieldSelect">
721 <xsl:with-param name="codes">at</xsl:with-param>
725 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
726 <a href="/cgi-bin/koha/opac-search.pl?q=Control-number:{marc:subfield[@code='w']}">
727 <xsl:value-of select="translate($f780, '()', '')"/>
731 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
732 <xsl:value-of select="translate($f780, '()', '')"/>
738 <xsl:if test="marc:subfield[@code='n']">
739 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
747 <xsl:if test="marc:datafield[@tag=785]">
748 <xsl:for-each select="marc:datafield[@tag=785]">
749 <xsl:if test="@ind1=0">
750 <span class="results_summary">
752 <xsl:when test="@ind2=0">
753 <span class="label">Continued by:</span>
755 <xsl:when test="@ind2=1">
756 <span class="label">Continued in part by:</span>
758 <xsl:when test="@ind2=2">
759 <span class="label">Superseded by:</span>
761 <xsl:when test="@ind2=3">
762 <span class="label">Superseded in part by:</span>
764 <xsl:when test="@ind2=4">
765 <span class="label">Absorbed by:</span>
767 <xsl:when test="@ind2=5">
768 <span class="label">Absorbed in part by:</span>
770 <xsl:when test="@ind2=6">
771 <span class="label">Split into .. and ...:</span>
773 <xsl:when test="@ind2=7">
774 <span class="label">Merged with ... to form ...</span>
776 <xsl:when test="@ind2=8">
777 <span class="label">Changed back to:</span>
781 <xsl:variable name="f785">
782 <xsl:call-template name="subfieldSelect">
783 <xsl:with-param name="codes">at</xsl:with-param>
788 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
789 <a href="/cgi-bin/koha/opac-search.pl?q=Control-number:{marc:subfield[@code='w']}">
790 <xsl:value-of select="translate($f785, '()', '')"/>
794 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
795 <xsl:value-of select="translate($f785, '()', '')"/>
802 <xsl:if test="marc:subfield[@code='n']">
803 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
812 <xsl:template name="nameABCDQ">
813 <xsl:call-template name="chopPunctuation">
814 <xsl:with-param name="chopString">
815 <xsl:call-template name="subfieldSelect">
816 <xsl:with-param name="codes">aq</xsl:with-param>
819 <xsl:with-param name="punctuation">
820 <xsl:text>:,;/ </xsl:text>
823 <xsl:call-template name="termsOfAddress"/>
826 <xsl:template name="nameABCDN">
827 <xsl:for-each select="marc:subfield[@code='a']">
828 <xsl:call-template name="chopPunctuation">
829 <xsl:with-param name="chopString" select="."/>
832 <xsl:for-each select="marc:subfield[@code='b']">
833 <xsl:value-of select="."/>
835 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
836 <xsl:call-template name="subfieldSelect">
837 <xsl:with-param name="codes">cdn</xsl:with-param>
842 <xsl:template name="nameACDEQ">
843 <xsl:call-template name="subfieldSelect">
844 <xsl:with-param name="codes">acdeq</xsl:with-param>
847 <xsl:template name="termsOfAddress">
848 <xsl:if test="marc:subfield[@code='b' or @code='c']">
849 <xsl:call-template name="chopPunctuation">
850 <xsl:with-param name="chopString">
851 <xsl:call-template name="subfieldSelect">
852 <xsl:with-param name="codes">bc</xsl:with-param>
859 <xsl:template name="part">
860 <xsl:variable name="partNumber">
861 <xsl:call-template name="specialSubfieldSelect">
862 <xsl:with-param name="axis">n</xsl:with-param>
863 <xsl:with-param name="anyCodes">n</xsl:with-param>
864 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
867 <xsl:variable name="partName">
868 <xsl:call-template name="specialSubfieldSelect">
869 <xsl:with-param name="axis">p</xsl:with-param>
870 <xsl:with-param name="anyCodes">p</xsl:with-param>
871 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
874 <xsl:if test="string-length(normalize-space($partNumber))">
875 <xsl:call-template name="chopPunctuation">
876 <xsl:with-param name="chopString" select="$partNumber"/>
879 <xsl:if test="string-length(normalize-space($partName))">
880 <xsl:call-template name="chopPunctuation">
881 <xsl:with-param name="chopString" select="$partName"/>
886 <xsl:template name="specialSubfieldSelect">
887 <xsl:param name="anyCodes"/>
888 <xsl:param name="axis"/>
889 <xsl:param name="beforeCodes"/>
890 <xsl:param name="afterCodes"/>
891 <xsl:variable name="str">
892 <xsl:for-each select="marc:subfield">
893 <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])">
894 <xsl:value-of select="text()"/>
895 <xsl:text> </xsl:text>
899 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>