1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
4 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <xsl:stylesheet version="1.0"
6 xmlns:marc="http://www.loc.gov/MARC21/slim"
7 xmlns:items="http://www.koha-community.org/items"
8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 exclude-result-prefixes="marc items">
10 <xsl:import href="MARC21slimUtils.xsl"/>
11 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
13 <xsl:template match="/">
14 <xsl:apply-templates/>
17 <xsl:template match="marc:record">
19 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
20 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
24 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
25 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
27 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
28 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
29 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
30 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
31 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
32 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
33 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
34 <xsl:variable name="TracingQuotesLeft">
36 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
37 <xsl:otherwise>"</xsl:otherwise>
40 <xsl:variable name="TracingQuotesRight">
42 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
43 <xsl:otherwise>"</xsl:otherwise>
46 <xsl:variable name="leader" select="marc:leader"/>
47 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
48 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
49 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
50 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
51 <xsl:variable name="materialTypeCode">
53 <xsl:when test="$leader19='a'">ST</xsl:when>
54 <xsl:when test="$leader6='a'">
56 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
57 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
58 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
61 <xsl:when test="$leader6='t'">BK</xsl:when>
62 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
63 <xsl:when test="$leader6='m'">CF</xsl:when>
64 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
65 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
66 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
67 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
70 <xsl:variable name="materialTypeLabel">
72 <xsl:when test="$leader19='a'">Set</xsl:when>
73 <xsl:when test="$leader6='a'">
75 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
76 <xsl:when test="$leader7='i' or $leader7='s'">
78 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
79 <xsl:otherwise>Series</xsl:otherwise>
82 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
85 <xsl:when test="$leader6='t'">Book</xsl:when>
86 <xsl:when test="$leader6='o'">Kit</xsl:when>
87 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
88 <xsl:when test="$leader6='m'">Computer file</xsl:when>
89 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
90 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
91 <xsl:when test="$leader6='j'">Music</xsl:when>
92 <xsl:when test="$leader6='i'">Sound</xsl:when>
93 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
97 <!-- Schema.org type -->
98 <xsl:variable name="schemaOrgType">
100 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
101 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
102 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
103 <xsl:otherwise>CreativeWork</xsl:otherwise>
107 <!-- Wrapper div for our schema.org object -->
108 <xsl:element name="div">
109 <xsl:attribute name="class">record</xsl:attribute>
110 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
111 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
112 <xsl:attribute name="resource">#record</xsl:attribute>
114 <!-- Title Statement -->
115 <!-- Alternate Graphic Representation (MARC 880) -->
116 <xsl:if test="$display880">
117 <h1 class="title" property="alternateName">
118 <xsl:call-template name="m880Select">
119 <xsl:with-param name="basetags">245</xsl:with-param>
120 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
126 <xsl:if test="marc:datafield[@tag=245]">
127 <h1 class="title" property="name">
128 <xsl:for-each select="marc:datafield[@tag=245]">
129 <xsl:call-template name="subfieldSelect">
130 <xsl:with-param name="codes">a</xsl:with-param>
132 <xsl:text> </xsl:text>
133 <!-- 13381 add additional subfields-->
134 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
136 <xsl:when test="@code='h'">
137 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
138 <span class="title_medium"><xsl:apply-templates/> </span>
140 <xsl:when test="@code='c'">
141 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
142 <span class="title_resp_stmt"><xsl:apply-templates/> </span>
145 <xsl:apply-templates/>
146 <xsl:text> </xsl:text>
155 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
156 <xsl:if test="$display880">
158 <xsl:call-template name="m880Select">
159 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
160 <xsl:with-param name="codes">abc</xsl:with-param>
161 <xsl:with-param name="index">au</xsl:with-param>
162 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
167 <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]">
168 <h5 class="author">by
169 <xsl:call-template name="showAuthor">
170 <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]"/>
171 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
172 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
173 <xsl:with-param name="theme" select="$theme"/>
179 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
180 <xsl:if test="$materialTypeCode!=''">
181 <span class="results_summary type"><span class="label">Material type: </span>
182 <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>
183 <xsl:value-of select="$materialTypeLabel"/>
188 <!--Series: Alternate Graphic Representation (MARC 880) -->
189 <xsl:if test="$display880">
190 <xsl:call-template name="m880Select">
191 <xsl:with-param name="basetags">440,490</xsl:with-param>
192 <xsl:with-param name="codes">av</xsl:with-param>
193 <xsl:with-param name="class">results_summary series</xsl:with-param>
194 <xsl:with-param name="label">Series: </xsl:with-param>
195 <xsl:with-param name="index">se</xsl:with-param>
200 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
201 <span class="results_summary series"><span class="label">Series: </span>
203 <xsl:for-each select="marc:datafield[@tag=440]">
204 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
205 <xsl:call-template name="chopPunctuation">
206 <xsl:with-param name="chopString">
207 <xsl:call-template name="subfieldSelect">
208 <xsl:with-param name="codes">av</xsl:with-param>
213 <xsl:call-template name="part"/>
214 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
217 <!-- 490 Series not traced, Ind1 = 0 -->
218 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
219 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
220 <xsl:call-template name="chopPunctuation">
221 <xsl:with-param name="chopString">
222 <xsl:call-template name="subfieldSelect">
223 <xsl:with-param name="codes">av</xsl:with-param>
228 <xsl:call-template name="part"/>
229 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
231 <!-- 490 Series traced, Ind1 = 1 -->
232 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
233 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
235 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
236 <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
237 <xsl:call-template name="chopPunctuation">
238 <xsl:with-param name="chopString">
239 <xsl:call-template name="subfieldSelect">
240 <xsl:with-param name="codes">a_t</xsl:with-param>
247 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
248 <xsl:call-template name="chopPunctuation">
249 <xsl:with-param name="chopString">
250 <xsl:call-template name="subfieldSelect">
251 <xsl:with-param name="codes">a_t</xsl:with-param>
256 <xsl:call-template name="part"/>
259 <xsl:text>: </xsl:text>
260 <xsl:value-of select="marc:subfield[@code='v']" />
261 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
268 <xsl:if test="$leader7='s'">
269 <span class="results_summary analytics"><span class="label">Analytics: </span>
272 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
273 <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>
276 <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>
279 <xsl:text>Show analytics</xsl:text>
284 <!-- Volumes of sets and traced series -->
285 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
286 <span class="results_summary volumes"><span class="label">Volumes: </span>
289 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
290 <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>
293 <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>
296 <xsl:text>Show volumes</xsl:text>
302 <xsl:if test="$leader19='c'">
303 <span class="results_summary set"><span class="label">Set: </span>
304 <xsl:for-each select="marc:datafield[@tag=773]">
307 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
308 <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>
311 <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>
314 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
317 <xsl:when test="position()=last()"></xsl:when>
318 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
324 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
325 <xsl:if test="$display880">
326 <xsl:call-template name="m880Select">
327 <xsl:with-param name="basetags">260</xsl:with-param>
328 <xsl:with-param name="codes">abcg</xsl:with-param>
329 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
330 <xsl:with-param name="label">Publisher: </xsl:with-param>
334 <!-- Publisher info and RDA related info from tags 260, 264 -->
336 <xsl:when test="marc:datafield[@tag=260]">
337 <span class="results_summary publisher"><span class="label">Publisher: </span>
338 <xsl:for-each select="marc:datafield[@tag=260]">
339 <span property="publisher" typeof="Organization">
340 <xsl:if test="marc:subfield[@code='a']">
341 <span property="location">
342 <xsl:call-template name="subfieldSelect">
343 <xsl:with-param name="codes">a</xsl:with-param>
347 <xsl:text> </xsl:text>
348 <xsl:if test="marc:subfield[@code='b']">
349 <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
350 <xsl:call-template name="subfieldSelect">
351 <xsl:with-param name="codes">b</xsl:with-param>
356 <xsl:text> </xsl:text>
357 <xsl:if test="marc:subfield[@code='c' or @code='g']">
358 <span property="datePublished">
359 <xsl:call-template name="chopPunctuation">
360 <xsl:with-param name="chopString">
361 <xsl:call-template name="subfieldSelect">
362 <xsl:with-param name="codes">cg</xsl:with-param>
368 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
370 <xsl:if test="marc:datafield[@tag=264]">
371 <xsl:text>; </xsl:text>
372 <xsl:call-template name="showRDAtag264"/>
376 <xsl:when test="marc:datafield[@tag=264]">
377 <span class="results_summary">
378 <xsl:call-template name="showRDAtag264"/>
383 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
384 <xsl:if test="$display880">
385 <xsl:call-template name="m880Select">
386 <xsl:with-param name="basetags">250</xsl:with-param>
387 <xsl:with-param name="codes">ab</xsl:with-param>
388 <xsl:with-param name="class">results_summary edition</xsl:with-param>
389 <xsl:with-param name="label">Edition: </xsl:with-param>
393 <xsl:if test="marc:datafield[@tag=250]">
394 <span class="results_summary edition"><span class="label">Edition: </span>
395 <xsl:for-each select="marc:datafield[@tag=250]">
396 <span property="bookEdition">
397 <xsl:call-template name="chopPunctuation">
398 <xsl:with-param name="chopString">
399 <xsl:call-template name="subfieldSelect">
400 <xsl:with-param name="codes">ab</xsl:with-param>
405 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
410 <!-- Description: Alternate Graphic Representation (MARC 880) -->
411 <xsl:if test="$display880">
412 <xsl:call-template name="m880Select">
413 <xsl:with-param name="basetags">300</xsl:with-param>
414 <xsl:with-param name="codes">abceg</xsl:with-param>
415 <xsl:with-param name="class">results_summary description</xsl:with-param>
416 <xsl:with-param name="label">Description: </xsl:with-param>
420 <xsl:if test="marc:datafield[@tag=300]">
421 <span class="results_summary description"><span class="label">Description: </span>
422 <xsl:for-each select="marc:datafield[@tag=300]">
423 <span property="description">
424 <xsl:call-template name="chopPunctuation">
425 <xsl:with-param name="chopString">
426 <xsl:call-template name="subfieldSelect">
427 <xsl:with-param name="codes">abceg</xsl:with-param>
432 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
437 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
438 <span class="results_summary isbn"><span class="label">ISBN: </span>
439 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
440 <span property="isbn">
441 <xsl:value-of select="."/>
443 <xsl:when test="position()=last()">
444 <xsl:text>.</xsl:text>
447 <xsl:text>; </xsl:text>
456 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
457 <span class="results_summary issn"><span class="label">ISSN: </span>
458 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
459 <span property="issn">
460 <xsl:value-of select="."/>
462 <xsl:when test="position()=last()">
463 <xsl:text>.</xsl:text>
466 <xsl:text>; </xsl:text>
474 <xsl:if test="marc:datafield[@tag=013]">
475 <span class="results_summary patent_info">
476 <span class="label">Patent information: </span>
477 <xsl:for-each select="marc:datafield[@tag=013]">
478 <xsl:call-template name="subfieldSelect">
479 <xsl:with-param name="codes">acdef</xsl:with-param>
480 <xsl:with-param name="delimeter">, </xsl:with-param>
482 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
487 <xsl:if test="marc:datafield[@tag=088]">
488 <span class="results_summary report_number">
489 <span class="label">Report number: </span>
490 <xsl:for-each select="marc:datafield[@tag=088]">
491 <xsl:call-template name="subfieldSelect">
492 <xsl:with-param name="codes">a</xsl:with-param>
494 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
499 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
500 <xsl:if test="$display880">
501 <xsl:call-template name="m880Select">
502 <xsl:with-param name="basetags">246</xsl:with-param>
503 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
504 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
505 <xsl:with-param name="label">Other title: </xsl:with-param>
509 <xsl:if test="marc:datafield[@tag=246]">
510 <span class="results_summary other_title"><span class="label">Other title: </span>
511 <xsl:for-each select="marc:datafield[@tag=246]">
512 <span property="alternateName">
513 <xsl:call-template name="chopPunctuation">
514 <xsl:with-param name="chopString">
515 <xsl:call-template name="subfieldSelect">
516 <xsl:with-param name="codes">iabhfgnp</xsl:with-param>
521 <!-- #13386 added separator | -->
522 <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>
528 <xsl:if test="marc:datafield[@tag=242]">
529 <span class="results_summary translated_title"><span class="label">Title translated: </span>
530 <xsl:for-each select="marc:datafield[@tag=242]">
531 <span property="alternateName">
532 <xsl:call-template name="chopPunctuation">
533 <xsl:with-param name="chopString">
534 <xsl:call-template name="subfieldSelect">
535 <xsl:with-param name="codes">abchnp</xsl:with-param>
540 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
545 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
546 <xsl:if test="$display880">
547 <span property="alternateName">
548 <xsl:call-template name="m880Select">
549 <xsl:with-param name="basetags">130,240</xsl:with-param>
550 <xsl:with-param name="codes">adfklmor</xsl:with-param>
551 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
552 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
557 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
558 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
559 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
560 <span property="alternateName">
561 <xsl:variable name="str">
562 <xsl:for-each select="marc:subfield">
563 <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'])))">
564 <xsl:value-of select="text()"/>
565 <xsl:text> </xsl:text>
569 <xsl:call-template name="chopPunctuation">
570 <xsl:with-param name="chopString">
571 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
576 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
581 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
582 <span class="results_summary subjects"><span class="label">Subject(s): </span>
583 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
584 <span property="keywords">
587 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
588 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
590 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
591 <xsl:when test="$TraceSubjectSubdivisions='1'">
592 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
593 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
594 <xsl:with-param name="delimeter"> AND </xsl:with-param>
595 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
596 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
600 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
602 <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="translate(marc:subfield[@code='a'],'()','')"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
605 <xsl:call-template name="chopPunctuation">
606 <xsl:with-param name="chopString">
607 <xsl:call-template name="subfieldSelect">
608 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
609 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
610 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
616 <xsl:if test="marc:subfield[@code=9]">
618 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
619 <xsl:element name="img">
620 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
621 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
622 <xsl:attribute name="height">15</xsl:attribute>
623 <xsl:attribute name="width">15</xsl:attribute>
628 <xsl:when test="position()=last()"></xsl:when>
629 <xsl:otherwise> | </xsl:otherwise>
637 <xsl:if test="marc:datafield[@tag=655]">
638 <span class="results_summary genre"><span class="label">Genre/Form: </span>
639 <xsl:for-each select="marc:datafield[@tag=655]">
642 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
643 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
645 <xsl:when test="$TraceSubjectSubdivisions='1'">
646 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
647 <xsl:with-param name="codes">avxyz</xsl:with-param>
648 <xsl:with-param name="delimeter"> AND </xsl:with-param>
649 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
650 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
655 <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>
659 <xsl:call-template name="subfieldSelect">
660 <xsl:with-param name="codes">avxyz</xsl:with-param>
661 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
662 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
664 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
669 <!-- DDC classification -->
670 <xsl:if test="marc:datafield[@tag=082]">
671 <span class="results_summary ddc">
672 <span class="label">DDC classification: </span>
673 <xsl:for-each select="marc:datafield[@tag=082]">
674 <xsl:call-template name="subfieldSelect">
675 <xsl:with-param name="codes">a</xsl:with-param>
678 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
679 <xsl:otherwise> | </xsl:otherwise>
686 <!-- Image processing code added here, takes precedence over text links including y3z text -->
687 <xsl:if test="marc:datafield[@tag=856]">
688 <span class="results_summary online_resources"><span class="label">Online resources: </span>
689 <xsl:for-each select="marc:datafield[@tag=856]">
690 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
693 <xsl:when test="$OPACTrackClicks='track'">
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>
696 <xsl:when test="$OPACTrackClicks='anonymous'">
697 <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>
700 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
703 <xsl:if test="$OPACURLOpenInNewWindow='1'">
704 <xsl:attribute name="target">_blank</xsl:attribute>
707 <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')">
708 <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>
710 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
711 <xsl:call-template name="subfieldSelect">
712 <xsl:with-param name="codes">y3z</xsl:with-param>
715 <xsl:when test="$URLLinkText!=''">
716 <xsl:value-of select="$URLLinkText"/>
719 <xsl:text>Click here to access online</xsl:text>
724 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
725 <xsl:otherwise> | </xsl:otherwise>
732 <xsl:if test="marc:datafield[@tag=530]">
733 <xsl:for-each select="marc:datafield[@tag=530]">
734 <span class="results_summary additionalforms">
735 <xsl:call-template name="subfieldSelect">
736 <xsl:with-param name="codes">abcd</xsl:with-param>
738 <xsl:for-each select="marc:subfield[@code='u']">
739 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
740 <xsl:if test="$OPACURLOpenInNewWindow='1'">
741 <xsl:attribute name="target">_blank</xsl:attribute>
743 <xsl:value-of select="text()"/>
751 <xsl:if test="marc:datafield[@tag=505]">
752 <div class="results_summary contents">
753 <xsl:for-each select="marc:datafield[@tag=505]">
754 <xsl:if test="position()=1">
756 <xsl:when test="@ind1=1">
757 <span class="label">Incomplete contents:</span>
759 <xsl:when test="@ind1=2">
760 <span class="label">Partial contents:</span>
763 <span class="label">Contents:</span>
767 <div class='contentblock' property='description'>
769 <xsl:when test="@ind2=0">
770 <xsl:call-template name="subfieldSelectSpan">
771 <xsl:with-param name="codes">tru</xsl:with-param>
775 <xsl:call-template name="subfieldSelectSpan">
776 <xsl:with-param name="codes">atru</xsl:with-param>
786 <xsl:if test="marc:datafield[@tag=583]">
787 <xsl:for-each select="marc:datafield[@tag=583]">
788 <xsl:if test="@ind1=1 or @ind1=' '">
789 <span class="results_summary actionnote">
791 <xsl:when test="marc:subfield[@code='z']">
792 <xsl:value-of select="marc:subfield[@code='z']"/>
795 <xsl:call-template name="subfieldSelect">
796 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
806 <xsl:if test="marc:datafield[@tag=508]">
807 <div class="results_summary prod_credits">
808 <span class="label">Production Credits: </span>
809 <xsl:for-each select="marc:datafield[@tag=508]">
810 <xsl:call-template name="subfieldSelectSpan">
811 <xsl:with-param name="codes">a</xsl:with-param>
818 <xsl:if test="marc:datafield[@tag=586]">
819 <span class="results_summary awardsnote">
820 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
821 <span class="label">Awards: </span>
823 <xsl:for-each select="marc:datafield[@tag=586]">
824 <xsl:value-of select="marc:subfield[@code='a']"/>
825 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
831 <xsl:if test="marc:datafield[@tag=773]">
832 <xsl:for-each select="marc:datafield[@tag=773]">
833 <xsl:if test="@ind1=0">
834 <span class="results_summary in"><span class="label">
836 <xsl:when test="@ind2=' '">
839 <xsl:when test="@ind2=8">
840 <xsl:if test="marc:subfield[@code='i']">
841 <xsl:value-of select="marc:subfield[@code='i']"/>
846 <xsl:variable name="f773">
847 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
848 <xsl:with-param name="codes">a_t</xsl:with-param>
849 </xsl:call-template></xsl:with-param></xsl:call-template>
852 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
853 <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>
854 <xsl:value-of select="translate($f773, '()', '')"/>
856 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
858 <xsl:when test="marc:subfield[@code='0']">
859 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
860 <xsl:value-of select="$f773"/>
864 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
865 <xsl:value-of select="$f773"/>
867 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
872 <xsl:if test="marc:subfield[@code='n']">
873 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
880 <xsl:for-each select="marc:datafield[@tag=511]">
881 <span class="results_summary perf_note">
883 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
885 <xsl:call-template name="subfieldSelect">
886 <xsl:with-param name="codes">a</xsl:with-param>
891 <xsl:if test="marc:datafield[@tag=502]">
892 <span class="results_summary diss_note">
893 <span class="label">Dissertation note: </span>
894 <xsl:for-each select="marc:datafield[@tag=502]">
895 <xsl:call-template name="subfieldSelect">
896 <xsl:with-param name="codes">abcdgo</xsl:with-param>
899 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
903 <xsl:for-each select="marc:datafield[@tag=520]">
904 <span class="results_summary summary"><span class="label">
906 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
907 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
908 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
909 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
910 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
911 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
914 <xsl:call-template name="subfieldSelect">
915 <xsl:with-param name="codes">abcu</xsl:with-param>
920 <!-- 866 textual holdings -->
921 <xsl:if test="marc:datafield[@tag=866]">
922 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
923 <xsl:for-each select="marc:datafield[@tag=866]">
924 <xsl:call-template name="subfieldSelect">
925 <xsl:with-param name="codes">az</xsl:with-param>
927 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
932 <!-- 775 Other Edition -->
933 <xsl:if test="marc:datafield[@tag=775]">
934 <span class="results_summary other_editions"><span class="label">Other editions: </span>
935 <xsl:for-each select="marc:datafield[@tag=775]">
936 <xsl:variable name="f775">
937 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
938 <xsl:with-param name="codes">a_t</xsl:with-param>
939 </xsl:call-template></xsl:with-param></xsl:call-template>
941 <xsl:if test="marc:subfield[@code='i']">
942 <xsl:call-template name="subfieldSelect">
943 <xsl:with-param name="codes">i</xsl:with-param>
945 <xsl:text>: </xsl:text>
949 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
950 <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>
953 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
956 <xsl:call-template name="subfieldSelect">
957 <xsl:with-param name="codes">a_t</xsl:with-param>
961 <xsl:when test="position()=last()"></xsl:when>
962 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
969 <xsl:if test="marc:datafield[@tag=780]">
970 <xsl:for-each select="marc:datafield[@tag=780]">
971 <xsl:if test="@ind1=0">
972 <span class="results_summary preceeding_entry">
974 <xsl:when test="@ind2=0">
975 <span class="label">Continues:</span>
977 <xsl:when test="@ind2=1">
978 <span class="label">Continues in part:</span>
980 <xsl:when test="@ind2=2">
981 <span class="label">Supersedes:</span>
983 <xsl:when test="@ind2=3">
984 <span class="label">Supersedes in part:</span>
986 <xsl:when test="@ind2=4">
987 <span class="label">Formed by the union: ... and: ...</span>
989 <xsl:when test="@ind2=5">
990 <span class="label">Absorbed:</span>
992 <xsl:when test="@ind2=6">
993 <span class="label">Absorbed in part:</span>
995 <xsl:when test="@ind2=7">
996 <span class="label">Separated from:</span>
999 <xsl:text> </xsl:text>
1000 <xsl:variable name="f780">
1001 <xsl:call-template name="subfieldSelect">
1002 <xsl:with-param name="codes">a_t</xsl:with-param>
1003 </xsl:call-template>
1006 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1007 <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>
1008 <xsl:value-of select="translate($f780, '()', '')"/>
1012 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1013 <xsl:value-of select="translate($f780, '()', '')"/>
1019 <xsl:if test="marc:subfield[@code='n']">
1020 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1028 <xsl:if test="marc:datafield[@tag=785]">
1029 <xsl:for-each select="marc:datafield[@tag=785]">
1030 <xsl:if test="@ind1=0">
1031 <span class="results_summary succeeding_entry">
1033 <xsl:when test="@ind2=0">
1034 <span class="label">Continued by:</span>
1036 <xsl:when test="@ind2=1">
1037 <span class="label">Continued in part by:</span>
1039 <xsl:when test="@ind2=2">
1040 <span class="label">Superseded by:</span>
1042 <xsl:when test="@ind2=3">
1043 <span class="label">Superseded in part by:</span>
1045 <xsl:when test="@ind2=4">
1046 <span class="label">Absorbed by:</span>
1048 <xsl:when test="@ind2=5">
1049 <span class="label">Absorbed in part by:</span>
1051 <xsl:when test="@ind2=6">
1052 <span class="label">Split into .. and ...:</span>
1054 <xsl:when test="@ind2=7">
1055 <span class="label">Merged with ... to form ...</span>
1057 <xsl:when test="@ind2=8">
1058 <span class="label">Changed back to:</span>
1061 <xsl:text> </xsl:text>
1062 <xsl:variable name="f785">
1063 <xsl:call-template name="subfieldSelect">
1064 <xsl:with-param name="codes">a_t</xsl:with-param>
1065 </xsl:call-template>
1069 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1070 <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>
1071 <xsl:value-of select="translate($f785, '()', '')"/>
1075 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1076 <xsl:value-of select="translate($f785, '()', '')"/>
1083 <xsl:if test="marc:subfield[@code='n']">
1084 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1094 <xsl:template name="showAuthor">
1095 <xsl:param name="authorfield" />
1096 <xsl:param name="UseAuthoritiesForTracings" />
1097 <xsl:param name="materialTypeLabel" />
1098 <xsl:param name="theme" />
1099 <xsl:for-each select="$authorfield">
1100 <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose>
1102 <xsl:when test="not(@tag=111 or @tag=711)" />
1103 <xsl:when test="marc:subfield[@code='n']">
1104 <xsl:text> </xsl:text>
1105 <xsl:call-template name="subfieldSelect">
1106 <xsl:with-param name="codes">n</xsl:with-param>
1107 </xsl:call-template>
1108 <xsl:text> </xsl:text>
1113 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1114 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="marc:subfield[@code=9]"/>"</xsl:attribute>
1117 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1120 <span resource="#record"><span>
1122 <xsl:when test="substring(@tag, 1, 1)='1'">
1124 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1125 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1128 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1131 <xsl:when test="substring(@tag, 2, 1)='0'">
1133 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1134 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1137 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1139 <span property="name">
1141 <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when>
1142 <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when>
1143 <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when>
1145 </span></span></span>
1146 <!-- add relator code too between brackets-->
1147 <xsl:if test="marc:subfield[@code='4' or @code='e']">
1148 <span class="relatorcode">
1149 <xsl:text> [</xsl:text>
1151 <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when>
1152 <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise>
1154 <xsl:text>]</xsl:text>
1158 <xsl:if test="marc:subfield[@code=9]">
1159 <a class='authlink'>
1160 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1161 <xsl:element name="img">
1162 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
1163 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
1164 <xsl:attribute name="height">15</xsl:attribute>
1165 <xsl:attribute name="width">15</xsl:attribute>
1170 <xsl:text>.</xsl:text>
1173 <xsl:template name="nameABCQ">
1174 <xsl:call-template name="chopPunctuation">
1175 <xsl:with-param name="chopString">
1176 <xsl:call-template name="subfieldSelect">
1177 <xsl:with-param name="codes">abcq</xsl:with-param>
1178 </xsl:call-template>
1180 <xsl:with-param name="punctuation">
1181 <xsl:text>:,;/ </xsl:text>
1183 </xsl:call-template>
1186 <xsl:template name="nameABCDN">
1187 <xsl:call-template name="chopPunctuation">
1188 <xsl:with-param name="chopString">
1189 <xsl:call-template name="subfieldSelect">
1190 <xsl:with-param name="codes">abcdn</xsl:with-param>
1191 </xsl:call-template>
1193 <xsl:with-param name="punctuation">
1194 <xsl:text>:,;/ </xsl:text>
1196 </xsl:call-template>
1199 <xsl:template name="nameACDEQ">
1200 <xsl:call-template name="subfieldSelect">
1201 <xsl:with-param name="codes">acdeq</xsl:with-param>
1202 </xsl:call-template>
1205 <xsl:template name="part">
1206 <xsl:variable name="partNumber">
1207 <xsl:call-template name="specialSubfieldSelect">
1208 <xsl:with-param name="axis">n</xsl:with-param>
1209 <xsl:with-param name="anyCodes">n</xsl:with-param>
1210 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1211 </xsl:call-template>
1213 <xsl:variable name="partName">
1214 <xsl:call-template name="specialSubfieldSelect">
1215 <xsl:with-param name="axis">p</xsl:with-param>
1216 <xsl:with-param name="anyCodes">p</xsl:with-param>
1217 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1218 </xsl:call-template>
1220 <xsl:if test="string-length(normalize-space($partNumber))">
1221 <xsl:call-template name="chopPunctuation">
1222 <xsl:with-param name="chopString" select="$partNumber"/>
1223 </xsl:call-template>
1225 <xsl:if test="string-length(normalize-space($partName))">
1226 <xsl:call-template name="chopPunctuation">
1227 <xsl:with-param name="chopString" select="$partName"/>
1228 </xsl:call-template>
1232 <xsl:template name="specialSubfieldSelect">
1233 <xsl:param name="anyCodes"/>
1234 <xsl:param name="axis"/>
1235 <xsl:param name="beforeCodes"/>
1236 <xsl:param name="afterCodes"/>
1237 <xsl:variable name="str">
1238 <xsl:for-each select="marc:subfield">
1239 <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])">
1240 <xsl:value-of select="text()"/>
1241 <xsl:text> </xsl:text>
1245 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1248 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1249 <xsl:template name="subfieldSelectSubject">
1250 <xsl:param name="codes"/>
1251 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1252 <xsl:param name="subdivCodes"/>
1253 <xsl:param name="subdivDelimiter"/>
1254 <xsl:param name="prefix"/>
1255 <xsl:param name="suffix"/>
1256 <xsl:variable name="str">
1257 <xsl:for-each select="marc:subfield">
1258 <xsl:if test="contains($codes, @code)">
1259 <xsl:if test="contains($subdivCodes, @code)">
1260 <xsl:value-of select="$subdivDelimiter"/>
1262 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1266 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>