1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3 <xsl:stylesheet version="1.0"
4 xmlns:marc="http://www.loc.gov/MARC21/slim"
5 xmlns:items="http://www.koha-community.org/items"
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 exclude-result-prefixes="marc items">
8 <xsl:import href="MARC21slimUtils.xsl"/>
9 <xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" />
10 <xsl:template match="/">
11 <xsl:apply-templates/>
14 <xsl:template match="marc:record">
16 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
17 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
19 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
20 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
22 <xsl:variable name="leader" select="marc:leader"/>
23 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
24 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
25 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
26 <xsl:variable name="materialTypeCode">
28 <xsl:when test="$leader6='a'">
30 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
31 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">SE</xsl:when>
34 <xsl:when test="$leader6='t'">BK</xsl:when>
35 <xsl:when test="$leader6='p'">MX</xsl:when>
36 <xsl:when test="$leader6='m'">CF</xsl:when>
37 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
38 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
39 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
40 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
43 <xsl:variable name="materialTypeLabel">
45 <xsl:when test="$leader6='a'">
47 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
48 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">Continuing Resource</xsl:when>
51 <xsl:when test="$leader6='t'">Book</xsl:when>
52 <xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
53 <xsl:when test="$leader6='m'">Computer File</xsl:when>
54 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
55 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">Visual Material</xsl:when>
56 <xsl:when test="$leader6='j'">Music</xsl:when>
57 <xsl:when test="$leader6='i'">Sound</xsl:when>
58 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
62 <!-- Title Statement -->
63 <!-- Alternate Graphic Representation (MARC 880) -->
64 <xsl:if test="$display880">
66 <xsl:call-template name="m880Select">
67 <xsl:with-param name="basetags">245</xsl:with-param>
68 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
73 <xsl:if test="marc:datafield[@tag=245]">
75 <xsl:for-each select="marc:datafield[@tag=245]">
76 <xsl:call-template name="subfieldSelect">
77 <xsl:with-param name="codes">a</xsl:with-param>
79 <xsl:if test="marc:subfield[@code='b']">
80 <xsl:text> </xsl:text>
81 <xsl:call-template name="subfieldSelect">
82 <xsl:with-param name="codes">b</xsl:with-param>
85 <xsl:if test="marc:subfield[@code='h']">
86 <xsl:text> </xsl:text>
87 <xsl:call-template name="subfieldSelect">
88 <xsl:with-param name="codes">h</xsl:with-param>
91 <xsl:text> </xsl:text>
92 <xsl:call-template name="subfieldSelect">
93 <xsl:with-param name="codes">fgknps</xsl:with-param>
99 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
100 <xsl:if test="$display880">
102 <xsl:call-template name="m880Select">
103 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
104 <xsl:with-param name="codes">abc</xsl:with-param>
105 <xsl:with-param name="index">au</xsl:with-param>
106 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
112 <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]">
113 <h5 class="author">by
114 <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
117 <xsl:when test="marc:subfield[@code=9]">
118 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
121 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
124 <xsl:call-template name="nameABCDQ"/></a>
126 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
129 <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
132 <xsl:when test="marc:subfield[@code=9]">
133 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
136 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
139 <xsl:call-template name="nameABCDN"/></a>
140 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
143 <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
146 <xsl:when test="marc:subfield[@code=9]">
147 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
150 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
153 <xsl:call-template name="nameACDEQ"/></a>
154 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
161 <xsl:if test="$materialTypeCode!=''">
162 <span class="results_summary"><span class="label">Type: </span>
163 <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>
164 <xsl:text> </xsl:text>
165 <xsl:value-of select="$materialTypeLabel"/>
169 <!--Series: Alternate Graphic Representation (MARC 880) -->
170 <xsl:if test="$display880">
171 <xsl:call-template name="m880Select">
172 <xsl:with-param name="basetags">440,490</xsl:with-param>
173 <xsl:with-param name="codes">av</xsl:with-param>
174 <xsl:with-param name="class">results_summary</xsl:with-param>
175 <xsl:with-param name="label">Series: </xsl:with-param>
176 <xsl:with-param name="index">se</xsl:with-param>
180 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
181 <span class="results_summary"><span class="label">Series: </span>
182 <xsl:for-each select="marc:datafield[@tag=440]">
183 <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
184 <xsl:call-template name="chopPunctuation">
185 <xsl:with-param name="chopString">
186 <xsl:call-template name="subfieldSelect">
187 <xsl:with-param name="codes">av</xsl:with-param>
192 <xsl:text> </xsl:text><xsl:call-template name="part"/>
193 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
196 <xsl:for-each select="marc:datafield[@tag=490]">
197 <a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}">
198 <xsl:call-template name="chopPunctuation">
199 <xsl:with-param name="chopString">
200 <xsl:call-template name="subfieldSelect">
201 <xsl:with-param name="codes">av</xsl:with-param>
206 <xsl:call-template name="part"/>
207 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
212 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
213 <xsl:if test="$display880">
214 <xsl:call-template name="m880Select">
215 <xsl:with-param name="basetags">260</xsl:with-param>
216 <xsl:with-param name="codes">abcg</xsl:with-param>
217 <xsl:with-param name="class">results_summary</xsl:with-param>
218 <xsl:with-param name="label">Publisher: </xsl:with-param>
222 <xsl:if test="marc:datafield[@tag=260]">
223 <span class="results_summary"><span class="label">Publisher: </span>
224 <xsl:for-each select="marc:datafield[@tag=260]">
225 <xsl:call-template name="chopPunctuation">
226 <xsl:with-param name="chopString">
227 <xsl:call-template name="subfieldSelect">
228 <xsl:with-param name="codes">abcg</xsl:with-param>
232 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
237 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
238 <xsl:if test="$display880">
239 <xsl:call-template name="m880Select">
240 <xsl:with-param name="basetags">250</xsl:with-param>
241 <xsl:with-param name="codes">ab</xsl:with-param>
242 <xsl:with-param name="class">results_summary</xsl:with-param>
243 <xsl:with-param name="label">Edition: </xsl:with-param>
247 <xsl:if test="marc:datafield[@tag=250]">
248 <span class="results_summary"><span class="label">Edition: </span>
249 <xsl:for-each select="marc:datafield[@tag=250]">
250 <xsl:call-template name="chopPunctuation">
251 <xsl:with-param name="chopString">
252 <xsl:call-template name="subfieldSelect">
253 <xsl:with-param name="codes">ab</xsl:with-param>
257 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
262 <!-- Description: Alternate Graphic Representation (MARC 880) -->
263 <xsl:if test="$display880">
264 <xsl:call-template name="m880Select">
265 <xsl:with-param name="basetags">300</xsl:with-param>
266 <xsl:with-param name="codes">abceg</xsl:with-param>
267 <xsl:with-param name="class">results_summary</xsl:with-param>
268 <xsl:with-param name="label">Description: </xsl:with-param>
272 <xsl:if test="marc:datafield[@tag=300]">
273 <span class="results_summary"><span class="label">Description: </span>
274 <xsl:for-each select="marc:datafield[@tag=300]">
275 <xsl:call-template name="chopPunctuation">
276 <xsl:with-param name="chopString">
277 <xsl:call-template name="subfieldSelect">
278 <xsl:with-param name="codes">abceg</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 <xsl:if test="marc:datafield[@tag=020]">
288 <span class="results_summary"><span class="label">ISBN: </span>
289 <xsl:for-each select="marc:datafield[@tag=020]">
290 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
291 <xsl:value-of select="marc:subfield[@code='a']"/>
292 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
297 <xsl:if test="marc:datafield[@tag=022]">
298 <span class="results_summary"><span class="label">ISSN: </span>
299 <xsl:for-each select="marc:datafield[@tag=022]">
300 <xsl:value-of select="marc:subfield[@code='a']"/>
301 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
306 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
307 <xsl:if test="$display880">
308 <xsl:call-template name="m880Select">
309 <xsl:with-param name="basetags">246</xsl:with-param>
310 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
311 <xsl:with-param name="class">results_summary</xsl:with-param>
312 <xsl:with-param name="label">Other Title: </xsl:with-param>
316 <xsl:if test="marc:datafield[@tag=246]">
317 <span class="results_summary"><span class="label">Other Title: </span>
318 <xsl:for-each select="marc:datafield[@tag=246]">
319 <xsl:call-template name="chopPunctuation">
320 <xsl:with-param name="chopString">
321 <xsl:call-template name="subfieldSelect">
322 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
326 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
331 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
332 <xsl:if test="$display880">
333 <xsl:call-template name="m880Select">
334 <xsl:with-param name="basetags">130,240</xsl:with-param>
335 <xsl:with-param name="codes">adfklmor</xsl:with-param>
336 <xsl:with-param name="class">results_summary</xsl:with-param>
337 <xsl:with-param name="label">Uniform Title: </xsl:with-param>
341 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
342 <span class="results_summary"><span class="label">Uniform titles: </span>
343 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
344 <xsl:variable name="str">
345 <xsl:for-each select="marc:subfield">
346 <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'])))">
347 <xsl:value-of select="text()"/>
348 <xsl:text> </xsl:text>
352 <xsl:call-template name="chopPunctuation">
353 <xsl:with-param name="chopString">
354 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
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 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
364 <span class="results_summary"><span class="label">Subject(s): </span>
365 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
368 <xsl:when test="marc:subfield[@code=9]">
369 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
372 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
375 <xsl:call-template name="chopPunctuation">
376 <xsl:with-param name="chopString">
377 <xsl:call-template name="subfieldSelect">
378 <xsl:with-param name="codes">abcdtvxyz</xsl:with-param>
379 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
380 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
386 <xsl:when test="position()=last()"></xsl:when>
387 <xsl:otherwise> | </xsl:otherwise>
394 <xsl:if test="marc:datafield[@tag=856]">
395 <span class="results_summary"><span class="label">Online Resources: </span>
396 <xsl:for-each select="marc:datafield[@tag=856]">
397 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
399 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
400 <xsl:call-template name="subfieldSelect">
401 <xsl:with-param name="codes">y3z</xsl:with-param>
404 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
406 <xsl:when test="$URLLinkText!=''">
407 <xsl:value-of select="$URLLinkText"/>
410 <xsl:text>Click here to access online</xsl:text>
417 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
418 <xsl:otherwise> | </xsl:otherwise>
424 <xsl:if test="marc:datafield[@tag=505]">
425 <xsl:for-each select="marc:datafield[@tag=505]">
426 <span class="results_summary">
428 <xsl:when test="@ind1=0">
429 <span class="label">Contents:</span>
431 <xsl:when test="@ind1=1">
432 <span class="label">Incomplete contents:</span>
434 <xsl:when test="@ind1=1">
435 <span class="label">Partial contents:</span>
439 <xsl:when test="@ind2=0">
440 <xsl:for-each select="marc:subfield[@code='t']">
441 <xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/>
445 <xsl:call-template name="subfieldSelect">
446 <xsl:with-param name="codes">au</xsl:with-param>
455 <xsl:if test="marc:datafield[@tag=780]">
456 <xsl:for-each select="marc:datafield[@tag=780]">
457 <span class="results_summary">
459 <xsl:when test="@ind2=0">
460 <span class="label">Continues:</span>
462 <xsl:when test="@ind2=1">
463 <span class="label">Continues in part:</span>
465 <xsl:when test="@ind2=2">
466 <span class="label">Supersedes:</span>
468 <xsl:when test="@ind2=3">
469 <span class="label">Supersedes in part:</span>
471 <xsl:when test="@ind2=4">
472 <span class="label">Formed by the union: ... and: ...</span>
474 <xsl:when test="@ind2=5">
475 <span class="label">Absorbed:</span>
477 <xsl:when test="@ind2=6">
478 <span class="label">Absorbed in part:</span>
480 <xsl:when test="@ind2=7">
481 <span class="label">Separated from:</span>
484 <xsl:variable name="f780">
485 <xsl:call-template name="subfieldSelect">
486 <xsl:with-param name="codes">at</xsl:with-param>
489 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
490 <xsl:value-of select="translate($f780, '()', '')"/>
495 <xsl:when test="@ind1=0">
496 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
504 <xsl:if test="marc:datafield[@tag=785]">
505 <xsl:for-each select="marc:datafield[@tag=785]">
506 <span class="results_summary">
508 <xsl:when test="@ind2=0">
509 <span class="label">Continued by:</span>
511 <xsl:when test="@ind2=1">
512 <span class="label">Continued in part by:</span>
514 <xsl:when test="@ind2=2">
515 <span class="label">Superseded by:</span>
517 <xsl:when test="@ind2=3">
518 <span class="label">Superseded in part by:</span>
520 <xsl:when test="@ind2=4">
521 <span class="label">Absorbed by:</span>
523 <xsl:when test="@ind2=5">
524 <span class="label">Absorbed in part by:</span>
526 <xsl:when test="@ind2=6">
527 <span class="label">Split into .. and ...:</span>
529 <xsl:when test="@ind2=7">
530 <span class="label">Merged with ... to form ...</span>
532 <xsl:when test="@ind2=8">
533 <span class="label">Changed back to:</span>
537 <xsl:variable name="f785">
538 <xsl:call-template name="subfieldSelect">
539 <xsl:with-param name="codes">at</xsl:with-param>
543 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
544 <xsl:value-of select="translate($f785, '()', '')"/>
551 <xsl:if test="$OPACBaseURL!=''">
552 <span class="results_summary"><span class="label">OPAC view: </span>
553 <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>.
559 <xsl:template name="nameABCDQ">
560 <xsl:call-template name="chopPunctuation">
561 <xsl:with-param name="chopString">
562 <xsl:call-template name="subfieldSelect">
563 <xsl:with-param name="codes">aq</xsl:with-param>
566 <xsl:with-param name="punctuation">
567 <xsl:text>:,;/ </xsl:text>
570 <xsl:call-template name="termsOfAddress"/>
573 <xsl:template name="nameABCDN">
574 <xsl:for-each select="marc:subfield[@code='a']">
575 <xsl:call-template name="chopPunctuation">
576 <xsl:with-param name="chopString" select="."/>
579 <xsl:for-each select="marc:subfield[@code='b']">
580 <xsl:value-of select="."/>
582 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
583 <xsl:call-template name="subfieldSelect">
584 <xsl:with-param name="codes">cdn</xsl:with-param>
589 <xsl:template name="nameACDEQ">
590 <xsl:call-template name="subfieldSelect">
591 <xsl:with-param name="codes">acdeq</xsl:with-param>
594 <xsl:template name="termsOfAddress">
595 <xsl:if test="marc:subfield[@code='b' or @code='c']">
596 <xsl:call-template name="chopPunctuation">
597 <xsl:with-param name="chopString">
598 <xsl:call-template name="subfieldSelect">
599 <xsl:with-param name="codes">bc</xsl:with-param>
606 <xsl:template name="part">
607 <xsl:variable name="partNumber">
608 <xsl:call-template name="specialSubfieldSelect">
609 <xsl:with-param name="axis">n</xsl:with-param>
610 <xsl:with-param name="anyCodes">n</xsl:with-param>
611 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
614 <xsl:variable name="partName">
615 <xsl:call-template name="specialSubfieldSelect">
616 <xsl:with-param name="axis">p</xsl:with-param>
617 <xsl:with-param name="anyCodes">p</xsl:with-param>
618 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
621 <xsl:if test="string-length(normalize-space($partNumber))">
622 <xsl:call-template name="chopPunctuation">
623 <xsl:with-param name="chopString" select="$partNumber"/>
626 <xsl:if test="string-length(normalize-space($partName))">
627 <xsl:call-template name="chopPunctuation">
628 <xsl:with-param name="chopString" select="$partName"/>
633 <xsl:template name="specialSubfieldSelect">
634 <xsl:param name="anyCodes"/>
635 <xsl:param name="axis"/>
636 <xsl:param name="beforeCodes"/>
637 <xsl:param name="afterCodes"/>
638 <xsl:variable name="str">
639 <xsl:for-each select="marc:subfield">
640 <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])">
641 <xsl:value-of select="text()"/>
642 <xsl:text> </xsl:text>
646 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>