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']"/>
25 <xsl:variable name="leader" select="marc:leader"/>
26 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
27 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
28 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
29 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
30 <xsl:variable name="materialTypeCode">
32 <xsl:when test="$leader19='a'">ST</xsl:when>
33 <xsl:when test="$leader6='a'">
35 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
36 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
37 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
40 <xsl:when test="$leader6='t'">BK</xsl:when>
41 <xsl:when test="$leader6='p'">MX</xsl:when>
42 <xsl:when test="$leader6='m'">CF</xsl:when>
43 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
44 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
45 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
46 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
49 <xsl:variable name="materialTypeLabel">
51 <xsl:when test="$leader19='a'">Set</xsl:when>
52 <xsl:when test="$leader6='a'">
54 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
55 <xsl:when test="$leader7='i' or $leader7='s'">Continuing Resource</xsl:when>
56 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
59 <xsl:when test="$leader6='t'">Book</xsl:when>
60 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
61 <xsl:when test="$leader6='m'">Computer File</xsl:when>
62 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
63 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">Visual Material</xsl:when>
64 <xsl:when test="$leader6='j'">Music</xsl:when>
65 <xsl:when test="$leader6='i'">Sound</xsl:when>
66 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
70 <!-- Title Statement -->
71 <!-- Alternate Graphic Representation (MARC 880) -->
72 <xsl:if test="$display880">
74 <xsl:call-template name="m880Select">
75 <xsl:with-param name="basetags">245</xsl:with-param>
76 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
81 <xsl:if test="marc:datafield[@tag=245]">
83 <xsl:for-each select="marc:datafield[@tag=245]">
84 <xsl:call-template name="subfieldSelect">
85 <xsl:with-param name="codes">a</xsl:with-param>
87 <xsl:if test="marc:subfield[@code='b']">
88 <xsl:text> </xsl:text>
89 <xsl:call-template name="subfieldSelect">
90 <xsl:with-param name="codes">b</xsl:with-param>
93 <xsl:if test="marc:subfield[@code='h']">
94 <xsl:text> </xsl:text>
95 <xsl:call-template name="subfieldSelect">
96 <xsl:with-param name="codes">h</xsl:with-param>
99 <xsl:text> </xsl:text>
100 <xsl:call-template name="subfieldSelect">
101 <xsl:with-param name="codes">fgknps</xsl:with-param>
107 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
108 <xsl:if test="$display880">
110 <xsl:call-template name="m880Select">
111 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
112 <xsl:with-param name="codes">abc</xsl:with-param>
113 <xsl:with-param name="index">au</xsl:with-param>
114 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
120 <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]">
121 <h5 class="author">by
122 <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
125 <xsl:when test="marc:subfield[@code=9]">
126 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
129 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
132 <xsl:call-template name="nameABCDQ"/></a>
134 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
137 <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
140 <xsl:when test="marc:subfield[@code=9]">
141 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
144 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
147 <xsl:call-template name="nameABCDN"/></a>
148 <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
151 <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
153 <xsl:when test="marc:subfield[@code='n']">
154 <xsl:text> </xsl:text>
155 <xsl:call-template name="subfieldSelect">
156 <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template>
157 <xsl:text> </xsl:text>
162 <xsl:when test="marc:subfield[@code=9]">
163 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
166 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
169 <xsl:call-template name="nameACDEQ"/></a>
170 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
177 <span class="view"><span id="Normalview">Normal View</span> </span>
178 <span class="view"><a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id={marc:datafield[@tag=999]/marc:subfield[@code='c']}" title="MARC" rel="gb_page_center[600,500]">MARC View</a></span>
179 <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}" title="MARC">Expanded MARC View</a></span>
180 <xsl:if test="$ShowISBD!='0'">
181 <span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}">Card View (ISBD)</a></span>
185 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
186 <xsl:if test="$materialTypeCode!=''">
187 <span class="results_summary"><span class="label">Type: </span>
188 <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>
189 <xsl:value-of select="$materialTypeLabel"/>
194 <!--Series: Alternate Graphic Representation (MARC 880) -->
195 <xsl:if test="$display880">
196 <xsl:call-template name="m880Select">
197 <xsl:with-param name="basetags">440,490</xsl:with-param>
198 <xsl:with-param name="codes">av</xsl:with-param>
199 <xsl:with-param name="class">results_summary</xsl:with-param>
200 <xsl:with-param name="label">Series: </xsl:with-param>
201 <xsl:with-param name="index">se</xsl:with-param>
205 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
206 <span class="results_summary"><span class="label">Series: </span>
207 <xsl:for-each select="marc:datafield[@tag=440]">
208 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
209 <xsl:call-template name="chopPunctuation">
210 <xsl:with-param name="chopString">
211 <xsl:call-template name="subfieldSelect">
212 <xsl:with-param name="codes">av</xsl:with-param>
217 <xsl:text> </xsl:text><xsl:call-template name="part"/>
218 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
221 <xsl:for-each select="marc:datafield[@tag=490]">
222 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
223 <xsl:call-template name="chopPunctuation">
224 <xsl:with-param name="chopString">
225 <xsl:call-template name="subfieldSelect">
226 <xsl:with-param name="codes">av</xsl:with-param>
231 <xsl:call-template name="part"/>
232 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
238 <xsl:if test="$materialTypeCode='ST'">
239 <span class="results_summary"><span class="label">Volumes: </span>
242 <xsl:when test="$UseControlNumber = '1'">
243 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
246 <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>
249 <xsl:text>Show volumes</xsl:text>
254 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
255 <xsl:if test="$display880">
256 <xsl:call-template name="m880Select">
257 <xsl:with-param name="basetags">260</xsl:with-param>
258 <xsl:with-param name="codes">abcg</xsl:with-param>
259 <xsl:with-param name="class">results_summary</xsl:with-param>
260 <xsl:with-param name="label">Publisher: </xsl:with-param>
264 <xsl:if test="marc:datafield[@tag=260]">
265 <span class="results_summary"><span class="label">Publisher: </span>
266 <xsl:for-each select="marc:datafield[@tag=260]">
267 <xsl:if test="marc:subfield[@code='b']">
268 <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
269 <xsl:call-template name="subfieldSelect">
270 <xsl:with-param name="codes">b</xsl:with-param>
274 <xsl:text> </xsl:text>
275 <xsl:call-template name="chopPunctuation">
276 <xsl:with-param name="chopString">
277 <xsl:call-template name="subfieldSelect">
278 <xsl:with-param name="codes">acg</xsl:with-param>
282 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
287 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
288 <xsl:if test="$display880">
289 <xsl:call-template name="m880Select">
290 <xsl:with-param name="basetags">250</xsl:with-param>
291 <xsl:with-param name="codes">ab</xsl:with-param>
292 <xsl:with-param name="class">results_summary</xsl:with-param>
293 <xsl:with-param name="label">Edition: </xsl:with-param>
297 <xsl:if test="marc:datafield[@tag=250]">
298 <span class="results_summary"><span class="label">Edition: </span>
299 <xsl:for-each select="marc:datafield[@tag=250]">
300 <xsl:call-template name="chopPunctuation">
301 <xsl:with-param name="chopString">
302 <xsl:call-template name="subfieldSelect">
303 <xsl:with-param name="codes">ab</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 <!-- Description: Alternate Graphic Representation (MARC 880) -->
313 <xsl:if test="$display880">
314 <xsl:call-template name="m880Select">
315 <xsl:with-param name="basetags">300</xsl:with-param>
316 <xsl:with-param name="codes">abceg</xsl:with-param>
317 <xsl:with-param name="class">results_summary</xsl:with-param>
318 <xsl:with-param name="label">Description: </xsl:with-param>
322 <xsl:if test="marc:datafield[@tag=300]">
323 <span class="results_summary"><span class="label">Description: </span>
324 <xsl:for-each select="marc:datafield[@tag=300]">
325 <xsl:call-template name="chopPunctuation">
326 <xsl:with-param name="chopString">
327 <xsl:call-template name="subfieldSelect">
328 <xsl:with-param name="codes">abceg</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 <xsl:if test="marc:datafield[@tag=020]">
338 <span class="results_summary"><span class="label">ISBN: </span>
339 <xsl:for-each select="marc:datafield[@tag=020]">
340 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
341 <xsl:value-of select="marc:subfield[@code='a']"/>
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 <xsl:if test="marc:datafield[@tag=022]">
348 <span class="results_summary"><span class="label">ISSN: </span>
349 <xsl:for-each select="marc:datafield[@tag=022]">
350 <xsl:value-of select="marc:subfield[@code='a']"/>
351 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
356 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
357 <xsl:if test="$display880">
358 <xsl:call-template name="m880Select">
359 <xsl:with-param name="basetags">246</xsl:with-param>
360 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
361 <xsl:with-param name="class">results_summary</xsl:with-param>
362 <xsl:with-param name="label">Other Title: </xsl:with-param>
366 <xsl:if test="marc:datafield[@tag=246]">
367 <span class="results_summary"><span class="label">Other Title: </span>
368 <xsl:for-each select="marc:datafield[@tag=246]">
369 <xsl:call-template name="chopPunctuation">
370 <xsl:with-param name="chopString">
371 <xsl:call-template name="subfieldSelect">
372 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
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 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
382 <xsl:if test="$display880">
383 <xsl:call-template name="m880Select">
384 <xsl:with-param name="basetags">130,240</xsl:with-param>
385 <xsl:with-param name="codes">adfklmor</xsl:with-param>
386 <xsl:with-param name="class">results_summary</xsl:with-param>
387 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
391 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
392 <span class="results_summary"><span class="label">Uniform titles: </span>
393 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
394 <xsl:variable name="str">
395 <xsl:for-each select="marc:subfield">
396 <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'])))">
397 <xsl:value-of select="text()"/>
398 <xsl:text> </xsl:text>
402 <xsl:call-template name="chopPunctuation">
403 <xsl:with-param name="chopString">
404 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
408 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
413 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
414 <span class="results_summary"><span class="label">Subject(s): </span>
415 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
418 <xsl:when test="marc:subfield[@code=9]">
419 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
422 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
425 <xsl:call-template name="chopPunctuation">
426 <xsl:with-param name="chopString">
427 <xsl:call-template name="subfieldSelect">
428 <xsl:with-param name="codes">abcdtvxyz</xsl:with-param>
429 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
430 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
436 <xsl:when test="position()=last()"></xsl:when>
437 <xsl:otherwise> | </xsl:otherwise>
444 <xsl:if test="marc:datafield[@tag=856]">
445 <span class="results_summary"><span class="label">Online Resources: </span>
446 <xsl:for-each select="marc:datafield[@tag=856]">
447 <xsl:if test="$OPACURLOpenInNewWindow='0'">
448 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
450 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
451 <xsl:call-template name="subfieldSelect">
452 <xsl:with-param name="codes">y3z</xsl:with-param>
455 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
457 <xsl:when test="$URLLinkText!=''">
458 <xsl:value-of select="$URLLinkText"/>
461 <xsl:text>Click here to access online</xsl:text>
468 <xsl:if test="$OPACURLOpenInNewWindow='1'">
469 <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
471 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
472 <xsl:call-template name="subfieldSelect">
473 <xsl:with-param name="codes">y3z</xsl:with-param>
476 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
478 <xsl:when test="$URLLinkText!=''">
479 <xsl:value-of select="$URLLinkText"/>
482 <xsl:text>Click here to access online</xsl:text>
490 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
491 <xsl:otherwise> | </xsl:otherwise>
497 <xsl:if test="marc:datafield[@tag=505]">
498 <xsl:for-each select="marc:datafield[@tag=505]">
499 <span class="results_summary">
501 <xsl:when test="@ind1=1">
502 <span class="label">Incomplete contents:</span>
504 <xsl:when test="@ind1=1">
505 <span class="label">Partial contents:</span>
508 <span class="label">Contents:</span>
512 <xsl:when test="@ind2=0">
513 <xsl:for-each select="marc:subfield[@code='t']">
514 <xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/>
518 <xsl:call-template name="subfieldSelect">
519 <xsl:with-param name="codes">au</xsl:with-param>
528 <xsl:if test="marc:datafield[@tag=773]">
529 <xsl:for-each select="marc:datafield[@tag=773]">
530 <xsl:if test="@ind1=0">
531 <span class="results_summary"><span class="label">
533 <xsl:when test="@ind2=' '">
536 <xsl:when test="@ind2=8">
537 <xsl:if test="marc:subfield[@code='i']">
538 <xsl:value-of select="marc:subfield[@code='i']"/>
543 <xsl:variable name="f773">
544 <xsl:call-template name="subfieldSelect">
545 <xsl:with-param name="codes">at</xsl:with-param>
548 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
549 <xsl:value-of select="$f773"/>
553 <xsl:if test="marc:subfield[@code='n']">
554 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
561 <xsl:for-each select="marc:datafield[@tag=520]">
562 <span class="results_summary"><span class="label">
564 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
565 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
566 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
567 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
568 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
569 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
572 <xsl:call-template name="subfieldSelect">
573 <xsl:with-param name="codes">abcu</xsl:with-param>
578 <!-- 866 holdings public note -->
579 <xsl:if test="marc:datafield[@tag=866]">
580 <span class="results_summary"><span class="label">Holdings Note: </span>
581 <xsl:for-each select="marc:datafield[@tag=866]">
582 <xsl:value-of select="marc:subfield[@code='z']"/>
583 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
589 <xsl:if test="marc:datafield[@tag=780]">
590 <xsl:for-each select="marc:datafield[@tag=780]">
591 <xsl:if test="@ind1=0">
592 <span class="results_summary">
594 <xsl:when test="@ind2=0">
595 <span class="label">Continues:</span>
597 <xsl:when test="@ind2=1">
598 <span class="label">Continues in part:</span>
600 <xsl:when test="@ind2=2">
601 <span class="label">Supersedes:</span>
603 <xsl:when test="@ind2=3">
604 <span class="label">Supersedes in part:</span>
606 <xsl:when test="@ind2=4">
607 <span class="label">Formed by the union: ... and: ...</span>
609 <xsl:when test="@ind2=5">
610 <span class="label">Absorbed:</span>
612 <xsl:when test="@ind2=6">
613 <span class="label">Absorbed in part:</span>
615 <xsl:when test="@ind2=7">
616 <span class="label">Separated from:</span>
619 <xsl:variable name="f780">
620 <xsl:call-template name="subfieldSelect">
621 <xsl:with-param name="codes">at</xsl:with-param>
624 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
625 <xsl:value-of select="translate($f780, '()', '')"/>
629 <xsl:if test="marc:subfield[@code='n']">
630 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
638 <xsl:if test="marc:datafield[@tag=785]">
639 <xsl:for-each select="marc:datafield[@tag=785]">
640 <xsl:if test="@ind1=0">
641 <span class="results_summary">
643 <xsl:when test="@ind2=0">
644 <span class="label">Continued by:</span>
646 <xsl:when test="@ind2=1">
647 <span class="label">Continued in part by:</span>
649 <xsl:when test="@ind2=2">
650 <span class="label">Superseded by:</span>
652 <xsl:when test="@ind2=3">
653 <span class="label">Superseded in part by:</span>
655 <xsl:when test="@ind2=4">
656 <span class="label">Absorbed by:</span>
658 <xsl:when test="@ind2=5">
659 <span class="label">Absorbed in part by:</span>
661 <xsl:when test="@ind2=6">
662 <span class="label">Split into .. and ...:</span>
664 <xsl:when test="@ind2=7">
665 <span class="label">Merged with ... to form ...</span>
667 <xsl:when test="@ind2=8">
668 <span class="label">Changed back to:</span>
672 <xsl:variable name="f785">
673 <xsl:call-template name="subfieldSelect">
674 <xsl:with-param name="codes">at</xsl:with-param>
678 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
679 <xsl:value-of select="translate($f785, '()', '')"/>
684 <xsl:if test="marc:subfield[@code='n']">
685 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
694 <xsl:template name="nameABCDQ">
695 <xsl:call-template name="chopPunctuation">
696 <xsl:with-param name="chopString">
697 <xsl:call-template name="subfieldSelect">
698 <xsl:with-param name="codes">aq</xsl:with-param>
701 <xsl:with-param name="punctuation">
702 <xsl:text>:,;/ </xsl:text>
705 <xsl:call-template name="termsOfAddress"/>
708 <xsl:template name="nameABCDN">
709 <xsl:for-each select="marc:subfield[@code='a']">
710 <xsl:call-template name="chopPunctuation">
711 <xsl:with-param name="chopString" select="."/>
714 <xsl:for-each select="marc:subfield[@code='b']">
715 <xsl:value-of select="."/>
717 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
718 <xsl:call-template name="subfieldSelect">
719 <xsl:with-param name="codes">cdn</xsl:with-param>
724 <xsl:template name="nameACDEQ">
725 <xsl:call-template name="subfieldSelect">
726 <xsl:with-param name="codes">acdeq</xsl:with-param>
729 <xsl:template name="termsOfAddress">
730 <xsl:if test="marc:subfield[@code='b' or @code='c']">
731 <xsl:call-template name="chopPunctuation">
732 <xsl:with-param name="chopString">
733 <xsl:call-template name="subfieldSelect">
734 <xsl:with-param name="codes">bc</xsl:with-param>
741 <xsl:template name="part">
742 <xsl:variable name="partNumber">
743 <xsl:call-template name="specialSubfieldSelect">
744 <xsl:with-param name="axis">n</xsl:with-param>
745 <xsl:with-param name="anyCodes">n</xsl:with-param>
746 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
749 <xsl:variable name="partName">
750 <xsl:call-template name="specialSubfieldSelect">
751 <xsl:with-param name="axis">p</xsl:with-param>
752 <xsl:with-param name="anyCodes">p</xsl:with-param>
753 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
756 <xsl:if test="string-length(normalize-space($partNumber))">
757 <xsl:call-template name="chopPunctuation">
758 <xsl:with-param name="chopString" select="$partNumber"/>
761 <xsl:if test="string-length(normalize-space($partName))">
762 <xsl:call-template name="chopPunctuation">
763 <xsl:with-param name="chopString" select="$partName"/>
768 <xsl:template name="specialSubfieldSelect">
769 <xsl:param name="anyCodes"/>
770 <xsl:param name="axis"/>
771 <xsl:param name="beforeCodes"/>
772 <xsl:param name="afterCodes"/>
773 <xsl:variable name="str">
774 <xsl:for-each select="marc:subfield">
775 <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])">
776 <xsl:value-of select="text()"/>
777 <xsl:text> </xsl:text>
781 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>