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="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
21 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
22 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
23 <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
24 <xsl:variable name="leader" select="marc:leader"/>
25 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
26 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
27 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
28 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
29 <xsl:variable name="materialTypeCode">
31 <xsl:when test="$leader19='a'">ST</xsl:when>
32 <xsl:when test="$leader6='a'">
34 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
35 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
36 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
39 <xsl:when test="$leader6='t'">BK</xsl:when>
40 <xsl:when test="$leader6='p'">MX</xsl:when>
41 <xsl:when test="$leader6='m'">CF</xsl:when>
42 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
43 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
44 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
45 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
48 <xsl:variable name="materialTypeLabel">
50 <xsl:when test="$leader19='a'">Set</xsl:when>
51 <xsl:when test="$leader6='a'">
53 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
54 <xsl:when test="$leader7='i' or $leader7='s'">Continuing Resource</xsl:when>
55 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
58 <xsl:when test="$leader6='t'">Book</xsl:when>
59 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
60 <xsl:when test="$leader6='m'">Computer File</xsl:when>
61 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
62 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">Visual Material</xsl:when>
63 <xsl:when test="$leader6='j'">Music</xsl:when>
64 <xsl:when test="$leader6='i'">Sound</xsl:when>
65 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
69 <!-- Title Statement -->
70 <!-- Alternate Graphic Representation (MARC 880) -->
71 <xsl:if test="$display880">
73 <xsl:call-template name="m880Select">
74 <xsl:with-param name="basetags">245</xsl:with-param>
75 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
80 <xsl:if test="marc:datafield[@tag=245]">
82 <xsl:for-each select="marc:datafield[@tag=245]">
83 <xsl:call-template name="subfieldSelect">
84 <xsl:with-param name="codes">a</xsl:with-param>
86 <xsl:if test="marc:subfield[@code='b']">
87 <xsl:text> </xsl:text>
88 <xsl:call-template name="subfieldSelect">
89 <xsl:with-param name="codes">b</xsl:with-param>
92 <xsl:if test="marc:subfield[@code='h']">
93 <xsl:text> </xsl:text>
94 <xsl:call-template name="subfieldSelect">
95 <xsl:with-param name="codes">h</xsl:with-param>
98 <xsl:text> </xsl:text>
99 <xsl:call-template name="subfieldSelect">
100 <xsl:with-param name="codes">fgknps</xsl:with-param>
106 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
107 <xsl:if test="$display880">
109 <xsl:call-template name="m880Select">
110 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
111 <xsl:with-param name="codes">abc</xsl:with-param>
112 <xsl:with-param name="index">au</xsl:with-param>
113 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
119 <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]">
120 <h5 class="author">by
121 <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
124 <xsl:when test="marc:subfield[@code=9]">
125 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
128 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
131 <xsl:call-template name="nameABCDQ"/></a>
133 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
136 <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
139 <xsl:when test="marc:subfield[@code=9]">
140 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
143 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
146 <xsl:call-template name="nameABCDN"/></a>
147 <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
150 <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
152 <xsl:when test="marc:subfield[@code='n']">
153 <xsl:text> </xsl:text>
154 <xsl:call-template name="subfieldSelect">
155 <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template>
156 <xsl:text> </xsl:text>
161 <xsl:when test="marc:subfield[@code=9]">
162 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
165 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
168 <xsl:call-template name="nameACDEQ"/></a>
169 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
176 <span class="view"><span id="Normalview">Normal View</span> </span>
177 <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>
178 <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>
179 <xsl:if test="$ShowISBD!='0'">
180 <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>
184 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
185 <xsl:if test="$materialTypeCode!=''">
186 <span class="results_summary"><span class="label">Type: </span>
187 <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>
188 <xsl:value-of select="$materialTypeLabel"/>
193 <!--Series: Alternate Graphic Representation (MARC 880) -->
194 <xsl:if test="$display880">
195 <xsl:call-template name="m880Select">
196 <xsl:with-param name="basetags">440,490</xsl:with-param>
197 <xsl:with-param name="codes">av</xsl:with-param>
198 <xsl:with-param name="class">results_summary</xsl:with-param>
199 <xsl:with-param name="label">Series: </xsl:with-param>
200 <xsl:with-param name="index">se</xsl:with-param>
204 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
205 <span class="results_summary"><span class="label">Series: </span>
206 <xsl:for-each select="marc:datafield[@tag=440]">
207 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
208 <xsl:call-template name="chopPunctuation">
209 <xsl:with-param name="chopString">
210 <xsl:call-template name="subfieldSelect">
211 <xsl:with-param name="codes">av</xsl:with-param>
216 <xsl:text> </xsl:text><xsl:call-template name="part"/>
217 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
220 <xsl:for-each select="marc:datafield[@tag=490]">
221 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
222 <xsl:call-template name="chopPunctuation">
223 <xsl:with-param name="chopString">
224 <xsl:call-template name="subfieldSelect">
225 <xsl:with-param name="codes">av</xsl:with-param>
230 <xsl:call-template name="part"/>
231 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
236 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
237 <xsl:if test="$display880">
238 <xsl:call-template name="m880Select">
239 <xsl:with-param name="basetags">260</xsl:with-param>
240 <xsl:with-param name="codes">abcg</xsl:with-param>
241 <xsl:with-param name="class">results_summary</xsl:with-param>
242 <xsl:with-param name="label">Publisher: </xsl:with-param>
246 <xsl:if test="marc:datafield[@tag=260]">
247 <span class="results_summary"><span class="label">Publisher: </span>
248 <xsl:for-each select="marc:datafield[@tag=260]">
249 <xsl:if test="marc:subfield[@code='b']">
250 <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
251 <xsl:call-template name="subfieldSelect">
252 <xsl:with-param name="codes">b</xsl:with-param>
256 <xsl:text> </xsl:text>
257 <xsl:call-template name="chopPunctuation">
258 <xsl:with-param name="chopString">
259 <xsl:call-template name="subfieldSelect">
260 <xsl:with-param name="codes">acg</xsl:with-param>
264 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
269 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
270 <xsl:if test="$display880">
271 <xsl:call-template name="m880Select">
272 <xsl:with-param name="basetags">250</xsl:with-param>
273 <xsl:with-param name="codes">ab</xsl:with-param>
274 <xsl:with-param name="class">results_summary</xsl:with-param>
275 <xsl:with-param name="label">Edition: </xsl:with-param>
279 <xsl:if test="marc:datafield[@tag=250]">
280 <span class="results_summary"><span class="label">Edition: </span>
281 <xsl:for-each select="marc:datafield[@tag=250]">
282 <xsl:call-template name="chopPunctuation">
283 <xsl:with-param name="chopString">
284 <xsl:call-template name="subfieldSelect">
285 <xsl:with-param name="codes">ab</xsl:with-param>
289 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
294 <!-- Description: Alternate Graphic Representation (MARC 880) -->
295 <xsl:if test="$display880">
296 <xsl:call-template name="m880Select">
297 <xsl:with-param name="basetags">300</xsl:with-param>
298 <xsl:with-param name="codes">abceg</xsl:with-param>
299 <xsl:with-param name="class">results_summary</xsl:with-param>
300 <xsl:with-param name="label">Description: </xsl:with-param>
304 <xsl:if test="marc:datafield[@tag=300]">
305 <span class="results_summary"><span class="label">Description: </span>
306 <xsl:for-each select="marc:datafield[@tag=300]">
307 <xsl:call-template name="chopPunctuation">
308 <xsl:with-param name="chopString">
309 <xsl:call-template name="subfieldSelect">
310 <xsl:with-param name="codes">abceg</xsl:with-param>
314 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
319 <xsl:if test="marc:datafield[@tag=020]">
320 <span class="results_summary"><span class="label">ISBN: </span>
321 <xsl:for-each select="marc:datafield[@tag=020]">
322 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
323 <xsl:value-of select="marc:subfield[@code='a']"/>
324 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
329 <xsl:if test="marc:datafield[@tag=022]">
330 <span class="results_summary"><span class="label">ISSN: </span>
331 <xsl:for-each select="marc:datafield[@tag=022]">
332 <xsl:value-of select="marc:subfield[@code='a']"/>
333 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
338 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
339 <xsl:if test="$display880">
340 <xsl:call-template name="m880Select">
341 <xsl:with-param name="basetags">246</xsl:with-param>
342 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
343 <xsl:with-param name="class">results_summary</xsl:with-param>
344 <xsl:with-param name="label">Other Title: </xsl:with-param>
348 <xsl:if test="marc:datafield[@tag=246]">
349 <span class="results_summary"><span class="label">Other Title: </span>
350 <xsl:for-each select="marc:datafield[@tag=246]">
351 <xsl:call-template name="chopPunctuation">
352 <xsl:with-param name="chopString">
353 <xsl:call-template name="subfieldSelect">
354 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
358 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
363 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
364 <xsl:if test="$display880">
365 <xsl:call-template name="m880Select">
366 <xsl:with-param name="basetags">130,240</xsl:with-param>
367 <xsl:with-param name="codes">adfklmor</xsl:with-param>
368 <xsl:with-param name="class">results_summary</xsl:with-param>
369 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
373 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
374 <span class="results_summary"><span class="label">Uniform titles: </span>
375 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
376 <xsl:variable name="str">
377 <xsl:for-each select="marc:subfield">
378 <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'])))">
379 <xsl:value-of select="text()"/>
380 <xsl:text> </xsl:text>
384 <xsl:call-template name="chopPunctuation">
385 <xsl:with-param name="chopString">
386 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
390 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
395 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
396 <span class="results_summary"><span class="label">Subject(s): </span>
397 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
400 <xsl:when test="marc:subfield[@code=9]">
401 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
404 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
407 <xsl:call-template name="chopPunctuation">
408 <xsl:with-param name="chopString">
409 <xsl:call-template name="subfieldSelect">
410 <xsl:with-param name="codes">abcdtvxyz</xsl:with-param>
411 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
412 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
418 <xsl:when test="position()=last()"></xsl:when>
419 <xsl:otherwise> | </xsl:otherwise>
426 <xsl:if test="marc:datafield[@tag=856]">
427 <span class="results_summary"><span class="label">Online Resources: </span>
428 <xsl:for-each select="marc:datafield[@tag=856]">
429 <xsl:if test="$OPACURLOpenInNewWindow='0'">
430 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
432 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
433 <xsl:call-template name="subfieldSelect">
434 <xsl:with-param name="codes">y3z</xsl:with-param>
437 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
439 <xsl:when test="$URLLinkText!=''">
440 <xsl:value-of select="$URLLinkText"/>
443 <xsl:text>Click here to access online</xsl:text>
450 <xsl:if test="$OPACURLOpenInNewWindow='1'">
451 <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
453 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
454 <xsl:call-template name="subfieldSelect">
455 <xsl:with-param name="codes">y3z</xsl:with-param>
458 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
460 <xsl:when test="$URLLinkText!=''">
461 <xsl:value-of select="$URLLinkText"/>
464 <xsl:text>Click here to access online</xsl:text>
472 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
473 <xsl:otherwise> | </xsl:otherwise>
479 <xsl:if test="marc:datafield[@tag=505]">
480 <xsl:for-each select="marc:datafield[@tag=505]">
481 <span class="results_summary">
483 <xsl:when test="@ind1=1">
484 <span class="label">Incomplete contents:</span>
486 <xsl:when test="@ind1=1">
487 <span class="label">Partial contents:</span>
490 <span class="label">Contents:</span>
494 <xsl:when test="@ind2=0">
495 <xsl:for-each select="marc:subfield[@code='t']">
496 <xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/>
500 <xsl:call-template name="subfieldSelect">
501 <xsl:with-param name="codes">au</xsl:with-param>
510 <xsl:if test="marc:datafield[@tag=773]">
511 <xsl:for-each select="marc:datafield[@tag=773]">
512 <xsl:if test="@ind1=0">
513 <span class="results_summary"><span class="label">
515 <xsl:when test="@ind2=' '">
518 <xsl:when test="@ind2=8">
519 <xsl:if test="marc:subfield[@code='i']">
520 <xsl:value-of select="marc:subfield[@code='i']"/>
525 <xsl:variable name="f773">
526 <xsl:call-template name="subfieldSelect">
527 <xsl:with-param name="codes">at</xsl:with-param>
530 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
531 <xsl:value-of select="$f773"/>
535 <xsl:if test="marc:subfield[@code='n']">
536 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
543 <xsl:for-each select="marc:datafield[@tag=520]">
544 <span class="results_summary"><span class="label">
546 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
547 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
548 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
549 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
550 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
551 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
554 <xsl:call-template name="subfieldSelect">
555 <xsl:with-param name="codes">abcu</xsl:with-param>
560 <!-- 866 holdings public note -->
561 <xsl:if test="marc:datafield[@tag=866]">
562 <span class="results_summary"><span class="label">Holdings Note: </span>
563 <xsl:for-each select="marc:datafield[@tag=866]">
564 <xsl:value-of select="marc:subfield[@code='z']"/>
565 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
571 <xsl:if test="marc:datafield[@tag=780]">
572 <xsl:for-each select="marc:datafield[@tag=780]">
573 <xsl:if test="@ind1=0">
574 <span class="results_summary">
576 <xsl:when test="@ind2=0">
577 <span class="label">Continues:</span>
579 <xsl:when test="@ind2=1">
580 <span class="label">Continues in part:</span>
582 <xsl:when test="@ind2=2">
583 <span class="label">Supersedes:</span>
585 <xsl:when test="@ind2=3">
586 <span class="label">Supersedes in part:</span>
588 <xsl:when test="@ind2=4">
589 <span class="label">Formed by the union: ... and: ...</span>
591 <xsl:when test="@ind2=5">
592 <span class="label">Absorbed:</span>
594 <xsl:when test="@ind2=6">
595 <span class="label">Absorbed in part:</span>
597 <xsl:when test="@ind2=7">
598 <span class="label">Separated from:</span>
601 <xsl:variable name="f780">
602 <xsl:call-template name="subfieldSelect">
603 <xsl:with-param name="codes">at</xsl:with-param>
606 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
607 <xsl:value-of select="translate($f780, '()', '')"/>
611 <xsl:if test="marc:subfield[@code='n']">
612 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
620 <xsl:if test="marc:datafield[@tag=785]">
621 <xsl:for-each select="marc:datafield[@tag=785]">
622 <xsl:if test="@ind1=0">
623 <span class="results_summary">
625 <xsl:when test="@ind2=0">
626 <span class="label">Continued by:</span>
628 <xsl:when test="@ind2=1">
629 <span class="label">Continued in part by:</span>
631 <xsl:when test="@ind2=2">
632 <span class="label">Superseded by:</span>
634 <xsl:when test="@ind2=3">
635 <span class="label">Superseded in part by:</span>
637 <xsl:when test="@ind2=4">
638 <span class="label">Absorbed by:</span>
640 <xsl:when test="@ind2=5">
641 <span class="label">Absorbed in part by:</span>
643 <xsl:when test="@ind2=6">
644 <span class="label">Split into .. and ...:</span>
646 <xsl:when test="@ind2=7">
647 <span class="label">Merged with ... to form ...</span>
649 <xsl:when test="@ind2=8">
650 <span class="label">Changed back to:</span>
654 <xsl:variable name="f785">
655 <xsl:call-template name="subfieldSelect">
656 <xsl:with-param name="codes">at</xsl:with-param>
660 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
661 <xsl:value-of select="translate($f785, '()', '')"/>
666 <xsl:if test="marc:subfield[@code='n']">
667 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
676 <xsl:template name="nameABCDQ">
677 <xsl:call-template name="chopPunctuation">
678 <xsl:with-param name="chopString">
679 <xsl:call-template name="subfieldSelect">
680 <xsl:with-param name="codes">aq</xsl:with-param>
683 <xsl:with-param name="punctuation">
684 <xsl:text>:,;/ </xsl:text>
687 <xsl:call-template name="termsOfAddress"/>
690 <xsl:template name="nameABCDN">
691 <xsl:for-each select="marc:subfield[@code='a']">
692 <xsl:call-template name="chopPunctuation">
693 <xsl:with-param name="chopString" select="."/>
696 <xsl:for-each select="marc:subfield[@code='b']">
697 <xsl:value-of select="."/>
699 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
700 <xsl:call-template name="subfieldSelect">
701 <xsl:with-param name="codes">cdn</xsl:with-param>
706 <xsl:template name="nameACDEQ">
707 <xsl:call-template name="subfieldSelect">
708 <xsl:with-param name="codes">acdeq</xsl:with-param>
711 <xsl:template name="termsOfAddress">
712 <xsl:if test="marc:subfield[@code='b' or @code='c']">
713 <xsl:call-template name="chopPunctuation">
714 <xsl:with-param name="chopString">
715 <xsl:call-template name="subfieldSelect">
716 <xsl:with-param name="codes">bc</xsl:with-param>
723 <xsl:template name="part">
724 <xsl:variable name="partNumber">
725 <xsl:call-template name="specialSubfieldSelect">
726 <xsl:with-param name="axis">n</xsl:with-param>
727 <xsl:with-param name="anyCodes">n</xsl:with-param>
728 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
731 <xsl:variable name="partName">
732 <xsl:call-template name="specialSubfieldSelect">
733 <xsl:with-param name="axis">p</xsl:with-param>
734 <xsl:with-param name="anyCodes">p</xsl:with-param>
735 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
738 <xsl:if test="string-length(normalize-space($partNumber))">
739 <xsl:call-template name="chopPunctuation">
740 <xsl:with-param name="chopString" select="$partNumber"/>
743 <xsl:if test="string-length(normalize-space($partName))">
744 <xsl:call-template name="chopPunctuation">
745 <xsl:with-param name="chopString" select="$partName"/>
750 <xsl:template name="specialSubfieldSelect">
751 <xsl:param name="anyCodes"/>
752 <xsl:param name="axis"/>
753 <xsl:param name="beforeCodes"/>
754 <xsl:param name="afterCodes"/>
755 <xsl:variable name="str">
756 <xsl:for-each select="marc:subfield">
757 <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])">
758 <xsl:value-of select="text()"/>
759 <xsl:text> </xsl:text>
763 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>