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 xmlns:str="http://exslt.org/strings"
10 exclude-result-prefixes="marc items str">
11 <xsl:import href="MARC21slimUtils.xsl"/>
12 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
18 <xsl:template match="marc:record">
20 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
21 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
23 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
24 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
25 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
26 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
28 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
29 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
30 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
31 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
32 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
33 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
34 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
35 <xsl:variable name="TracingQuotesLeft">
37 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
38 <xsl:otherwise>"</xsl:otherwise>
41 <xsl:variable name="TracingQuotesRight">
43 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
44 <xsl:otherwise>"</xsl:otherwise>
47 <xsl:variable name="leader" select="marc:leader"/>
48 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
49 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
50 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
51 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
52 <xsl:variable name="materialTypeCode">
54 <xsl:when test="$leader19='a'">ST</xsl:when>
55 <xsl:when test="$leader6='a'">
57 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
58 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
59 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
62 <xsl:when test="$leader6='t'">BK</xsl:when>
63 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
64 <xsl:when test="$leader6='m'">CF</xsl:when>
65 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
66 <xsl:when test="$leader6='g'">VM</xsl:when>
67 <xsl:when test="$leader6='k'">PK</xsl:when>
68 <xsl:when test="$leader6='r'">OB</xsl:when>
69 <xsl:when test="$leader6='i'">SO</xsl:when>
70 <xsl:when test="$leader6='j'">MU</xsl:when>
71 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
74 <xsl:variable name="materialTypeLabel">
76 <xsl:when test="$leader19='a'">Set</xsl:when>
77 <xsl:when test="$leader6='a'">
79 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Text</xsl:when>
80 <xsl:when test="$leader7='i' or $leader7='s'">
82 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
83 <xsl:otherwise>Series</xsl:otherwise>
86 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
89 <xsl:when test="$leader6='t'">Text</xsl:when>
90 <xsl:when test="$leader6='o'">Kit</xsl:when>
91 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
92 <xsl:when test="$leader6='m'">Computer file</xsl:when>
93 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
94 <xsl:when test="$leader6='g'">Film</xsl:when>
95 <xsl:when test="$leader6='k'">Picture</xsl:when>
96 <xsl:when test="$leader6='r'">Object</xsl:when>
97 <xsl:when test="$leader6='j'">Music</xsl:when>
98 <xsl:when test="$leader6='i'">Sound</xsl:when>
99 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
103 <!-- Schema.org type -->
104 <xsl:variable name="schemaOrgType">
106 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
107 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
108 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
109 <xsl:otherwise>CreativeWork</xsl:otherwise>
113 <!-- Wrapper div for our schema.org object -->
114 <xsl:element name="div">
115 <xsl:attribute name="class"><xsl:value-of select="'record'" /></xsl:attribute>
116 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
117 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
118 <xsl:attribute name="resource">#record</xsl:attribute>
120 <!-- Title Statement -->
121 <!-- Alternate Graphic Representation (MARC 880) -->
122 <xsl:if test="$display880">
123 <h1 class="title" property="alternateName">
124 <xsl:call-template name="m880Select">
125 <xsl:with-param name="basetags">245</xsl:with-param>
126 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
132 <xsl:if test="marc:datafield[@tag=245]">
133 <h1 class="title" property="name">
134 <xsl:for-each select="marc:datafield[@tag=245]">
135 <xsl:call-template name="subfieldSelect">
136 <xsl:with-param name="codes">a</xsl:with-param>
138 <xsl:text> </xsl:text>
139 <!-- 13381 add additional subfields-->
140 <!-- bug17625 adding f and g subfields -->
141 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
143 <xsl:when test="@code='h'">
144 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
145 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
147 <xsl:when test="@code='c'">
148 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
149 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
152 <xsl:apply-templates/>
153 <xsl:text> </xsl:text>
162 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
163 <xsl:if test="$display880">
165 <xsl:call-template name="m880Select">
166 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
167 <xsl:with-param name="codes">abc</xsl:with-param>
168 <xsl:with-param name="index">au</xsl:with-param>
169 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
174 <!--#13382 Added Author Statement to separate Authors and Contributors -->
175 <xsl:call-template name="showAuthor">
176 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=100 or @tag=110 or @tag=111)]"/>
177 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
178 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
179 <xsl:with-param name="theme" select="$theme"/>
182 <xsl:call-template name="showAuthor">
183 <!-- #13382 suppress 700$i and 7xx/@ind2=2 -->
184 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=700 or @tag=710 or @tag=711) and not(@ind2=2) and not(marc:subfield[@code='i'])]"/>
185 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
186 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
187 <xsl:with-param name="theme" select="$theme"/>
190 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
191 <xsl:if test="$materialTypeCode!=''">
192 <span class="results_summary type"><span class="label">Material type: </span>
193 <xsl:element name="img">
194 <xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute>
195 <xsl:attribute name="alt"><xsl:value-of select="$materialTypeLabel"/></xsl:attribute>
196 <xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute>
198 <xsl:value-of select="$materialTypeLabel"/>
203 <!--Series: Alternate Graphic Representation (MARC 880) -->
204 <xsl:if test="$display880">
205 <xsl:call-template name="m880Select">
206 <xsl:with-param name="basetags">440,490</xsl:with-param>
207 <xsl:with-param name="codes">av</xsl:with-param>
208 <xsl:with-param name="class">results_summary series</xsl:with-param>
209 <xsl:with-param name="label">Series: </xsl:with-param>
210 <xsl:with-param name="index">se</xsl:with-param>
215 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
216 <span class="results_summary series"><span class="label">Series: </span>
218 <xsl:for-each select="marc:datafield[@tag=440]">
219 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</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>
232 <!-- 490 Series not traced, Ind1 = 0 -->
233 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
234 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
235 <xsl:call-template name="chopPunctuation">
236 <xsl:with-param name="chopString">
237 <xsl:call-template name="subfieldSelect">
238 <xsl:with-param name="codes">av</xsl:with-param>
243 <xsl:call-template name="part"/>
244 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
246 <!-- 490 Series traced, Ind1 = 1 -->
247 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
248 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811]">
250 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
251 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
252 <xsl:call-template name="chopPunctuation">
253 <xsl:with-param name="chopString">
254 <xsl:call-template name="subfieldSelect">
255 <xsl:with-param name="codes">a_t</xsl:with-param>
261 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
262 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
263 <xsl:call-template name="chopPunctuation">
264 <xsl:with-param name="chopString">
265 <xsl:call-template name="subfieldSelect">
266 <xsl:with-param name="codes">a_t</xsl:with-param>
273 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
274 <xsl:call-template name="chopPunctuation">
275 <xsl:with-param name="chopString">
276 <xsl:call-template name="subfieldSelect">
277 <xsl:with-param name="codes">a_t</xsl:with-param>
282 <xsl:call-template name="part"/>
285 <xsl:text>: </xsl:text>
286 <xsl:value-of select="marc:subfield[@code='v']" />
287 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
289 <xsl:for-each select="marc:datafield[@tag=830]">
291 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
292 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
293 <xsl:call-template name="chopPunctuation">
294 <xsl:with-param name="chopString">
295 <xsl:call-template name="subfieldSelect">
296 <xsl:with-param name="codes">a_t</xsl:with-param>
302 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
303 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
304 <xsl:call-template name="chopPunctuation">
305 <xsl:with-param name="chopString">
306 <xsl:call-template name="subfieldSelect">
307 <xsl:with-param name="codes">a_t</xsl:with-param>
314 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
315 <xsl:call-template name="chopPunctuation">
316 <xsl:with-param name="chopString">
317 <xsl:call-template name="subfieldSelect">
318 <xsl:with-param name="codes">a_t</xsl:with-param>
323 <xsl:call-template name="part"/>
326 <xsl:text>: </xsl:text>
327 <xsl:value-of select="marc:subfield[@code='v']" />
328 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
335 <xsl:if test="$leader7='s'">
336 <span class="results_summary analytics"><span class="label">Analytics: </span>
339 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
340 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
343 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
346 <xsl:text>Show analytics</xsl:text>
351 <!-- Volumes of sets and traced series -->
352 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
353 <span class="results_summary volumes"><span class="label">Volumes: </span>
356 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
357 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
360 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
363 <xsl:text>Show volumes</xsl:text>
369 <xsl:if test="$leader19='c'">
370 <span class="results_summary set"><span class="label">Set: </span>
371 <xsl:for-each select="marc:datafield[@tag=773]">
374 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
375 <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>
378 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
381 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
384 <xsl:when test="position()=last()"></xsl:when>
385 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
391 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
392 <xsl:if test="$display880">
393 <xsl:call-template name="m880Select">
394 <xsl:with-param name="basetags">260</xsl:with-param>
395 <xsl:with-param name="codes">abcg</xsl:with-param>
396 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
397 <xsl:with-param name="label">Publisher: </xsl:with-param>
401 <!-- Publisher info and RDA related info from tags 260, 264 -->
403 <xsl:when test="marc:datafield[@tag=264]">
404 <xsl:call-template name="showRDAtag264">
405 <xsl:with-param name="show_url">1</xsl:with-param>
408 <xsl:when test="marc:datafield[@tag=260]">
409 <span class="results_summary publisher"><span class="label">Publisher: </span>
410 <xsl:for-each select="marc:datafield[@tag=260]">
411 <span property="publisher" typeof="Organization">
412 <xsl:if test="marc:subfield[@code='a']">
413 <span property="location">
414 <xsl:call-template name="subfieldSelect">
415 <xsl:with-param name="codes">a</xsl:with-param>
419 <xsl:text> </xsl:text>
420 <xsl:if test="marc:subfield[@code='b']">
421 <span property="name"><a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/></xsl:attribute>
422 <xsl:call-template name="subfieldSelect">
423 <xsl:with-param name="codes">b</xsl:with-param>
428 <xsl:text> </xsl:text>
429 <xsl:if test="marc:subfield[@code='c' or @code='g']">
430 <span property="datePublished">
431 <xsl:call-template name="chopPunctuation">
432 <xsl:with-param name="chopString">
433 <xsl:call-template name="subfieldSelect">
434 <xsl:with-param name="codes">cg</xsl:with-param>
440 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
446 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
447 <xsl:if test="$display880">
448 <xsl:call-template name="m880Select">
449 <xsl:with-param name="basetags">250</xsl:with-param>
450 <xsl:with-param name="codes">ab</xsl:with-param>
451 <xsl:with-param name="class">results_summary edition</xsl:with-param>
452 <xsl:with-param name="label">Edition: </xsl:with-param>
456 <xsl:if test="marc:datafield[@tag=250]">
457 <span class="results_summary edition"><span class="label">Edition: </span>
458 <xsl:for-each select="marc:datafield[@tag=250]">
459 <span property="bookEdition">
460 <xsl:call-template name="chopPunctuation">
461 <xsl:with-param name="chopString">
462 <xsl:call-template name="subfieldSelect">
463 <xsl:with-param name="codes">ab</xsl:with-param>
468 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
473 <!-- Description: Alternate Graphic Representation (MARC 880) -->
474 <xsl:if test="$display880">
475 <xsl:call-template name="m880Select">
476 <xsl:with-param name="basetags">300</xsl:with-param>
477 <xsl:with-param name="codes">abceg</xsl:with-param>
478 <xsl:with-param name="class">results_summary description</xsl:with-param>
479 <xsl:with-param name="label">Description: </xsl:with-param>
483 <xsl:if test="marc:datafield[@tag=300]">
484 <span class="results_summary description"><span class="label">Description: </span>
485 <xsl:for-each select="marc:datafield[@tag=300]">
486 <span property="description">
487 <xsl:call-template name="chopPunctuation">
488 <xsl:with-param name="chopString">
489 <xsl:call-template name="subfieldSelect">
490 <xsl:with-param name="codes">abcefg</xsl:with-param>
495 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
501 <!-- Content Type -->
502 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
503 <span class="results_summary" id="content_type">
504 <xsl:if test="marc:datafield[@tag=336]">
505 <span class="label">Content type: </span>
506 <xsl:for-each select="marc:datafield[@tag=336]">
507 <xsl:call-template name="subfieldSelect">
508 <xsl:with-param name="codes">a</xsl:with-param>
509 <xsl:with-param name="delimeter">, </xsl:with-param>
511 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
514 <xsl:text> </xsl:text>
516 <xsl:if test="marc:datafield[@tag=337]">
517 <span class="label">Media type: </span>
518 <xsl:for-each select="marc:datafield[@tag=337]">
519 <xsl:call-template name="subfieldSelect">
520 <xsl:with-param name="codes">a</xsl:with-param>
521 <xsl:with-param name="delimeter">, </xsl:with-param>
523 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
526 <xsl:text> </xsl:text>
528 <xsl:if test="marc:datafield[@tag=338]">
529 <span class="label">Carrier type: </span>
530 <xsl:for-each select="marc:datafield[@tag=338]">
531 <xsl:call-template name="subfieldSelect">
532 <xsl:with-param name="codes">a</xsl:with-param>
533 <xsl:with-param name="delimeter">, </xsl:with-param>
535 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
543 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
544 <span class="results_summary isbn"><span class="label">ISBN: </span>
545 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
546 <span property="isbn">
547 <xsl:value-of select="."/>
548 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
555 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
556 <span class="results_summary issn"><span class="label">ISSN: </span>
557 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
558 <span property="issn">
559 <xsl:value-of select="."/>
560 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
566 <xsl:if test="marc:datafield[@tag=013]">
567 <span class="results_summary patent_info">
568 <span class="label">Patent information: </span>
569 <xsl:for-each select="marc:datafield[@tag=013]">
570 <xsl:call-template name="subfieldSelect">
571 <xsl:with-param name="codes">acdef</xsl:with-param>
572 <xsl:with-param name="delimeter">, </xsl:with-param>
574 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
579 <xsl:if test="marc:datafield[@tag=088]">
580 <span class="results_summary report_number">
581 <span class="label">Report number: </span>
582 <xsl:for-each select="marc:datafield[@tag=088]">
583 <xsl:call-template name="subfieldSelect">
584 <xsl:with-param name="codes">a</xsl:with-param>
586 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
591 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
592 <xsl:if test="$display880">
593 <xsl:call-template name="m880Select">
594 <xsl:with-param name="basetags">246</xsl:with-param>
595 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
596 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
597 <xsl:with-param name="label">Other title: </xsl:with-param>
601 <xsl:if test="marc:datafield[@tag=246]">
602 <span class="results_summary other_title"><span class="label">Other title: </span>
603 <xsl:for-each select="marc:datafield[@tag=246]">
604 <span property="alternateName">
605 <xsl:call-template name="chopPunctuation">
606 <xsl:with-param name="chopString">
607 <xsl:call-template name="subfieldSelect">
608 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
612 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
614 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
615 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
616 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
617 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
618 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
619 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
620 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
621 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
622 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
625 <xsl:if test="marc:subfield[@code='i']">
626 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
629 <!-- #13386 added separator | -->
630 <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>
636 <xsl:if test="marc:datafield[@tag=242]">
637 <span class="results_summary translated_title"><span class="label">Title translated: </span>
638 <xsl:for-each select="marc:datafield[@tag=242]">
639 <span property="alternateName">
640 <xsl:call-template name="chopPunctuation">
641 <xsl:with-param name="chopString">
642 <xsl:call-template name="subfieldSelect">
643 <xsl:with-param name="codes">abchnp</xsl:with-param>
648 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
653 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
654 <xsl:if test="$display880">
655 <span property="alternateName">
656 <xsl:call-template name="m880Select">
657 <xsl:with-param name="basetags">130,240</xsl:with-param>
658 <xsl:with-param name="codes">adfklmor</xsl:with-param>
659 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
660 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
665 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
666 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
667 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
668 <span property="alternateName">
669 <xsl:for-each select="marc:subfield">
670 <xsl:if test="contains('adfghklmnoprst',@code)">
671 <xsl:value-of select="text()"/>
672 <xsl:text> </xsl:text>
676 <xsl:if test="position() != last()">
677 <span class="separator"><xsl:text> | </xsl:text></span>
684 <!-- #13382 Added Related works 700$i -->
685 <xsl:if test="marc:datafield[@tag=700][marc:subfield[@code='i']] or marc:datafield[@tag=710][marc:subfield[@code='i']] or marc:datafield[@tag=711][marc:subfield[@code='i']]">
686 <span class="results_summary related_works"><span class="label">Related works: </span>
687 <xsl:for-each select="marc:datafield[@tag=700][marc:subfield[@code='i']] | marc:datafield[@tag=710][marc:subfield[@code='i']] | marc:datafield[@tag=711][marc:subfield[@code='i']]">
688 <xsl:variable name="str">
689 <xsl:call-template name="subfieldSelect">
690 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
693 <xsl:call-template name="chopPunctuation">
694 <xsl:with-param name="chopString">
695 <xsl:value-of select="$str"/>
698 <!-- add relator code too between brackets-->
699 <xsl:if test="marc:subfield[@code='4' or @code='e']">
700 <span class="relatorcode">
701 <xsl:text> [</xsl:text>
703 <xsl:when test="marc:subfield[@code='e']">
704 <xsl:for-each select="marc:subfield[@code='e']">
705 <xsl:value-of select="."/>
706 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
710 <xsl:for-each select="marc:subfield[@code='4']">
711 <xsl:value-of select="."/>
712 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
716 <xsl:text>]</xsl:text>
720 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
726 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
727 <xsl:if test="marc:datafield[@tag=700][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=710][@ind2=2 and not(marc:subfield[@code='i'])] or marc:datafield[@tag=711][@ind2=2 and not(marc:subfield[@code='i'])]">
728 <span class="results_summary contained_works"><span class="label">Contained works: </span>
729 <xsl:for-each select="marc:datafield[@tag=700][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=710][@ind2=2][not(marc:subfield[@code='i'])] | marc:datafield[@tag=711][@ind2=2][not(marc:subfield[@code='i'])]">
730 <xsl:variable name="str">
731 <xsl:call-template name="subfieldSelect">
732 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
735 <xsl:call-template name="chopPunctuation">
736 <xsl:with-param name="chopString">
737 <xsl:value-of select="$str"/>
740 <!-- add relator code too between brackets-->
741 <xsl:if test="marc:subfield[@code='4' or @code='e']">
742 <span class="relatorcode">
743 <xsl:text> [</xsl:text>
745 <xsl:when test="marc:subfield[@code='e']">
746 <xsl:for-each select="marc:subfield[@code='e']">
747 <xsl:value-of select="."/>
748 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
752 <xsl:for-each select="marc:subfield[@code='4']">
753 <xsl:value-of select="."/>
754 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
758 <xsl:text>]</xsl:text>
762 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
768 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
769 <span class="results_summary subjects"><span class="label">Subject(s): </span>
770 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
771 <span property="keywords">
774 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
775 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
777 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
778 <xsl:when test="$TraceSubjectSubdivisions='1'">
779 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
780 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
781 <xsl:with-param name="delimeter"> AND </xsl:with-param>
782 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
783 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
784 <xsl:with-param name="urlencode">1</xsl:with-param>
788 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
790 <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="str:encode-uri(translate(marc:subfield[@code='a'],'()',''), true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
793 <xsl:call-template name="chopPunctuation">
794 <xsl:with-param name="chopString">
795 <xsl:call-template name="subfieldSelect">
796 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
797 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
798 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
804 <xsl:if test="marc:subfield[@code=9]">
806 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
807 <xsl:element name="img">
808 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
809 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
810 <xsl:attribute name="height">15</xsl:attribute>
811 <xsl:attribute name="width">15</xsl:attribute>
816 <xsl:when test="position()=last()"></xsl:when>
817 <xsl:otherwise> | </xsl:otherwise>
825 <xsl:if test="marc:datafield[@tag=655]">
826 <span class="results_summary genre"><span class="label">Genre/Form: </span>
827 <xsl:for-each select="marc:datafield[@tag=655]">
830 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
831 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
833 <xsl:when test="$TraceSubjectSubdivisions='1'">
834 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
835 <xsl:with-param name="codes">avxyz</xsl:with-param>
836 <xsl:with-param name="delimeter"> AND </xsl:with-param>
837 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
838 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
839 <xsl:with-param name="urlencode">1</xsl:with-param>
844 <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="str:encode-uri(marc:subfield[@code='a'], true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
847 <xsl:call-template name="subfieldSelect">
848 <xsl:with-param name="codes">avxyz</xsl:with-param>
849 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
850 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
853 <xsl:if test="marc:subfield[@code=9]">
854 <xsl:text> </xsl:text>
856 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
857 <xsl:element name="img">
858 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
859 <xsl:attribute name="alt"></xsl:attribute>
860 <xsl:attribute name="height">15</xsl:attribute>
861 <xsl:attribute name="width">15</xsl:attribute>
865 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
870 <!-- MARC21 776 Additional Physical Form Entry -->
871 <xsl:if test="marc:datafield[@tag=776]">
872 <span class="results_summary add_physical_form">
873 <span class="label">Additional physical formats: </span>
874 <xsl:for-each select="marc:datafield[@tag=776]">
875 <xsl:variable name="linktext">
877 <xsl:when test="marc:subfield[@code='t']">
878 <xsl:value-of select="marc:subfield[@code='t']"/>
880 <xsl:when test="marc:subfield[@code='a']">
881 <xsl:value-of select="marc:subfield[@code='a']"/>
884 <xsl:text>No title</xsl:text>
888 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
889 <xsl:call-template name="subfieldSelect">
890 <xsl:with-param name="codes">i</xsl:with-param>
892 <xsl:text>: </xsl:text>
895 <xsl:when test="marc:subfield[@code='w']">
897 <xsl:attribute name="href">
898 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
899 <xsl:call-template name="extractControlNumber">
900 <xsl:with-param name="subfieldW">
901 <xsl:value-of select="marc:subfield[@code='w']"/>
905 <xsl:value-of select="$linktext"/>
909 <xsl:value-of select="$linktext"/>
912 <xsl:if test="position() != last()">
913 <xsl:text>; </xsl:text>
919 <!-- DDC classification -->
920 <xsl:if test="marc:datafield[@tag=082]">
921 <span class="results_summary ddc">
922 <span class="label">DDC classification: </span>
923 <xsl:for-each select="marc:datafield[@tag=082]">
924 <xsl:call-template name="subfieldSelect">
925 <xsl:with-param name="codes">a</xsl:with-param>
926 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
929 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
930 <xsl:otherwise> | </xsl:otherwise>
936 <!-- Other classification -->
937 <xsl:if test="marc:datafield[@tag=084]">
938 <span class="results_summary oc">
939 <span class="label">Other classification: </span>
940 <xsl:for-each select="marc:datafield[@tag=084]">
941 <xsl:call-template name="subfieldSelect">
942 <xsl:with-param name="codes">a</xsl:with-param>
943 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
946 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
947 <xsl:otherwise> | </xsl:otherwise>
954 <!-- Image processing code added here, takes precedence over text links including y3z text -->
955 <xsl:if test="marc:datafield[@tag=856]">
956 <span class="results_summary online_resources"><span class="label">Online resources: </span>
957 <xsl:for-each select="marc:datafield[@tag=856]">
958 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
961 <xsl:when test="$OPACTrackClicks='track'">
962 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
964 <xsl:when test="$OPACTrackClicks='anonymous'">
965 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
968 <xsl:attribute name="href">
969 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
971 <xsl:when test="@ind1=7">
972 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
974 <xsl:when test="@ind1=1">
975 <xsl:text>ftp://</xsl:text>
978 <xsl:text>http://</xsl:text>
982 <xsl:value-of select="marc:subfield[@code='u']"/>
986 <xsl:if test="$OPACURLOpenInNewWindow='1'">
987 <xsl:attribute name="target">_blank</xsl:attribute>
990 <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')">
991 <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>
993 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
994 <xsl:call-template name="subfieldSelect">
995 <xsl:with-param name="codes">y3z</xsl:with-param>
998 <xsl:when test="$URLLinkText!=''">
999 <xsl:value-of select="$URLLinkText"/>
1002 <xsl:text>Click here to access online</xsl:text>
1007 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1008 <xsl:otherwise> | </xsl:otherwise>
1015 <xsl:if test="marc:datafield[@tag=530]">
1016 <xsl:for-each select="marc:datafield[@tag=530]">
1017 <span class="results_summary additionalforms">
1018 <xsl:call-template name="subfieldSelect">
1019 <xsl:with-param name="codes">abcd</xsl:with-param>
1020 </xsl:call-template>
1021 <xsl:for-each select="marc:subfield[@code='u']">
1022 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1023 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1024 <xsl:attribute name="target">_blank</xsl:attribute>
1026 <xsl:value-of select="text()"/>
1034 <xsl:if test="marc:datafield[@tag=505]">
1035 <div class="results_summary contents">
1036 <xsl:for-each select="marc:datafield[@tag=505]">
1037 <xsl:if test="position()=1">
1039 <xsl:when test="@ind1=1">
1040 <span class="label">Incomplete contents:</span>
1042 <xsl:when test="@ind1=2">
1043 <span class="label">Partial contents:</span>
1046 <span class="label">Contents:</span>
1050 <div class='contentblock' property='description'>
1052 <xsl:when test="@ind2=0">
1053 <xsl:call-template name="subfieldSelectSpan">
1054 <xsl:with-param name="codes">tru</xsl:with-param>
1055 </xsl:call-template>
1058 <xsl:call-template name="subfieldSelectSpan">
1059 <xsl:with-param name="codes">atru</xsl:with-param>
1060 </xsl:call-template>
1069 <xsl:if test="marc:datafield[@tag=583]">
1070 <xsl:for-each select="marc:datafield[@tag=583]">
1071 <xsl:if test="@ind1=1 or @ind1=' '">
1072 <span class="results_summary actionnote">
1073 <span class="label">Action note: </span>
1075 <xsl:when test="marc:subfield[@code='z']">
1076 <xsl:value-of select="marc:subfield[@code='z']"/>
1079 <xsl:call-template name="subfieldSelect">
1080 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1081 </xsl:call-template>
1090 <xsl:if test="marc:datafield[@tag=508]">
1091 <div class="results_summary prod_credits">
1092 <span class="label">Production Credits: </span>
1093 <xsl:for-each select="marc:datafield[@tag=508]">
1094 <xsl:call-template name="subfieldSelectSpan">
1095 <xsl:with-param name="codes">a</xsl:with-param>
1096 </xsl:call-template>
1097 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1103 <xsl:if test="marc:datafield[@tag=586]">
1104 <span class="results_summary awardsnote">
1105 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1106 <span class="label">Awards: </span>
1108 <xsl:for-each select="marc:datafield[@tag=586]">
1109 <xsl:value-of select="marc:subfield[@code='a']"/>
1110 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1116 <xsl:if test="marc:datafield[@tag=773]">
1117 <xsl:for-each select="marc:datafield[@tag=773]">
1118 <xsl:if test="@ind1 !=1">
1119 <span class="results_summary in"><span class="label">
1121 <xsl:when test="@ind2=' '">
1124 <xsl:when test="@ind2=8">
1125 <xsl:if test="marc:subfield[@code='i']">
1126 <xsl:value-of select="marc:subfield[@code='i']"/>
1131 <xsl:variable name="f773">
1132 <xsl:call-template name="chopPunctuation">
1133 <xsl:with-param name="chopString">
1134 <xsl:call-template name="subfieldSelect">
1135 <xsl:with-param name="codes">a_t</xsl:with-param>
1136 </xsl:call-template>
1138 </xsl:call-template>
1141 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1142 <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>
1143 <xsl:value-of select="translate($f773, '()', '')"/>
1146 <xsl:when test="marc:subfield[@code='0']">
1147 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:subfield[@code='0'], true())"/></xsl:attribute>
1148 <xsl:value-of select="$f773"/>
1152 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
1153 <xsl:value-of select="$f773"/>
1157 <xsl:if test="marc:subfield[@code='g']">
1158 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1162 <xsl:if test="marc:subfield[@code='n']">
1163 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1170 <xsl:for-each select="marc:datafield[@tag=511]">
1171 <span class="results_summary perf_note">
1172 <span class="label">
1173 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1175 <xsl:call-template name="subfieldSelect">
1176 <xsl:with-param name="codes">a</xsl:with-param>
1177 </xsl:call-template>
1181 <xsl:if test="marc:datafield[@tag=502]">
1182 <span class="results_summary diss_note">
1183 <span class="label">Dissertation note: </span>
1184 <xsl:for-each select="marc:datafield[@tag=502]">
1185 <xsl:call-template name="subfieldSelect">
1186 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1187 </xsl:call-template>
1189 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1193 <xsl:for-each select="marc:datafield[@tag=520]">
1194 <span class="results_summary summary"><span class="label">
1196 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1197 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1198 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1199 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1200 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1201 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1204 <xsl:call-template name="subfieldSelect">
1205 <xsl:with-param name="codes">abcu</xsl:with-param>
1206 </xsl:call-template>
1210 <!-- 866 textual holdings -->
1211 <xsl:if test="marc:datafield[@tag=866]">
1212 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1213 <xsl:for-each select="marc:datafield[@tag=866]">
1214 <span class="holdings_note_data">
1215 <xsl:call-template name="subfieldSelect">
1216 <xsl:with-param name="codes">az</xsl:with-param>
1217 </xsl:call-template>
1218 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1224 <!-- 867 textual holdings -->
1225 <xsl:if test="marc:datafield[@tag=867]">
1226 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1227 <xsl:for-each select="marc:datafield[@tag=867]">
1228 <span class="holdings_note_data">
1229 <xsl:call-template name="subfieldSelect">
1230 <xsl:with-param name="codes">az</xsl:with-param>
1231 </xsl:call-template>
1232 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1238 <!-- 868 textual holdings -->
1239 <xsl:if test="marc:datafield[@tag=868]">
1240 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1241 <xsl:for-each select="marc:datafield[@tag=868]">
1242 <span class="holdings_note_data">
1243 <xsl:call-template name="subfieldSelect">
1244 <xsl:with-param name="codes">az</xsl:with-param>
1245 </xsl:call-template>
1246 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1252 <!-- 775 Other Edition -->
1253 <xsl:if test="marc:datafield[@tag=775]">
1254 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1255 <xsl:for-each select="marc:datafield[@tag=775]">
1256 <xsl:variable name="f775">
1257 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1258 <xsl:with-param name="codes">a_t</xsl:with-param>
1259 </xsl:call-template></xsl:with-param></xsl:call-template>
1261 <xsl:if test="marc:subfield[@code='i']">
1262 <xsl:call-template name="subfieldSelect">
1263 <xsl:with-param name="codes">i</xsl:with-param>
1264 </xsl:call-template>
1265 <xsl:text>: </xsl:text>
1269 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1270 <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>
1273 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f775, '()', ''), true())"/></xsl:attribute>
1276 <xsl:call-template name="subfieldSelect">
1277 <xsl:with-param name="codes">a_t</xsl:with-param>
1278 </xsl:call-template>
1281 <xsl:when test="position()=last()"></xsl:when>
1282 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1289 <xsl:if test="marc:datafield[@tag=780]">
1290 <xsl:for-each select="marc:datafield[@tag=780]">
1291 <xsl:if test="@ind1=0">
1292 <span class="results_summary preceeding_entry">
1294 <xsl:when test="@ind2=0">
1295 <span class="label">Continues:</span>
1297 <xsl:when test="@ind2=1">
1298 <span class="label">Continues in part:</span>
1300 <xsl:when test="@ind2=2">
1301 <span class="label">Supersedes:</span>
1303 <xsl:when test="@ind2=3">
1304 <span class="label">Supersedes in part:</span>
1306 <xsl:when test="@ind2=4">
1307 <span class="label">Formed by the union: ... and: ...</span>
1309 <xsl:when test="@ind2=5">
1310 <span class="label">Absorbed:</span>
1312 <xsl:when test="@ind2=6">
1313 <span class="label">Absorbed in part:</span>
1315 <xsl:when test="@ind2=7">
1316 <span class="label">Separated from:</span>
1319 <xsl:text> </xsl:text>
1320 <xsl:variable name="f780">
1321 <xsl:call-template name="subfieldSelect">
1322 <xsl:with-param name="codes">a_t</xsl:with-param>
1323 </xsl:call-template>
1326 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1327 <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>
1328 <xsl:value-of select="translate($f780, '()', '')"/>
1332 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
1333 <xsl:value-of select="translate($f780, '()', '')"/>
1339 <xsl:if test="marc:subfield[@code='n']">
1340 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1348 <xsl:if test="marc:datafield[@tag=785]">
1349 <xsl:for-each select="marc:datafield[@tag=785]">
1350 <xsl:if test="@ind1=0">
1351 <span class="results_summary succeeding_entry">
1353 <xsl:when test="@ind2=0">
1354 <span class="label">Continued by:</span>
1356 <xsl:when test="@ind2=1">
1357 <span class="label">Continued in part by:</span>
1359 <xsl:when test="@ind2=2">
1360 <span class="label">Superseded by:</span>
1362 <xsl:when test="@ind2=3">
1363 <span class="label">Superseded in part by:</span>
1365 <xsl:when test="@ind2=4">
1366 <span class="label">Absorbed by:</span>
1368 <xsl:when test="@ind2=5">
1369 <span class="label">Absorbed in part by:</span>
1371 <xsl:when test="@ind2=6">
1372 <span class="label">Split into .. and ...:</span>
1374 <xsl:when test="@ind2=7">
1375 <span class="label">Merged with ... to form ...</span>
1377 <xsl:when test="@ind2=8">
1378 <span class="label">Changed back to:</span>
1381 <xsl:text> </xsl:text>
1382 <xsl:variable name="f785">
1383 <xsl:call-template name="subfieldSelect">
1384 <xsl:with-param name="codes">a_t</xsl:with-param>
1385 </xsl:call-template>
1389 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1390 <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>
1391 <xsl:value-of select="translate($f785, '()', '')"/>
1395 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
1396 <xsl:value-of select="translate($f785, '()', '')"/>
1403 <xsl:if test="marc:subfield[@code='n']">
1404 <span class="results_summary succeeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1412 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
1413 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
1414 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
1415 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
1417 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
1418 <xsl:variable name="openurltext">
1420 <xsl:when test="$OpenURLText != ''">
1421 <xsl:value-of select="$OpenURLText" />
1424 <xsl:text>OpenURL</xsl:text>
1429 <span class="results_summary"><a>
1430 <xsl:attribute name="href">
1431 <xsl:value-of select="$OpenURLResolverURL" />
1433 <xsl:attribute name="title">
1434 <xsl:value-of select="$openurltext" />
1436 <xsl:attribute name="class">
1437 <xsl:text>OpenURL</xsl:text>
1439 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1440 <xsl:attribute name="target">
1441 <xsl:text>_blank</xsl:text>
1445 <xsl:when test="$OpenURLImageLocation != ''">
1447 <xsl:attribute name="src">
1448 <xsl:value-of select="$OpenURLImageLocation" />
1453 <xsl:value-of select="$openurltext" />
1458 <!-- End of OpenURL -->
1463 <xsl:template name="showAuthor">
1464 <xsl:param name="authorfield" />
1465 <xsl:param name="UseAuthoritiesForTracings" />
1466 <xsl:param name="materialTypeLabel" />
1467 <xsl:param name="theme" />
1468 <xsl:if test="count($authorfield)>0">
1470 <xsl:for-each select="$authorfield">
1472 <xsl:when test="position()>1"/>
1474 <xsl:when test="@tag<700">By: </xsl:when>
1475 <!--#13382 Changed Additional author to contributor -->
1476 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1479 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1480 <xsl:when test="marc:subfield[@code='n']">
1481 <xsl:text> </xsl:text>
1482 <xsl:call-template name="subfieldSelect">
1483 <xsl:with-param name="codes">n</xsl:with-param>
1484 </xsl:call-template>
1485 <xsl:text> </xsl:text>
1490 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1491 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/>"</xsl:attribute>
1494 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
1497 <span resource="#record"><span>
1499 <xsl:when test="substring(@tag, 1, 1)='1'">
1501 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1502 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1505 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1508 <xsl:when test="substring(@tag, 2, 1)='0'">
1510 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1511 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1514 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1516 <span property="name">
1518 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1520 <xsl:call-template name="chopPunctuation">
1521 <xsl:with-param name="chopString">
1522 <xsl:call-template name="subfieldSelect">
1523 <xsl:with-param name="codes">
1525 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1526 <xsl:when test="@tag=111">aeq</xsl:when>
1527 <xsl:when test="@tag=110">ab</xsl:when>
1528 <xsl:otherwise>abcjq</xsl:otherwise>
1531 </xsl:call-template>
1533 <xsl:with-param name="punctuation">
1534 <xsl:text>:,;/ </xsl:text>
1536 </xsl:call-template>
1537 <!-- Display only name and title portion in 110 field -->
1538 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1539 <span class="titleportion">
1541 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1542 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1544 <xsl:call-template name="chopPunctuation">
1545 <xsl:with-param name="chopString">
1546 <xsl:call-template name="subfieldSelect">
1547 <xsl:with-param name="codes">cdnt</xsl:with-param>
1548 </xsl:call-template>
1550 </xsl:call-template>
1553 <!-- Display only name and title portion in 111 field -->
1554 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1555 <span class="titleportion">
1557 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1558 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1561 <xsl:call-template name="chopPunctuation">
1562 <xsl:with-param name="chopString">
1563 <xsl:call-template name="subfieldSelect">
1564 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1565 </xsl:call-template>
1567 </xsl:call-template>
1570 <!-- Display only dates in 100 field -->
1571 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1572 <span class="authordates">
1573 <xsl:text>, </xsl:text>
1574 <xsl:call-template name="chopPunctuation">
1575 <xsl:with-param name="chopString">
1576 <xsl:call-template name="subfieldSelect">
1577 <xsl:with-param name="codes">d</xsl:with-param>
1578 </xsl:call-template>
1580 </xsl:call-template>
1584 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1585 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1586 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1587 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1588 <xsl:if test="@tag=710 or @tag=711">
1589 <xsl:call-template name="chopPunctuation">
1590 <xsl:with-param name="chopString">
1591 <xsl:call-template name="subfieldSelect">
1592 <xsl:with-param name="codes">
1594 <xsl:when test="@tag=711">aeq</xsl:when>
1595 <xsl:otherwise>ab</xsl:otherwise>
1598 </xsl:call-template>
1600 <xsl:with-param name="punctuation">
1601 <xsl:text>:,;/ </xsl:text>
1603 </xsl:call-template>
1604 <!-- Display only name and title portion in 711 field -->
1605 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1606 <span class="titleportion">
1608 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='g' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1609 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1612 <xsl:call-template name="chopPunctuation">
1613 <xsl:with-param name="chopString">
1614 <xsl:call-template name="subfieldSelect">
1615 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1616 </xsl:call-template>
1618 </xsl:call-template>
1621 <!-- Display only name and title portion in 710 field -->
1622 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1623 <span class="titleportion">
1625 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1626 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1628 <xsl:call-template name="chopPunctuation">
1629 <xsl:with-param name="chopString">
1630 <xsl:call-template name="subfieldSelect">
1631 <xsl:with-param name="codes">cdnt</xsl:with-param>
1632 </xsl:call-template>
1634 </xsl:call-template>
1639 <!-- Display only name portion in 700 field -->
1640 <xsl:if test="@tag=700">
1641 <xsl:call-template name="chopPunctuation">
1642 <xsl:with-param name="chopString">
1643 <xsl:call-template name="subfieldSelect">
1644 <xsl:with-param name="codes">abcq</xsl:with-param>
1645 </xsl:call-template>
1647 </xsl:call-template>
1649 <!-- Display class "authordates" in 700 field -->
1650 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1651 <span class="authordates">
1652 <xsl:text>, </xsl:text>
1653 <xsl:call-template name="chopPunctuation">
1654 <xsl:with-param name="chopString">
1655 <xsl:call-template name="subfieldSelect">
1656 <xsl:with-param name="codes">d</xsl:with-param>
1657 </xsl:call-template>
1659 </xsl:call-template>
1662 <!-- Display class "titleportion" in 700 field -->
1663 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1664 <xsl:if test="@tag=700 and $titleportionfields">
1665 <span class="titleportion">
1666 <xsl:text>. </xsl:text>
1667 <xsl:call-template name="chopPunctuation">
1668 <xsl:with-param name="chopString">
1669 <xsl:call-template name="subfieldSelect">
1670 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1671 </xsl:call-template>
1673 </xsl:call-template>
1679 </span></span></span>
1681 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1682 <xsl:if test="(@tag!=111 and @tag!=711 and marc:subfield[@code='4' or @code='e']) or ((@tag=111 or @tag=711) and marc:subfield[@code='4' or @code='j'])">
1684 <span class="relatorcode">
1685 <xsl:text> [</xsl:text>
1687 <xsl:when test="@tag=111 or @tag=711">
1689 <!-- Prefer j over 4 for 111 and 711 -->
1690 <xsl:when test="marc:subfield[@code='j']">
1691 <xsl:for-each select="marc:subfield[@code='j']">
1692 <xsl:value-of select="."/>
1693 <xsl:if test="position() != last()">, </xsl:if>
1697 <xsl:for-each select="marc:subfield[@code=4]">
1698 <xsl:value-of select="."/>
1699 <xsl:if test="position() != last()">, </xsl:if>
1704 <!-- Prefer e over 4 on 100 and 110-->
1705 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1706 <xsl:for-each select="marc:subfield[@code='e']">
1707 <xsl:value-of select="."/>
1708 <xsl:if test="position() != last()">, </xsl:if>
1712 <xsl:for-each select="marc:subfield[@code=4]">
1713 <xsl:value-of select="."/>
1714 <xsl:if test="position() != last()">, </xsl:if>
1718 <xsl:text>]</xsl:text>
1722 <xsl:if test="marc:subfield[@code=9]">
1723 <a class='authlink'>
1724 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
1725 <xsl:element name="img">
1726 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
1727 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
1728 <xsl:attribute name="height">15</xsl:attribute>
1729 <xsl:attribute name="width">15</xsl:attribute>
1734 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1741 <xsl:template name="nameABCQ">
1742 <xsl:call-template name="chopPunctuation">
1743 <xsl:with-param name="chopString">
1744 <xsl:call-template name="subfieldSelect">
1745 <xsl:with-param name="codes">abcq</xsl:with-param>
1746 </xsl:call-template>
1748 <xsl:with-param name="punctuation">
1749 <xsl:text>:,;/ </xsl:text>
1751 </xsl:call-template>
1754 <xsl:template name="nameABCDN">
1755 <xsl:call-template name="chopPunctuation">
1756 <xsl:with-param name="chopString">
1757 <xsl:call-template name="subfieldSelect">
1758 <xsl:with-param name="codes">abcdn</xsl:with-param>
1759 </xsl:call-template>
1761 <xsl:with-param name="punctuation">
1762 <xsl:text>:,;/ </xsl:text>
1764 </xsl:call-template>
1767 <xsl:template name="nameACDEQ">
1768 <xsl:call-template name="subfieldSelect">
1769 <xsl:with-param name="codes">acdeq</xsl:with-param>
1770 </xsl:call-template>
1773 <xsl:template name="part">
1774 <xsl:variable name="partNumber">
1775 <xsl:call-template name="specialSubfieldSelect">
1776 <xsl:with-param name="axis">n</xsl:with-param>
1777 <xsl:with-param name="anyCodes">n</xsl:with-param>
1778 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1779 </xsl:call-template>
1781 <xsl:variable name="partName">
1782 <xsl:call-template name="specialSubfieldSelect">
1783 <xsl:with-param name="axis">p</xsl:with-param>
1784 <xsl:with-param name="anyCodes">p</xsl:with-param>
1785 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1786 </xsl:call-template>
1788 <xsl:if test="string-length(normalize-space($partNumber))">
1789 <xsl:call-template name="chopPunctuation">
1790 <xsl:with-param name="chopString" select="$partNumber"/>
1791 </xsl:call-template>
1793 <xsl:if test="string-length(normalize-space($partName))">
1794 <xsl:call-template name="chopPunctuation">
1795 <xsl:with-param name="chopString" select="$partName"/>
1796 </xsl:call-template>
1800 <xsl:template name="specialSubfieldSelect">
1801 <xsl:param name="anyCodes"/>
1802 <xsl:param name="axis"/>
1803 <xsl:param name="beforeCodes"/>
1804 <xsl:param name="afterCodes"/>
1805 <xsl:variable name="str">
1806 <xsl:for-each select="marc:subfield">
1807 <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])">
1808 <xsl:value-of select="text()"/>
1809 <xsl:text> </xsl:text>
1813 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1816 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1817 <xsl:template name="subfieldSelectSubject">
1818 <xsl:param name="codes"/>
1819 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1820 <xsl:param name="subdivCodes"/>
1821 <xsl:param name="subdivDelimiter"/>
1822 <xsl:param name="prefix"/>
1823 <xsl:param name="suffix"/>
1824 <xsl:param name="urlencode"/>
1825 <xsl:variable name="str">
1826 <xsl:for-each select="marc:subfield">
1827 <xsl:if test="contains($codes, @code)">
1828 <xsl:if test="contains($subdivCodes, @code)">
1829 <xsl:value-of select="$subdivDelimiter"/>
1831 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1836 <xsl:when test="$urlencode=1">
1837 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1840 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>