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>
125 <xsl:if test="marc:datafield[@tag=245]">
126 <h1 class="title" property="name">
127 <xsl:for-each select="marc:datafield[@tag=245]">
128 <xsl:call-template name="subfieldSelect">
129 <xsl:with-param name="codes">a</xsl:with-param>
131 <xsl:text> </xsl:text>
132 <!-- 13381 add additional subfields-->
133 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
135 <xsl:when test="@code='h'">
136 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
137 <span class="title_medium"><xsl:apply-templates/> </span>
139 <xsl:when test="@code='c'">
140 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
141 <span class="title_resp_stmt"><xsl:apply-templates/> </span>
144 <xsl:apply-templates/>
145 <xsl:text> </xsl:text>
154 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
155 <xsl:if test="$display880">
157 <xsl:call-template name="m880Select">
158 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
159 <xsl:with-param name="codes">abc</xsl:with-param>
160 <xsl:with-param name="index">au</xsl:with-param>
161 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
166 <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]">
167 <h5 class="author">by
168 <xsl:call-template name="showAuthor">
169 <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]"/>
170 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
171 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
172 <xsl:with-param name="theme" select="$theme"/>
178 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
179 <xsl:if test="$materialTypeCode!=''">
180 <span class="results_summary type"><span class="label">Material type: </span>
181 <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>
182 <xsl:value-of select="$materialTypeLabel"/>
187 <!--Series: Alternate Graphic Representation (MARC 880) -->
188 <xsl:if test="$display880">
189 <xsl:call-template name="m880Select">
190 <xsl:with-param name="basetags">440,490</xsl:with-param>
191 <xsl:with-param name="codes">av</xsl:with-param>
192 <xsl:with-param name="class">results_summary series</xsl:with-param>
193 <xsl:with-param name="label">Series: </xsl:with-param>
194 <xsl:with-param name="index">se</xsl:with-param>
199 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
200 <span class="results_summary series"><span class="label">Series: </span>
202 <xsl:for-each select="marc:datafield[@tag=440]">
203 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
204 <xsl:call-template name="chopPunctuation">
205 <xsl:with-param name="chopString">
206 <xsl:call-template name="subfieldSelect">
207 <xsl:with-param name="codes">av</xsl:with-param>
212 <xsl:call-template name="part"/>
213 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
216 <!-- 490 Series not traced, Ind1 = 0 -->
217 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
218 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
219 <xsl:call-template name="chopPunctuation">
220 <xsl:with-param name="chopString">
221 <xsl:call-template name="subfieldSelect">
222 <xsl:with-param name="codes">av</xsl:with-param>
227 <xsl:call-template name="part"/>
228 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
230 <!-- 490 Series traced, Ind1 = 1 -->
231 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
232 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
234 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
235 <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
236 <xsl:call-template name="chopPunctuation">
237 <xsl:with-param name="chopString">
238 <xsl:call-template name="subfieldSelect">
239 <xsl:with-param name="codes">a_t</xsl:with-param>
246 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
247 <xsl:call-template name="chopPunctuation">
248 <xsl:with-param name="chopString">
249 <xsl:call-template name="subfieldSelect">
250 <xsl:with-param name="codes">a_t</xsl:with-param>
255 <xsl:call-template name="part"/>
258 <xsl:text>: </xsl:text>
259 <xsl:value-of select="marc:subfield[@code='v']" />
260 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
267 <xsl:if test="$leader7='s'">
268 <span class="results_summary analytics"><span class="label">Analytics: </span>
271 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
272 <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>
275 <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>
278 <xsl:text>Show analytics</xsl:text>
283 <!-- Volumes of sets and traced series -->
284 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
285 <span class="results_summary volumes"><span class="label">Volumes: </span>
288 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
289 <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>
292 <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>
295 <xsl:text>Show volumes</xsl:text>
301 <xsl:if test="$leader19='c'">
302 <span class="results_summary set"><span class="label">Set: </span>
303 <xsl:for-each select="marc:datafield[@tag=773]">
306 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
307 <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>
310 <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>
313 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
316 <xsl:when test="position()=last()"></xsl:when>
317 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
323 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
324 <xsl:if test="$display880">
325 <xsl:call-template name="m880Select">
326 <xsl:with-param name="basetags">260</xsl:with-param>
327 <xsl:with-param name="codes">abcg</xsl:with-param>
328 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
329 <xsl:with-param name="label">Publisher: </xsl:with-param>
333 <!-- Publisher info and RDA related info from tags 260, 264 -->
335 <xsl:when test="marc:datafield[@tag=260]">
336 <span class="results_summary publisher"><span class="label">Publisher: </span>
337 <xsl:for-each select="marc:datafield[@tag=260]">
338 <span property="publisher" typeof="Organization">
339 <xsl:if test="marc:subfield[@code='a']">
340 <span property="location">
341 <xsl:call-template name="subfieldSelect">
342 <xsl:with-param name="codes">a</xsl:with-param>
346 <xsl:text> </xsl:text>
347 <xsl:if test="marc:subfield[@code='b']">
348 <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
349 <xsl:call-template name="subfieldSelect">
350 <xsl:with-param name="codes">b</xsl:with-param>
355 <xsl:text> </xsl:text>
356 <xsl:if test="marc:subfield[@code='c' or @code='g']">
357 <span property="datePublished">
358 <xsl:call-template name="chopPunctuation">
359 <xsl:with-param name="chopString">
360 <xsl:call-template name="subfieldSelect">
361 <xsl:with-param name="codes">cg</xsl:with-param>
367 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
369 <xsl:if test="marc:datafield[@tag=264]">
370 <xsl:text>; </xsl:text>
371 <xsl:call-template name="showRDAtag264"/>
375 <xsl:when test="marc:datafield[@tag=264]">
376 <span class="results_summary">
377 <xsl:call-template name="showRDAtag264"/>
382 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
383 <xsl:if test="$display880">
384 <xsl:call-template name="m880Select">
385 <xsl:with-param name="basetags">250</xsl:with-param>
386 <xsl:with-param name="codes">ab</xsl:with-param>
387 <xsl:with-param name="class">results_summary edition</xsl:with-param>
388 <xsl:with-param name="label">Edition: </xsl:with-param>
392 <xsl:if test="marc:datafield[@tag=250]">
393 <span class="results_summary edition"><span class="label">Edition: </span>
394 <xsl:for-each select="marc:datafield[@tag=250]">
395 <span property="bookEdition">
396 <xsl:call-template name="chopPunctuation">
397 <xsl:with-param name="chopString">
398 <xsl:call-template name="subfieldSelect">
399 <xsl:with-param name="codes">ab</xsl:with-param>
404 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
409 <!-- Description: Alternate Graphic Representation (MARC 880) -->
410 <xsl:if test="$display880">
411 <xsl:call-template name="m880Select">
412 <xsl:with-param name="basetags">300</xsl:with-param>
413 <xsl:with-param name="codes">abceg</xsl:with-param>
414 <xsl:with-param name="class">results_summary description</xsl:with-param>
415 <xsl:with-param name="label">Description: </xsl:with-param>
419 <xsl:if test="marc:datafield[@tag=300]">
420 <span class="results_summary description"><span class="label">Description: </span>
421 <xsl:for-each select="marc:datafield[@tag=300]">
422 <span property="description">
423 <xsl:call-template name="chopPunctuation">
424 <xsl:with-param name="chopString">
425 <xsl:call-template name="subfieldSelect">
426 <xsl:with-param name="codes">abceg</xsl:with-param>
431 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
436 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
437 <span class="results_summary isbn"><span class="label">ISBN: </span>
438 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
439 <span property="isbn">
440 <xsl:value-of select="."/>
442 <xsl:when test="position()=last()">
443 <xsl:text>.</xsl:text>
446 <xsl:text>; </xsl:text>
455 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
456 <span class="results_summary issn"><span class="label">ISSN: </span>
457 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
458 <span property="issn">
459 <xsl:value-of select="."/>
461 <xsl:when test="position()=last()">
462 <xsl:text>.</xsl:text>
465 <xsl:text>; </xsl:text>
473 <xsl:if test="marc:datafield[@tag=013]">
474 <span class="results_summary patent_info">
475 <span class="label">Patent information: </span>
476 <xsl:for-each select="marc:datafield[@tag=013]">
477 <xsl:call-template name="subfieldSelect">
478 <xsl:with-param name="codes">acdef</xsl:with-param>
479 <xsl:with-param name="delimeter">, </xsl:with-param>
481 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
486 <xsl:if test="marc:datafield[@tag=088]">
487 <span class="results_summary report_number">
488 <span class="label">Report number: </span>
489 <xsl:for-each select="marc:datafield[@tag=088]">
490 <xsl:call-template name="subfieldSelect">
491 <xsl:with-param name="codes">a</xsl:with-param>
493 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
498 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
499 <xsl:if test="$display880">
500 <xsl:call-template name="m880Select">
501 <xsl:with-param name="basetags">246</xsl:with-param>
502 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
503 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
504 <xsl:with-param name="label">Other title: </xsl:with-param>
508 <xsl:if test="marc:datafield[@tag=246]">
509 <span class="results_summary other_title"><span class="label">Other title: </span>
510 <xsl:for-each select="marc:datafield[@tag=246]">
511 <span property="alternateName">
512 <xsl:call-template name="chopPunctuation">
513 <xsl:with-param name="chopString">
514 <xsl:call-template name="subfieldSelect">
515 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
520 <!-- #13386 added separator | -->
521 <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>
527 <xsl:if test="marc:datafield[@tag=242]">
528 <span class="results_summary translated_title"><span class="label">Title translated: </span>
529 <xsl:for-each select="marc:datafield[@tag=242]">
530 <span property="alternateName">
531 <xsl:call-template name="chopPunctuation">
532 <xsl:with-param name="chopString">
533 <xsl:call-template name="subfieldSelect">
534 <xsl:with-param name="codes">abchnp</xsl:with-param>
539 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
544 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
545 <xsl:if test="$display880">
546 <span property="alternateName">
547 <xsl:call-template name="m880Select">
548 <xsl:with-param name="basetags">130,240</xsl:with-param>
549 <xsl:with-param name="codes">adfklmor</xsl:with-param>
550 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
551 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
556 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
557 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
558 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
559 <span property="alternateName">
560 <xsl:variable name="str">
561 <xsl:for-each select="marc:subfield">
562 <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'])))">
563 <xsl:value-of select="text()"/>
564 <xsl:text> </xsl:text>
568 <xsl:call-template name="chopPunctuation">
569 <xsl:with-param name="chopString">
570 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
575 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
580 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
581 <span class="results_summary subjects"><span class="label">Subject(s): </span>
582 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
583 <span property="keywords">
586 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
587 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
589 <xsl:when test="$TraceSubjectSubdivisions='1'">
590 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
591 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
592 <xsl:with-param name="delimeter"> AND </xsl:with-param>
593 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
594 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
599 <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>
602 <xsl:call-template name="chopPunctuation">
603 <xsl:with-param name="chopString">
604 <xsl:call-template name="subfieldSelect">
605 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
606 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
607 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
613 <xsl:if test="marc:subfield[@code=9]">
615 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
616 <xsl:element name="img">
617 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
618 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
619 <xsl:attribute name="height">15</xsl:attribute>
620 <xsl:attribute name="width">15</xsl:attribute>
625 <xsl:when test="position()=last()"></xsl:when>
626 <xsl:otherwise> | </xsl:otherwise>
634 <xsl:if test="marc:datafield[@tag=655]">
635 <span class="results_summary genre"><span class="label">Genre/Form: </span>
636 <xsl:for-each select="marc:datafield[@tag=655]">
639 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
640 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
642 <xsl:when test="$TraceSubjectSubdivisions='1'">
643 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
644 <xsl:with-param name="codes">avxyz</xsl:with-param>
645 <xsl:with-param name="delimeter"> AND </xsl:with-param>
646 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
647 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
652 <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>
656 <xsl:call-template name="subfieldSelect">
657 <xsl:with-param name="codes">avxyz</xsl:with-param>
658 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
659 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
661 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
666 <!-- DDC classification -->
667 <xsl:if test="marc:datafield[@tag=082]">
668 <span class="results_summary ddc">
669 <span class="label">DDC classification: </span>
670 <xsl:for-each select="marc:datafield[@tag=082]">
671 <xsl:call-template name="subfieldSelect">
672 <xsl:with-param name="codes">a</xsl:with-param>
675 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
676 <xsl:otherwise> | </xsl:otherwise>
683 <!-- Image processing code added here, takes precedence over text links including y3z text -->
684 <xsl:if test="marc:datafield[@tag=856]">
685 <span class="results_summary online_resources"><span class="label">Online resources: </span>
686 <xsl:for-each select="marc:datafield[@tag=856]">
687 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
690 <xsl:when test="$OPACTrackClicks='track'">
691 <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:when test="$OPACTrackClicks='anonymous'">
694 <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>
697 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
700 <xsl:if test="$OPACURLOpenInNewWindow='1'">
701 <xsl:attribute name="target">_blank</xsl:attribute>
704 <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')">
705 <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>
707 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
708 <xsl:call-template name="subfieldSelect">
709 <xsl:with-param name="codes">y3z</xsl:with-param>
712 <xsl:when test="$URLLinkText!=''">
713 <xsl:value-of select="$URLLinkText"/>
716 <xsl:text>Click here to access online</xsl:text>
721 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
722 <xsl:otherwise> | </xsl:otherwise>
729 <xsl:if test="marc:datafield[@tag=530]">
730 <xsl:for-each select="marc:datafield[@tag=530]">
731 <span class="results_summary additionalforms">
732 <xsl:call-template name="subfieldSelect">
733 <xsl:with-param name="codes">abcd</xsl:with-param>
735 <xsl:for-each select="marc:subfield[@code='u']">
736 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
737 <xsl:if test="$OPACURLOpenInNewWindow='1'">
738 <xsl:attribute name="target">_blank</xsl:attribute>
740 <xsl:value-of select="text()"/>
748 <xsl:if test="marc:datafield[@tag=505]">
749 <div class="results_summary contents">
750 <xsl:for-each select="marc:datafield[@tag=505]">
751 <xsl:if test="position()=1">
753 <xsl:when test="@ind1=1">
754 <span class="label">Incomplete contents:</span>
756 <xsl:when test="@ind1=2">
757 <span class="label">Partial contents:</span>
760 <span class="label">Contents:</span>
764 <div class='contentblock' property='description'>
766 <xsl:when test="@ind2=0">
767 <xsl:call-template name="subfieldSelectSpan">
768 <xsl:with-param name="codes">tru</xsl:with-param>
772 <xsl:call-template name="subfieldSelectSpan">
773 <xsl:with-param name="codes">atru</xsl:with-param>
783 <xsl:if test="marc:datafield[@tag=583]">
784 <xsl:for-each select="marc:datafield[@tag=583]">
785 <xsl:if test="@ind1=1 or @ind1=' '">
786 <span class="results_summary actionnote">
788 <xsl:when test="marc:subfield[@code='z']">
789 <xsl:value-of select="marc:subfield[@code='z']"/>
792 <xsl:call-template name="subfieldSelect">
793 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
803 <xsl:if test="marc:datafield[@tag=508]">
804 <div class="results_summary prod_credits">
805 <span class="label">Production Credits: </span>
806 <xsl:for-each select="marc:datafield[@tag=508]">
807 <xsl:call-template name="subfieldSelectSpan">
808 <xsl:with-param name="codes">a</xsl:with-param>
815 <xsl:if test="marc:datafield[@tag=586]">
816 <span class="results_summary awardsnote">
817 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
818 <span class="label">Awards: </span>
820 <xsl:for-each select="marc:datafield[@tag=586]">
821 <xsl:value-of select="marc:subfield[@code='a']"/>
822 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
828 <xsl:if test="marc:datafield[@tag=773]">
829 <xsl:for-each select="marc:datafield[@tag=773]">
830 <xsl:if test="@ind1=0">
831 <span class="results_summary in"><span class="label">
833 <xsl:when test="@ind2=' '">
836 <xsl:when test="@ind2=8">
837 <xsl:if test="marc:subfield[@code='i']">
838 <xsl:value-of select="marc:subfield[@code='i']"/>
843 <xsl:variable name="f773">
844 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
845 <xsl:with-param name="codes">a_t</xsl:with-param>
846 </xsl:call-template></xsl:with-param></xsl:call-template>
849 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
850 <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>
851 <xsl:value-of select="translate($f773, '()', '')"/>
853 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
855 <xsl:when test="marc:subfield[@code='0']">
856 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
857 <xsl:value-of select="$f773"/>
861 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
862 <xsl:value-of select="$f773"/>
864 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
869 <xsl:if test="marc:subfield[@code='n']">
870 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
877 <xsl:for-each select="marc:datafield[@tag=511]">
878 <span class="results_summary perf_note">
880 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
882 <xsl:call-template name="subfieldSelect">
883 <xsl:with-param name="codes">a</xsl:with-param>
888 <xsl:if test="marc:datafield[@tag=502]">
889 <span class="results_summary diss_note">
890 <span class="label">Dissertation note: </span>
891 <xsl:for-each select="marc:datafield[@tag=502]">
892 <xsl:call-template name="subfieldSelect">
893 <xsl:with-param name="codes">abcdgo</xsl:with-param>
896 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
900 <xsl:for-each select="marc:datafield[@tag=520]">
901 <span class="results_summary summary"><span class="label">
903 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
904 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
905 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
906 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
907 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
908 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
911 <xsl:call-template name="subfieldSelect">
912 <xsl:with-param name="codes">abcu</xsl:with-param>
917 <!-- 866 textual holdings -->
918 <xsl:if test="marc:datafield[@tag=866]">
919 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
920 <xsl:for-each select="marc:datafield[@tag=866]">
921 <xsl:call-template name="subfieldSelect">
922 <xsl:with-param name="codes">az</xsl:with-param>
924 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
929 <!-- 775 Other Edition -->
930 <xsl:if test="marc:datafield[@tag=775]">
931 <span class="results_summary other_editions"><span class="label">Other editions: </span>
932 <xsl:for-each select="marc:datafield[@tag=775]">
933 <xsl:variable name="f775">
934 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
935 <xsl:with-param name="codes">a_t</xsl:with-param>
936 </xsl:call-template></xsl:with-param></xsl:call-template>
938 <xsl:if test="marc:subfield[@code='i']">
939 <xsl:call-template name="subfieldSelect">
940 <xsl:with-param name="codes">i</xsl:with-param>
942 <xsl:text>: </xsl:text>
946 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
947 <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>
950 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
953 <xsl:call-template name="subfieldSelect">
954 <xsl:with-param name="codes">a_t</xsl:with-param>
958 <xsl:when test="position()=last()"></xsl:when>
959 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
966 <xsl:if test="marc:datafield[@tag=780]">
967 <xsl:for-each select="marc:datafield[@tag=780]">
968 <xsl:if test="@ind1=0">
969 <span class="results_summary preceeding_entry">
971 <xsl:when test="@ind2=0">
972 <span class="label">Continues:</span>
974 <xsl:when test="@ind2=1">
975 <span class="label">Continues in part:</span>
977 <xsl:when test="@ind2=2">
978 <span class="label">Supersedes:</span>
980 <xsl:when test="@ind2=3">
981 <span class="label">Supersedes in part:</span>
983 <xsl:when test="@ind2=4">
984 <span class="label">Formed by the union: ... and: ...</span>
986 <xsl:when test="@ind2=5">
987 <span class="label">Absorbed:</span>
989 <xsl:when test="@ind2=6">
990 <span class="label">Absorbed in part:</span>
992 <xsl:when test="@ind2=7">
993 <span class="label">Separated from:</span>
996 <xsl:text> </xsl:text>
997 <xsl:variable name="f780">
998 <xsl:call-template name="subfieldSelect">
999 <xsl:with-param name="codes">a_t</xsl:with-param>
1000 </xsl:call-template>
1003 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1004 <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>
1005 <xsl:value-of select="translate($f780, '()', '')"/>
1009 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1010 <xsl:value-of select="translate($f780, '()', '')"/>
1016 <xsl:if test="marc:subfield[@code='n']">
1017 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1025 <xsl:if test="marc:datafield[@tag=785]">
1026 <xsl:for-each select="marc:datafield[@tag=785]">
1027 <xsl:if test="@ind1=0">
1028 <span class="results_summary succeeding_entry">
1030 <xsl:when test="@ind2=0">
1031 <span class="label">Continued by:</span>
1033 <xsl:when test="@ind2=1">
1034 <span class="label">Continued in part by:</span>
1036 <xsl:when test="@ind2=2">
1037 <span class="label">Superseded by:</span>
1039 <xsl:when test="@ind2=3">
1040 <span class="label">Superseded in part by:</span>
1042 <xsl:when test="@ind2=4">
1043 <span class="label">Absorbed by:</span>
1045 <xsl:when test="@ind2=5">
1046 <span class="label">Absorbed in part by:</span>
1048 <xsl:when test="@ind2=6">
1049 <span class="label">Split into .. and ...:</span>
1051 <xsl:when test="@ind2=7">
1052 <span class="label">Merged with ... to form ...</span>
1054 <xsl:when test="@ind2=8">
1055 <span class="label">Changed back to:</span>
1058 <xsl:text> </xsl:text>
1059 <xsl:variable name="f785">
1060 <xsl:call-template name="subfieldSelect">
1061 <xsl:with-param name="codes">a_t</xsl:with-param>
1062 </xsl:call-template>
1066 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1067 <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>
1068 <xsl:value-of select="translate($f785, '()', '')"/>
1072 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1073 <xsl:value-of select="translate($f785, '()', '')"/>
1080 <xsl:if test="marc:subfield[@code='n']">
1081 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1091 <xsl:template name="showAuthor">
1092 <xsl:param name="authorfield" />
1093 <xsl:param name="UseAuthoritiesForTracings" />
1094 <xsl:param name="materialTypeLabel" />
1095 <xsl:param name="theme" />
1096 <xsl:for-each select="$authorfield">
1097 <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose>
1099 <xsl:when test="not(@tag=111 or @tag=711)" />
1100 <xsl:when test="marc:subfield[@code='n']">
1101 <xsl:text> </xsl:text>
1102 <xsl:call-template name="subfieldSelect">
1103 <xsl:with-param name="codes">n</xsl:with-param>
1104 </xsl:call-template>
1105 <xsl:text> </xsl:text>
1110 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1111 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="marc:subfield[@code=9]"/>"</xsl:attribute>
1114 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1117 <span resource="#record"><span>
1119 <xsl:when test="substring(@tag, 1, 1)='1'">
1121 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1122 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1125 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1128 <xsl:when test="substring(@tag, 2, 1)='0'">
1130 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1131 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1134 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1136 <span property="name">
1138 <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when>
1139 <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
1140 <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
1142 </span></span></span>
1143 <!-- add relator code too between brackets-->
1144 <xsl:if test="marc:subfield[@code='4' or @code='e']">
1145 <span class="relatorcode">
1146 <xsl:text> [</xsl:text>
1148 <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
1149 <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
1151 <xsl:text>]</xsl:text>
1155 <xsl:if test="marc:subfield[@code=9]">
1156 <a class='authlink'>
1157 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1158 <xsl:element name="img">
1159 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
1160 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
1161 <xsl:attribute name="height">15</xsl:attribute>
1162 <xsl:attribute name="width">15</xsl:attribute>
1167 <xsl:text>.</xsl:text>
1170 <xsl:template name="nameABCQ">
1171 <xsl:call-template name="chopPunctuation">
1172 <xsl:with-param name="chopString">
1173 <xsl:call-template name="subfieldSelect">
1174 <xsl:with-param name="codes">abcq</xsl:with-param>
1175 </xsl:call-template>
1177 <xsl:with-param name="punctuation">
1178 <xsl:text>:,;/ </xsl:text>
1180 </xsl:call-template>
1183 <xsl:template name="nameABCDN">
1184 <xsl:call-template name="chopPunctuation">
1185 <xsl:with-param name="chopString">
1186 <xsl:call-template name="subfieldSelect">
1187 <xsl:with-param name="codes">abcdn</xsl:with-param>
1188 </xsl:call-template>
1190 <xsl:with-param name="punctuation">
1191 <xsl:text>:,;/ </xsl:text>
1193 </xsl:call-template>
1196 <xsl:template name="nameACDEQ">
1197 <xsl:call-template name="subfieldSelect">
1198 <xsl:with-param name="codes">acdeq</xsl:with-param>
1199 </xsl:call-template>
1202 <xsl:template name="part">
1203 <xsl:variable name="partNumber">
1204 <xsl:call-template name="specialSubfieldSelect">
1205 <xsl:with-param name="axis">n</xsl:with-param>
1206 <xsl:with-param name="anyCodes">n</xsl:with-param>
1207 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1208 </xsl:call-template>
1210 <xsl:variable name="partName">
1211 <xsl:call-template name="specialSubfieldSelect">
1212 <xsl:with-param name="axis">p</xsl:with-param>
1213 <xsl:with-param name="anyCodes">p</xsl:with-param>
1214 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1215 </xsl:call-template>
1217 <xsl:if test="string-length(normalize-space($partNumber))">
1218 <xsl:call-template name="chopPunctuation">
1219 <xsl:with-param name="chopString" select="$partNumber"/>
1220 </xsl:call-template>
1222 <xsl:if test="string-length(normalize-space($partName))">
1223 <xsl:call-template name="chopPunctuation">
1224 <xsl:with-param name="chopString" select="$partName"/>
1225 </xsl:call-template>
1229 <xsl:template name="specialSubfieldSelect">
1230 <xsl:param name="anyCodes"/>
1231 <xsl:param name="axis"/>
1232 <xsl:param name="beforeCodes"/>
1233 <xsl:param name="afterCodes"/>
1234 <xsl:variable name="str">
1235 <xsl:for-each select="marc:subfield">
1236 <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])">
1237 <xsl:value-of select="text()"/>
1238 <xsl:text> </xsl:text>
1242 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>