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 = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
12 <xsl:template match="/">
13 <xsl:apply-templates/>
16 <xsl:template match="marc:record">
18 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
19 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
21 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
22 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
23 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
24 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
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="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
29 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
30 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
31 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
32 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
33 <xsl:variable name="TracingQuotesLeft">
35 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
36 <xsl:otherwise>"</xsl:otherwise>
39 <xsl:variable name="TracingQuotesRight">
41 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
42 <xsl:otherwise>"</xsl:otherwise>
45 <xsl:variable name="leader" select="marc:leader"/>
46 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
47 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
48 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
49 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
50 <xsl:variable name="materialTypeCode">
52 <xsl:when test="$leader19='a'">ST</xsl:when>
53 <xsl:when test="$leader6='a'">
55 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
56 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
57 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
60 <xsl:when test="$leader6='t'">BK</xsl:when>
61 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
62 <xsl:when test="$leader6='m'">CF</xsl:when>
63 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
64 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
65 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
66 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
69 <xsl:variable name="materialTypeLabel">
71 <xsl:when test="$leader19='a'">Set</xsl:when>
72 <xsl:when test="$leader6='a'">
74 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
75 <xsl:when test="$leader7='i' or $leader7='s'">
77 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
78 <xsl:otherwise>Series</xsl:otherwise>
81 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
84 <xsl:when test="$leader6='t'">Book</xsl:when>
85 <xsl:when test="$leader6='o'">Kit</xsl:when>
86 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
87 <xsl:when test="$leader6='m'">Computer file</xsl:when>
88 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
89 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
90 <xsl:when test="$leader6='j'">Music</xsl:when>
91 <xsl:when test="$leader6='i'">Sound</xsl:when>
92 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
96 <!-- Schema.org type -->
97 <xsl:variable name="schemaOrgType">
99 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
100 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
101 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
102 <xsl:otherwise>CreativeWork</xsl:otherwise>
106 <!-- Wrapper div for our schema.org object -->
107 <xsl:element name="div">
108 <xsl:attribute name="class">record</xsl:attribute>
109 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
110 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
111 <xsl:attribute name="resource">#record</xsl:attribute>
113 <!-- Title Statement -->
114 <!-- Alternate Graphic Representation (MARC 880) -->
115 <xsl:if test="$display880">
116 <h1 class="title" property="alternateName">
117 <xsl:call-template name="m880Select">
118 <xsl:with-param name="basetags">245</xsl:with-param>
119 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
124 <xsl:if test="marc:datafield[@tag=245]">
125 <h1 class="title" property="name">
126 <xsl:for-each select="marc:datafield[@tag=245]">
127 <xsl:call-template name="subfieldSelect">
128 <xsl:with-param name="codes">a</xsl:with-param>
130 <xsl:if test="marc:subfield[@code='h']">
131 <xsl:text> </xsl:text>
132 <xsl:call-template name="subfieldSelect">
133 <xsl:with-param name="codes">h</xsl:with-param>
136 <xsl:if test="marc:subfield[@code='b']">
137 <xsl:text> </xsl:text>
138 <xsl:call-template name="subfieldSelect">
139 <xsl:with-param name="codes">b</xsl:with-param>
142 <xsl:text> </xsl:text>
143 <xsl:call-template name="subfieldSelect">
144 <xsl:with-param name="codes">fgknps</xsl:with-param>
150 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
151 <xsl:if test="$display880">
153 <xsl:call-template name="m880Select">
154 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
155 <xsl:with-param name="codes">abc</xsl:with-param>
156 <xsl:with-param name="index">au</xsl:with-param>
157 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
162 <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]">
163 <h5 class="author">by
164 <xsl:call-template name="showAuthor">
165 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111 or @tag=700 or @tag=710 or @tag=711]"/>
166 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
167 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
168 <xsl:with-param name="theme" select="$theme"/>
174 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
175 <xsl:if test="$materialTypeCode!=''">
176 <span class="results_summary type"><span class="label">Material type: </span>
177 <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element>
178 <xsl:value-of select="$materialTypeLabel"/>
183 <!--Series: Alternate Graphic Representation (MARC 880) -->
184 <xsl:if test="$display880">
185 <xsl:call-template name="m880Select">
186 <xsl:with-param name="basetags">440,490</xsl:with-param>
187 <xsl:with-param name="codes">av</xsl:with-param>
188 <xsl:with-param name="class">results_summary series</xsl:with-param>
189 <xsl:with-param name="label">Series: </xsl:with-param>
190 <xsl:with-param name="index">se</xsl:with-param>
195 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
196 <span class="results_summary series"><span class="label">Series: </span>
198 <xsl:for-each select="marc:datafield[@tag=440]">
199 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
200 <xsl:call-template name="chopPunctuation">
201 <xsl:with-param name="chopString">
202 <xsl:call-template name="subfieldSelect">
203 <xsl:with-param name="codes">av</xsl:with-param>
208 <xsl:call-template name="part"/>
209 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
212 <!-- 490 Series not traced, Ind1 = 0 -->
213 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
214 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
215 <xsl:call-template name="chopPunctuation">
216 <xsl:with-param name="chopString">
217 <xsl:call-template name="subfieldSelect">
218 <xsl:with-param name="codes">av</xsl:with-param>
223 <xsl:call-template name="part"/>
224 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
226 <!-- 490 Series traced, Ind1 = 1 -->
227 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
228 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
230 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
231 <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
232 <xsl:call-template name="chopPunctuation">
233 <xsl:with-param name="chopString">
234 <xsl:call-template name="subfieldSelect">
235 <xsl:with-param name="codes">a_t</xsl:with-param>
242 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
243 <xsl:call-template name="chopPunctuation">
244 <xsl:with-param name="chopString">
245 <xsl:call-template name="subfieldSelect">
246 <xsl:with-param name="codes">a_t</xsl:with-param>
251 <xsl:call-template name="part"/>
254 <xsl:text>: </xsl:text>
255 <xsl:value-of select="marc:subfield[@code='v']" />
256 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
263 <xsl:if test="$leader7='s'">
264 <span class="results_summary analytics"><span class="label">Analytics: </span>
267 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
268 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
271 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
274 <xsl:text>Show analytics</xsl:text>
279 <!-- Volumes of sets and traced series -->
280 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
281 <span class="results_summary volumes"><span class="label">Volumes: </span>
284 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
285 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
288 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
291 <xsl:text>Show volumes</xsl:text>
297 <xsl:if test="$leader19='c'">
298 <span class="results_summary set"><span class="label">Set: </span>
299 <xsl:for-each select="marc:datafield[@tag=773]">
302 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
303 <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>
306 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
309 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
312 <xsl:when test="position()=last()"></xsl:when>
313 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
319 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
320 <xsl:if test="$display880">
321 <xsl:call-template name="m880Select">
322 <xsl:with-param name="basetags">260</xsl:with-param>
323 <xsl:with-param name="codes">abcg</xsl:with-param>
324 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
325 <xsl:with-param name="label">Publisher: </xsl:with-param>
329 <!-- Publisher info and RDA related info from tags 260, 264 -->
331 <xsl:when test="marc:datafield[@tag=260]">
332 <span class="results_summary publisher"><span class="label">Publisher: </span>
333 <xsl:for-each select="marc:datafield[@tag=260]">
334 <span property="publisher" typeof="Organization">
335 <xsl:if test="marc:subfield[@code='a']">
336 <span property="location">
337 <xsl:call-template name="subfieldSelect">
338 <xsl:with-param name="codes">a</xsl:with-param>
342 <xsl:text> </xsl:text>
343 <xsl:if test="marc:subfield[@code='b']">
344 <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
345 <xsl:call-template name="subfieldSelect">
346 <xsl:with-param name="codes">b</xsl:with-param>
351 <xsl:text> </xsl:text>
352 <xsl:if test="marc:subfield[@code='c' or @code='g']">
353 <span property="datePublished">
354 <xsl:call-template name="chopPunctuation">
355 <xsl:with-param name="chopString">
356 <xsl:call-template name="subfieldSelect">
357 <xsl:with-param name="codes">cg</xsl:with-param>
363 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
365 <xsl:if test="marc:datafield[@tag=264]">
366 <xsl:text>; </xsl:text>
367 <xsl:call-template name="showRDAtag264"/>
371 <xsl:when test="marc:datafield[@tag=264]">
372 <span class="results_summary">
373 <xsl:call-template name="showRDAtag264"/>
378 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
379 <xsl:if test="$display880">
380 <xsl:call-template name="m880Select">
381 <xsl:with-param name="basetags">250</xsl:with-param>
382 <xsl:with-param name="codes">ab</xsl:with-param>
383 <xsl:with-param name="class">results_summary edition</xsl:with-param>
384 <xsl:with-param name="label">Edition: </xsl:with-param>
388 <xsl:if test="marc:datafield[@tag=250]">
389 <span class="results_summary edition"><span class="label">Edition: </span>
390 <xsl:for-each select="marc:datafield[@tag=250]">
391 <span property="bookEdition">
392 <xsl:call-template name="chopPunctuation">
393 <xsl:with-param name="chopString">
394 <xsl:call-template name="subfieldSelect">
395 <xsl:with-param name="codes">ab</xsl:with-param>
400 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
405 <!-- Description: Alternate Graphic Representation (MARC 880) -->
406 <xsl:if test="$display880">
407 <xsl:call-template name="m880Select">
408 <xsl:with-param name="basetags">300</xsl:with-param>
409 <xsl:with-param name="codes">abceg</xsl:with-param>
410 <xsl:with-param name="class">results_summary description</xsl:with-param>
411 <xsl:with-param name="label">Description: </xsl:with-param>
415 <xsl:if test="marc:datafield[@tag=300]">
416 <span class="results_summary description"><span class="label">Description: </span>
417 <xsl:for-each select="marc:datafield[@tag=300]">
418 <span property="description">
419 <xsl:call-template name="chopPunctuation">
420 <xsl:with-param name="chopString">
421 <xsl:call-template name="subfieldSelect">
422 <xsl:with-param name="codes">abceg</xsl:with-param>
427 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
432 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
433 <span class="results_summary isbn"><span class="label">ISBN: </span>
434 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
435 <span property="isbn">
436 <xsl:value-of select="."/>
438 <xsl:when test="position()=last()">
439 <xsl:text>.</xsl:text>
442 <xsl:text>; </xsl:text>
451 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
452 <span class="results_summary issn"><span class="label">ISSN: </span>
453 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
454 <span property="issn">
455 <xsl:value-of select="."/>
457 <xsl:when test="position()=last()">
458 <xsl:text>.</xsl:text>
461 <xsl:text>; </xsl:text>
469 <xsl:if test="marc:datafield[@tag=013]">
470 <span class="results_summary patent_info">
471 <span class="label">Patent information: </span>
472 <xsl:for-each select="marc:datafield[@tag=013]">
473 <xsl:call-template name="subfieldSelect">
474 <xsl:with-param name="codes">acdef</xsl:with-param>
475 <xsl:with-param name="delimeter">, </xsl:with-param>
477 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
482 <xsl:if test="marc:datafield[@tag=088]">
483 <span class="results_summary report_number">
484 <span class="label">Report number: </span>
485 <xsl:for-each select="marc:datafield[@tag=088]">
486 <xsl:call-template name="subfieldSelect">
487 <xsl:with-param name="codes">a</xsl:with-param>
489 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
494 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
495 <xsl:if test="$display880">
496 <xsl:call-template name="m880Select">
497 <xsl:with-param name="basetags">246</xsl:with-param>
498 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
499 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
500 <xsl:with-param name="label">Other title: </xsl:with-param>
504 <xsl:if test="marc:datafield[@tag=246]">
505 <span class="results_summary other_title"><span class="label">Other title: </span>
506 <xsl:for-each select="marc:datafield[@tag=246]">
507 <span property="alternateName">
508 <xsl:call-template name="chopPunctuation">
509 <xsl:with-param name="chopString">
510 <xsl:call-template name="subfieldSelect">
511 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
516 <!-- #13386 added separator | -->
517 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose>
523 <xsl:if test="marc:datafield[@tag=242]">
524 <span class="results_summary translated_title"><span class="label">Title translated: </span>
525 <xsl:for-each select="marc:datafield[@tag=242]">
526 <span property="alternateName">
527 <xsl:call-template name="chopPunctuation">
528 <xsl:with-param name="chopString">
529 <xsl:call-template name="subfieldSelect">
530 <xsl:with-param name="codes">abchnp</xsl:with-param>
535 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
540 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
541 <xsl:if test="$display880">
542 <span property="alternateName">
543 <xsl:call-template name="m880Select">
544 <xsl:with-param name="basetags">130,240</xsl:with-param>
545 <xsl:with-param name="codes">adfklmor</xsl:with-param>
546 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
547 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
552 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
553 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
554 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
555 <span property="alternateName">
556 <xsl:variable name="str">
557 <xsl:for-each select="marc:subfield">
558 <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'])))">
559 <xsl:value-of select="text()"/>
560 <xsl:text> </xsl:text>
564 <xsl:call-template name="chopPunctuation">
565 <xsl:with-param name="chopString">
566 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
571 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
576 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
577 <span class="results_summary subjects"><span class="label">Subject(s): </span>
578 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
579 <span property="keywords">
582 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
583 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
585 <xsl:when test="$TraceSubjectSubdivisions='1'">
586 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
587 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
588 <xsl:with-param name="delimeter"> AND </xsl:with-param>
589 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
590 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
595 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
598 <xsl:call-template name="chopPunctuation">
599 <xsl:with-param name="chopString">
600 <xsl:call-template name="subfieldSelect">
601 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
602 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
603 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
609 <xsl:if test="marc:subfield[@code=9]">
611 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
612 <xsl:element name="img">
613 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
614 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
615 <xsl:attribute name="height">15</xsl:attribute>
616 <xsl:attribute name="width">15</xsl:attribute>
621 <xsl:when test="position()=last()"></xsl:when>
622 <xsl:otherwise> | </xsl:otherwise>
630 <xsl:if test="marc:datafield[@tag=655]">
631 <span class="results_summary genre"><span class="label">Genre/Form: </span>
632 <xsl:for-each select="marc:datafield[@tag=655]">
635 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
636 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
638 <xsl:when test="$TraceSubjectSubdivisions='1'">
639 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
640 <xsl:with-param name="codes">avxyz</xsl:with-param>
641 <xsl:with-param name="delimeter"> AND </xsl:with-param>
642 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
643 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
648 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
652 <xsl:call-template name="subfieldSelect">
653 <xsl:with-param name="codes">avxyz</xsl:with-param>
654 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
655 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
657 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
662 <!-- DDC classification -->
663 <xsl:if test="marc:datafield[@tag=082]">
664 <span class="results_summary ddc">
665 <span class="label">DDC classification: </span>
666 <xsl:for-each select="marc:datafield[@tag=082]">
667 <xsl:call-template name="subfieldSelect">
668 <xsl:with-param name="codes">a</xsl:with-param>
671 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
672 <xsl:otherwise> | </xsl:otherwise>
679 <!-- Image processing code added here, takes precedence over text links including y3z text -->
680 <xsl:if test="marc:datafield[@tag=856]">
681 <span class="results_summary online_resources"><span class="label">Online resources: </span>
682 <xsl:for-each select="marc:datafield[@tag=856]">
683 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
686 <xsl:when test="$OPACTrackClicks='track'">
687 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
689 <xsl:when test="$OPACTrackClicks='anonymous'">
690 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
693 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
696 <xsl:if test="$OPACURLOpenInNewWindow='1'">
697 <xsl:attribute name="target">_blank</xsl:attribute>
700 <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
701 <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="style">height:100px</xsl:attribute></xsl:element><xsl:text></xsl:text>
703 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
704 <xsl:call-template name="subfieldSelect">
705 <xsl:with-param name="codes">y3z</xsl:with-param>
708 <xsl:when test="$URLLinkText!=''">
709 <xsl:value-of select="$URLLinkText"/>
712 <xsl:text>Click here to access online</xsl:text>
717 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
718 <xsl:otherwise> | </xsl:otherwise>
725 <xsl:if test="marc:datafield[@tag=530]">
726 <xsl:for-each select="marc:datafield[@tag=530]">
727 <span class="results_summary additionalforms">
728 <xsl:call-template name="subfieldSelect">
729 <xsl:with-param name="codes">abcd</xsl:with-param>
731 <xsl:for-each select="marc:subfield[@code='u']">
732 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
733 <xsl:if test="$OPACURLOpenInNewWindow='1'">
734 <xsl:attribute name="target">_blank</xsl:attribute>
736 <xsl:value-of select="text()"/>
744 <xsl:if test="marc:datafield[@tag=505]">
745 <div class="results_summary contents">
746 <xsl:for-each select="marc:datafield[@tag=505]">
747 <xsl:if test="position()=1">
749 <xsl:when test="@ind1=1">
750 <span class="label">Incomplete contents:</span>
752 <xsl:when test="@ind1=2">
753 <span class="label">Partial contents:</span>
756 <span class="label">Contents:</span>
760 <div class='contentblock' property='description'>
762 <xsl:when test="@ind2=0">
763 <xsl:call-template name="subfieldSelectSpan">
764 <xsl:with-param name="codes">tru</xsl:with-param>
768 <xsl:call-template name="subfieldSelectSpan">
769 <xsl:with-param name="codes">atru</xsl:with-param>
779 <xsl:if test="marc:datafield[@tag=583]">
780 <xsl:for-each select="marc:datafield[@tag=583]">
781 <xsl:if test="@ind1=1 or @ind1=' '">
782 <span class="results_summary actionnote">
784 <xsl:when test="marc:subfield[@code='z']">
785 <xsl:value-of select="marc:subfield[@code='z']"/>
788 <xsl:call-template name="subfieldSelect">
789 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
798 <!-- Bug 13385 Added 508 field -->
799 <xsl:if test="marc:datafield[@tag=508]">
800 <div class="results_summary prod_credits">
801 <span class="label">Production Credits: </span>
802 <xsl:for-each select="marc:datafield[@tag=508]">
803 <xsl:call-template name="subfieldSelectSpan">
804 <xsl:with-param name="codes">a</xsl:with-param>
811 <xsl:if test="marc:datafield[@tag=586]">
812 <span class="results_summary awardsnote">
813 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
814 <span class="label">Awards: </span>
816 <xsl:for-each select="marc:datafield[@tag=586]">
817 <xsl:value-of select="marc:subfield[@code='a']"/>
818 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
824 <xsl:if test="marc:datafield[@tag=773]">
825 <xsl:for-each select="marc:datafield[@tag=773]">
826 <xsl:if test="@ind1=0">
827 <span class="results_summary in"><span class="label">
829 <xsl:when test="@ind2=' '">
832 <xsl:when test="@ind2=8">
833 <xsl:if test="marc:subfield[@code='i']">
834 <xsl:value-of select="marc:subfield[@code='i']"/>
839 <xsl:variable name="f773">
840 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
841 <xsl:with-param name="codes">a_t</xsl:with-param>
842 </xsl:call-template></xsl:with-param></xsl:call-template>
845 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
846 <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>
847 <xsl:value-of select="translate($f773, '()', '')"/>
849 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
851 <xsl:when test="marc:subfield[@code='0']">
852 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
853 <xsl:value-of select="$f773"/>
857 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
858 <xsl:value-of select="$f773"/>
860 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
865 <xsl:if test="marc:subfield[@code='n']">
866 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
873 <xsl:for-each select="marc:datafield[@tag=511]">
874 <span class="results_summary perf_note">
876 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
878 <xsl:call-template name="subfieldSelect">
879 <xsl:with-param name="codes">a</xsl:with-param>
884 <xsl:if test="marc:datafield[@tag=502]">
885 <span class="results_summary diss_note">
886 <span class="label">Dissertation note: </span>
887 <xsl:for-each select="marc:datafield[@tag=502]">
888 <xsl:call-template name="subfieldSelect">
889 <xsl:with-param name="codes">abcdgo</xsl:with-param>
892 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
896 <xsl:for-each select="marc:datafield[@tag=520]">
897 <span class="results_summary summary"><span class="label">
899 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
900 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
901 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
902 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
903 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
904 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
907 <xsl:call-template name="subfieldSelect">
908 <xsl:with-param name="codes">abcu</xsl:with-param>
913 <!-- 866 textual holdings -->
914 <xsl:if test="marc:datafield[@tag=866]">
915 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
916 <xsl:for-each select="marc:datafield[@tag=866]">
917 <xsl:call-template name="subfieldSelect">
918 <xsl:with-param name="codes">az</xsl:with-param>
920 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
925 <!-- 775 Other Edition -->
926 <xsl:if test="marc:datafield[@tag=775]">
927 <span class="results_summary other_editions"><span class="label">Other editions: </span>
928 <xsl:for-each select="marc:datafield[@tag=775]">
929 <xsl:variable name="f775">
930 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
931 <xsl:with-param name="codes">a_t</xsl:with-param>
932 </xsl:call-template></xsl:with-param></xsl:call-template>
934 <xsl:if test="marc:subfield[@code='i']">
935 <xsl:call-template name="subfieldSelect">
936 <xsl:with-param name="codes">i</xsl:with-param>
938 <xsl:text>: </xsl:text>
942 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
943 <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>
946 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
949 <xsl:call-template name="subfieldSelect">
950 <xsl:with-param name="codes">a_t</xsl:with-param>
954 <xsl:when test="position()=last()"></xsl:when>
955 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
962 <xsl:if test="marc:datafield[@tag=780]">
963 <xsl:for-each select="marc:datafield[@tag=780]">
964 <xsl:if test="@ind1=0">
965 <span class="results_summary preceeding_entry">
967 <xsl:when test="@ind2=0">
968 <span class="label">Continues:</span>
970 <xsl:when test="@ind2=1">
971 <span class="label">Continues in part:</span>
973 <xsl:when test="@ind2=2">
974 <span class="label">Supersedes:</span>
976 <xsl:when test="@ind2=3">
977 <span class="label">Supersedes in part:</span>
979 <xsl:when test="@ind2=4">
980 <span class="label">Formed by the union: ... and: ...</span>
982 <xsl:when test="@ind2=5">
983 <span class="label">Absorbed:</span>
985 <xsl:when test="@ind2=6">
986 <span class="label">Absorbed in part:</span>
988 <xsl:when test="@ind2=7">
989 <span class="label">Separated from:</span>
992 <xsl:text> </xsl:text>
993 <xsl:variable name="f780">
994 <xsl:call-template name="subfieldSelect">
995 <xsl:with-param name="codes">a_t</xsl:with-param>
999 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1000 <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>
1001 <xsl:value-of select="translate($f780, '()', '')"/>
1005 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1006 <xsl:value-of select="translate($f780, '()', '')"/>
1012 <xsl:if test="marc:subfield[@code='n']">
1013 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1021 <xsl:if test="marc:datafield[@tag=785]">
1022 <xsl:for-each select="marc:datafield[@tag=785]">
1023 <xsl:if test="@ind1=0">
1024 <span class="results_summary succeeding_entry">
1026 <xsl:when test="@ind2=0">
1027 <span class="label">Continued by:</span>
1029 <xsl:when test="@ind2=1">
1030 <span class="label">Continued in part by:</span>
1032 <xsl:when test="@ind2=2">
1033 <span class="label">Superseded by:</span>
1035 <xsl:when test="@ind2=3">
1036 <span class="label">Superseded in part by:</span>
1038 <xsl:when test="@ind2=4">
1039 <span class="label">Absorbed by:</span>
1041 <xsl:when test="@ind2=5">
1042 <span class="label">Absorbed in part by:</span>
1044 <xsl:when test="@ind2=6">
1045 <span class="label">Split into .. and ...:</span>
1047 <xsl:when test="@ind2=7">
1048 <span class="label">Merged with ... to form ...</span>
1050 <xsl:when test="@ind2=8">
1051 <span class="label">Changed back to:</span>
1054 <xsl:text> </xsl:text>
1055 <xsl:variable name="f785">
1056 <xsl:call-template name="subfieldSelect">
1057 <xsl:with-param name="codes">a_t</xsl:with-param>
1058 </xsl:call-template>
1062 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1063 <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>
1064 <xsl:value-of select="translate($f785, '()', '')"/>
1068 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1069 <xsl:value-of select="translate($f785, '()', '')"/>
1076 <xsl:if test="marc:subfield[@code='n']">
1077 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1087 <xsl:template name="showAuthor">
1088 <xsl:param name="authorfield" />
1089 <xsl:param name="UseAuthoritiesForTracings" />
1090 <xsl:param name="materialTypeLabel" />
1091 <xsl:param name="theme" />
1092 <xsl:for-each select="$authorfield">
1093 <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose>
1095 <xsl:when test="not(@tag=111 or @tag=711)" />
1096 <xsl:when test="marc:subfield[@code='n']">
1097 <xsl:text> </xsl:text>
1098 <xsl:call-template name="subfieldSelect">
1099 <xsl:with-param name="codes">n</xsl:with-param>
1100 </xsl:call-template>
1101 <xsl:text> </xsl:text>
1106 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1107 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="marc:subfield[@code=9]"/>"</xsl:attribute>
1110 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1113 <span resource="#record"><span>
1115 <xsl:when test="substring(@tag, 1, 1)='1'">
1117 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1118 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1121 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1124 <xsl:when test="substring(@tag, 2, 1)='0'">
1126 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1127 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1130 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1132 <span property="name">
1134 <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when>
1135 <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
1136 <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
1138 </span></span></span>
1139 <!-- add relator code too between brackets-->
1140 <xsl:if test="marc:subfield[@code='4' or @code='e']">
1141 <span class="relatorcode">
1142 <xsl:text> [</xsl:text>
1144 <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
1145 <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
1147 <xsl:text>]</xsl:text>
1151 <xsl:if test="marc:subfield[@code=9]">
1152 <a class='authlink'>
1153 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1154 <xsl:element name="img">
1155 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
1156 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
1157 <xsl:attribute name="height">15</xsl:attribute>
1158 <xsl:attribute name="width">15</xsl:attribute>
1163 <xsl:text>.</xsl:text>
1166 <xsl:template name="nameABCQ">
1167 <xsl:call-template name="chopPunctuation">
1168 <xsl:with-param name="chopString">
1169 <xsl:call-template name="subfieldSelect">
1170 <xsl:with-param name="codes">abcq</xsl:with-param>
1171 </xsl:call-template>
1173 <xsl:with-param name="punctuation">
1174 <xsl:text>:,;/ </xsl:text>
1176 </xsl:call-template>
1179 <xsl:template name="nameABCDN">
1180 <xsl:call-template name="chopPunctuation">
1181 <xsl:with-param name="chopString">
1182 <xsl:call-template name="subfieldSelect">
1183 <xsl:with-param name="codes">abcdn</xsl:with-param>
1184 </xsl:call-template>
1186 <xsl:with-param name="punctuation">
1187 <xsl:text>:,;/ </xsl:text>
1189 </xsl:call-template>
1192 <xsl:template name="nameACDEQ">
1193 <xsl:call-template name="subfieldSelect">
1194 <xsl:with-param name="codes">acdeq</xsl:with-param>
1195 </xsl:call-template>
1198 <xsl:template name="part">
1199 <xsl:variable name="partNumber">
1200 <xsl:call-template name="specialSubfieldSelect">
1201 <xsl:with-param name="axis">n</xsl:with-param>
1202 <xsl:with-param name="anyCodes">n</xsl:with-param>
1203 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1204 </xsl:call-template>
1206 <xsl:variable name="partName">
1207 <xsl:call-template name="specialSubfieldSelect">
1208 <xsl:with-param name="axis">p</xsl:with-param>
1209 <xsl:with-param name="anyCodes">p</xsl:with-param>
1210 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1211 </xsl:call-template>
1213 <xsl:if test="string-length(normalize-space($partNumber))">
1214 <xsl:call-template name="chopPunctuation">
1215 <xsl:with-param name="chopString" select="$partNumber"/>
1216 </xsl:call-template>
1218 <xsl:if test="string-length(normalize-space($partName))">
1219 <xsl:call-template name="chopPunctuation">
1220 <xsl:with-param name="chopString" select="$partName"/>
1221 </xsl:call-template>
1225 <xsl:template name="specialSubfieldSelect">
1226 <xsl:param name="anyCodes"/>
1227 <xsl:param name="axis"/>
1228 <xsl:param name="beforeCodes"/>
1229 <xsl:param name="afterCodes"/>
1230 <xsl:variable name="str">
1231 <xsl:for-each select="marc:subfield">
1232 <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])">
1233 <xsl:value-of select="text()"/>
1234 <xsl:text> </xsl:text>
1238 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>