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' or $leader6='k' or $leader6='r'">VM</xsl:when>
67 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
68 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
71 <xsl:variable name="materialTypeLabel">
73 <xsl:when test="$leader19='a'">Set</xsl:when>
74 <xsl:when test="$leader6='a'">
76 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
77 <xsl:when test="$leader7='i' or $leader7='s'">
79 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
80 <xsl:otherwise>Series</xsl:otherwise>
83 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
86 <xsl:when test="$leader6='t'">Book</xsl:when>
87 <xsl:when test="$leader6='o'">Kit</xsl:when>
88 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
89 <xsl:when test="$leader6='m'">Computer file</xsl:when>
90 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
91 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
92 <xsl:when test="$leader6='j'">Music</xsl:when>
93 <xsl:when test="$leader6='i'">Sound</xsl:when>
94 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
98 <!-- Schema.org type -->
99 <xsl:variable name="schemaOrgType">
101 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
102 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
103 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
104 <xsl:otherwise>CreativeWork</xsl:otherwise>
108 <!-- Wrapper div for our schema.org object -->
109 <xsl:element name="div">
110 <xsl:attribute name="class">record</xsl:attribute>
111 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
112 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
113 <xsl:attribute name="resource">#record</xsl:attribute>
115 <!-- Title Statement -->
116 <!-- Alternate Graphic Representation (MARC 880) -->
117 <xsl:if test="$display880">
118 <h1 class="title" property="alternateName">
119 <xsl:call-template name="m880Select">
120 <xsl:with-param name="basetags">245</xsl:with-param>
121 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
127 <xsl:if test="marc:datafield[@tag=245]">
128 <h1 class="title" property="name">
129 <xsl:for-each select="marc:datafield[@tag=245]">
130 <xsl:call-template name="subfieldSelect">
131 <xsl:with-param name="codes">a</xsl:with-param>
133 <xsl:text> </xsl:text>
134 <!-- 13381 add additional subfields-->
135 <!-- bug17625 adding f and g subfields -->
136 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
138 <xsl:when test="@code='h'">
139 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
140 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
142 <xsl:when test="@code='c'">
143 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
144 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
147 <xsl:apply-templates/>
148 <xsl:text> </xsl:text>
157 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
158 <xsl:if test="$display880">
160 <xsl:call-template name="m880Select">
161 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
162 <xsl:with-param name="codes">abc</xsl:with-param>
163 <xsl:with-param name="index">au</xsl:with-param>
164 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
169 <!--#13382 Added Author Statement to separate Authors and Contributors -->
170 <xsl:call-template name="showAuthor">
171 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=100 or @tag=110 or @tag=111)]"/>
172 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
173 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
174 <xsl:with-param name="theme" select="$theme"/>
177 <xsl:call-template name="showAuthor">
178 <!-- #13382 suppress 700$i and 7xx/@ind2=2 -->
179 <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'])]"/>
180 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
181 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
182 <xsl:with-param name="theme" select="$theme"/>
185 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
186 <xsl:if test="$materialTypeCode!=''">
187 <span class="results_summary type"><span class="label">Material type: </span>
188 <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>
189 <xsl:value-of select="$materialTypeLabel"/>
194 <!--Series: Alternate Graphic Representation (MARC 880) -->
195 <xsl:if test="$display880">
196 <xsl:call-template name="m880Select">
197 <xsl:with-param name="basetags">440,490</xsl:with-param>
198 <xsl:with-param name="codes">av</xsl:with-param>
199 <xsl:with-param name="class">results_summary series</xsl:with-param>
200 <xsl:with-param name="label">Series: </xsl:with-param>
201 <xsl:with-param name="index">se</xsl:with-param>
206 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
207 <span class="results_summary series"><span class="label">Series: </span>
209 <xsl:for-each select="marc:datafield[@tag=440]">
210 <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>
211 <xsl:call-template name="chopPunctuation">
212 <xsl:with-param name="chopString">
213 <xsl:call-template name="subfieldSelect">
214 <xsl:with-param name="codes">av</xsl:with-param>
219 <xsl:call-template name="part"/>
220 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
223 <!-- 490 Series not traced, Ind1 = 0 -->
224 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
225 <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>
226 <xsl:call-template name="chopPunctuation">
227 <xsl:with-param name="chopString">
228 <xsl:call-template name="subfieldSelect">
229 <xsl:with-param name="codes">av</xsl:with-param>
234 <xsl:call-template name="part"/>
235 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
237 <!-- 490 Series traced, Ind1 = 1 -->
238 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
239 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
241 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
242 <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>
243 <xsl:call-template name="chopPunctuation">
244 <xsl:with-param name="chopString">
245 <xsl:call-template name="subfieldSelect">
246 <xsl:with-param name="codes">a_t</xsl:with-param>
253 <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>
254 <xsl:call-template name="chopPunctuation">
255 <xsl:with-param name="chopString">
256 <xsl:call-template name="subfieldSelect">
257 <xsl:with-param name="codes">a_t</xsl:with-param>
262 <xsl:call-template name="part"/>
265 <xsl:text>: </xsl:text>
266 <xsl:value-of select="marc:subfield[@code='v']" />
267 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
274 <xsl:if test="$leader7='s'">
275 <span class="results_summary analytics"><span class="label">Analytics: </span>
278 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
279 <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>
282 <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>
285 <xsl:text>Show analytics</xsl:text>
290 <!-- Volumes of sets and traced series -->
291 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
292 <span class="results_summary volumes"><span class="label">Volumes: </span>
295 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
296 <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>
299 <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>
302 <xsl:text>Show volumes</xsl:text>
308 <xsl:if test="$leader19='c'">
309 <span class="results_summary set"><span class="label">Set: </span>
310 <xsl:for-each select="marc:datafield[@tag=773]">
313 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
314 <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>
317 <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>
320 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
323 <xsl:when test="position()=last()"></xsl:when>
324 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
330 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
331 <xsl:if test="$display880">
332 <xsl:call-template name="m880Select">
333 <xsl:with-param name="basetags">260</xsl:with-param>
334 <xsl:with-param name="codes">abcg</xsl:with-param>
335 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
336 <xsl:with-param name="label">Publisher: </xsl:with-param>
340 <!-- Publisher info and RDA related info from tags 260, 264 -->
342 <xsl:when test="marc:datafield[@tag=264]">
343 <xsl:call-template name="showRDAtag264">
344 <xsl:with-param name="show_url">1</xsl:with-param>
347 <xsl:when test="marc:datafield[@tag=260]">
348 <span class="results_summary publisher"><span class="label">Publisher: </span>
349 <xsl:for-each select="marc:datafield[@tag=260]">
350 <span property="publisher" typeof="Organization">
351 <xsl:if test="marc:subfield[@code='a']">
352 <span property="location">
353 <xsl:call-template name="subfieldSelect">
354 <xsl:with-param name="codes">a</xsl:with-param>
358 <xsl:text> </xsl:text>
359 <xsl:if test="marc:subfield[@code='b']">
360 <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>
361 <xsl:call-template name="subfieldSelect">
362 <xsl:with-param name="codes">b</xsl:with-param>
367 <xsl:text> </xsl:text>
368 <xsl:if test="marc:subfield[@code='c' or @code='g']">
369 <span property="datePublished">
370 <xsl:call-template name="chopPunctuation">
371 <xsl:with-param name="chopString">
372 <xsl:call-template name="subfieldSelect">
373 <xsl:with-param name="codes">cg</xsl:with-param>
379 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
385 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
386 <xsl:if test="$display880">
387 <xsl:call-template name="m880Select">
388 <xsl:with-param name="basetags">250</xsl:with-param>
389 <xsl:with-param name="codes">ab</xsl:with-param>
390 <xsl:with-param name="class">results_summary edition</xsl:with-param>
391 <xsl:with-param name="label">Edition: </xsl:with-param>
395 <xsl:if test="marc:datafield[@tag=250]">
396 <span class="results_summary edition"><span class="label">Edition: </span>
397 <xsl:for-each select="marc:datafield[@tag=250]">
398 <span property="bookEdition">
399 <xsl:call-template name="chopPunctuation">
400 <xsl:with-param name="chopString">
401 <xsl:call-template name="subfieldSelect">
402 <xsl:with-param name="codes">ab</xsl:with-param>
407 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
412 <!-- Description: Alternate Graphic Representation (MARC 880) -->
413 <xsl:if test="$display880">
414 <xsl:call-template name="m880Select">
415 <xsl:with-param name="basetags">300</xsl:with-param>
416 <xsl:with-param name="codes">abceg</xsl:with-param>
417 <xsl:with-param name="class">results_summary description</xsl:with-param>
418 <xsl:with-param name="label">Description: </xsl:with-param>
422 <xsl:if test="marc:datafield[@tag=300]">
423 <span class="results_summary description"><span class="label">Description: </span>
424 <xsl:for-each select="marc:datafield[@tag=300]">
425 <span property="description">
426 <xsl:call-template name="chopPunctuation">
427 <xsl:with-param name="chopString">
428 <xsl:call-template name="subfieldSelect">
429 <xsl:with-param name="codes">abcefg</xsl:with-param>
434 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
440 <!-- Content Type -->
441 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
442 <span class="results_summary" id="content_type">
443 <xsl:if test="marc:datafield[@tag=336]">
444 <span class="label">Content type: </span>
445 <xsl:for-each select="marc:datafield[@tag=336]">
446 <xsl:call-template name="subfieldSelect">
447 <xsl:with-param name="codes">a</xsl:with-param>
448 <xsl:with-param name="delimeter">, </xsl:with-param>
450 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
453 <xsl:text> </xsl:text>
455 <xsl:if test="marc:datafield[@tag=337]">
456 <span class="label">Media type: </span>
457 <xsl:for-each select="marc:datafield[@tag=337]">
458 <xsl:call-template name="subfieldSelect">
459 <xsl:with-param name="codes">a</xsl:with-param>
460 <xsl:with-param name="delimeter">, </xsl:with-param>
462 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
465 <xsl:text> </xsl:text>
467 <xsl:if test="marc:datafield[@tag=338]">
468 <span class="label">Carrier type: </span>
469 <xsl:for-each select="marc:datafield[@tag=338]">
470 <xsl:call-template name="subfieldSelect">
471 <xsl:with-param name="codes">a</xsl:with-param>
472 <xsl:with-param name="delimeter">, </xsl:with-param>
474 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
482 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
483 <span class="results_summary isbn"><span class="label">ISBN: </span>
484 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
485 <span property="isbn">
486 <xsl:value-of select="."/>
488 <xsl:when test="position()=last()">
489 <xsl:text>.</xsl:text>
492 <xsl:text>; </xsl:text>
501 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
502 <span class="results_summary issn"><span class="label">ISSN: </span>
503 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
504 <span property="issn">
505 <xsl:value-of select="."/>
507 <xsl:when test="position()=last()">
508 <xsl:text>.</xsl:text>
511 <xsl:text>; </xsl:text>
519 <xsl:if test="marc:datafield[@tag=013]">
520 <span class="results_summary patent_info">
521 <span class="label">Patent information: </span>
522 <xsl:for-each select="marc:datafield[@tag=013]">
523 <xsl:call-template name="subfieldSelect">
524 <xsl:with-param name="codes">acdef</xsl:with-param>
525 <xsl:with-param name="delimeter">, </xsl:with-param>
527 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
532 <xsl:if test="marc:datafield[@tag=088]">
533 <span class="results_summary report_number">
534 <span class="label">Report number: </span>
535 <xsl:for-each select="marc:datafield[@tag=088]">
536 <xsl:call-template name="subfieldSelect">
537 <xsl:with-param name="codes">a</xsl:with-param>
539 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
544 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
545 <xsl:if test="$display880">
546 <xsl:call-template name="m880Select">
547 <xsl:with-param name="basetags">246</xsl:with-param>
548 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
549 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
550 <xsl:with-param name="label">Other title: </xsl:with-param>
554 <xsl:if test="marc:datafield[@tag=246]">
555 <span class="results_summary other_title"><span class="label">Other title: </span>
556 <xsl:for-each select="marc:datafield[@tag=246]">
557 <span property="alternateName">
558 <xsl:call-template name="chopPunctuation">
559 <xsl:with-param name="chopString">
560 <xsl:call-template name="subfieldSelect">
561 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
565 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
567 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
568 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
569 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
570 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
571 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
572 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
573 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
574 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
575 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
578 <xsl:if test="marc:subfield[@code='i']">
579 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
582 <!-- #13386 added separator | -->
583 <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>
589 <xsl:if test="marc:datafield[@tag=242]">
590 <span class="results_summary translated_title"><span class="label">Title translated: </span>
591 <xsl:for-each select="marc:datafield[@tag=242]">
592 <span property="alternateName">
593 <xsl:call-template name="chopPunctuation">
594 <xsl:with-param name="chopString">
595 <xsl:call-template name="subfieldSelect">
596 <xsl:with-param name="codes">abchnp</xsl:with-param>
601 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
606 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
607 <xsl:if test="$display880">
608 <span property="alternateName">
609 <xsl:call-template name="m880Select">
610 <xsl:with-param name="basetags">130,240</xsl:with-param>
611 <xsl:with-param name="codes">adfklmor</xsl:with-param>
612 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
613 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
618 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
619 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
620 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
621 <span property="alternateName">
622 <xsl:for-each select="marc:subfield">
623 <xsl:if test="contains('adfghklmnoprst',@code)">
624 <xsl:value-of select="text()"/>
625 <xsl:text> </xsl:text>
629 <xsl:if test="position() != last()">
630 <span class="separator"><xsl:text> | </xsl:text></span>
637 <!-- #13382 Added Related works 700$i -->
638 <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']]">
639 <span class="results_summary related_works"><span class="label">Related works: </span>
640 <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']]">
641 <xsl:variable name="str">
642 <xsl:call-template name="subfieldSelect">
643 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
646 <xsl:call-template name="chopPunctuation">
647 <xsl:with-param name="chopString">
648 <xsl:value-of select="$str"/>
651 <!-- add relator code too between brackets-->
652 <xsl:if test="marc:subfield[@code='4' or @code='e']">
653 <span class="relatorcode">
654 <xsl:text> [</xsl:text>
656 <xsl:when test="marc:subfield[@code='e']">
657 <xsl:for-each select="marc:subfield[@code='e']">
658 <xsl:value-of select="."/>
659 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
663 <xsl:for-each select="marc:subfield[@code='4']">
664 <xsl:value-of select="."/>
665 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
669 <xsl:text>]</xsl:text>
673 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
679 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
680 <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'])]">
681 <span class="results_summary contained_works"><span class="label">Contained works: </span>
682 <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'])]">
683 <xsl:variable name="str">
684 <xsl:call-template name="subfieldSelect">
685 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
688 <xsl:call-template name="chopPunctuation">
689 <xsl:with-param name="chopString">
690 <xsl:value-of select="$str"/>
693 <!-- add relator code too between brackets-->
694 <xsl:if test="marc:subfield[@code='4' or @code='e']">
695 <span class="relatorcode">
696 <xsl:text> [</xsl:text>
698 <xsl:when test="marc:subfield[@code='e']">
699 <xsl:for-each select="marc:subfield[@code='e']">
700 <xsl:value-of select="."/>
701 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
705 <xsl:for-each select="marc:subfield[@code='4']">
706 <xsl:value-of select="."/>
707 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
711 <xsl:text>]</xsl:text>
715 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
721 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
722 <span class="results_summary subjects"><span class="label">Subject(s): </span>
723 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
724 <span property="keywords">
727 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
728 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
730 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
731 <xsl:when test="$TraceSubjectSubdivisions='1'">
732 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
733 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
734 <xsl:with-param name="delimeter"> AND </xsl:with-param>
735 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
736 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
737 <xsl:with-param name="urlencode">1</xsl:with-param>
741 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
743 <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>
746 <xsl:call-template name="chopPunctuation">
747 <xsl:with-param name="chopString">
748 <xsl:call-template name="subfieldSelect">
749 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
750 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
751 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
757 <xsl:if test="marc:subfield[@code=9]">
759 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
760 <xsl:element name="img">
761 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
762 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
763 <xsl:attribute name="height">15</xsl:attribute>
764 <xsl:attribute name="width">15</xsl:attribute>
769 <xsl:when test="position()=last()"></xsl:when>
770 <xsl:otherwise> | </xsl:otherwise>
778 <xsl:if test="marc:datafield[@tag=655]">
779 <span class="results_summary genre"><span class="label">Genre/Form: </span>
780 <xsl:for-each select="marc:datafield[@tag=655]">
783 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
784 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
786 <xsl:when test="$TraceSubjectSubdivisions='1'">
787 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
788 <xsl:with-param name="codes">avxyz</xsl:with-param>
789 <xsl:with-param name="delimeter"> AND </xsl:with-param>
790 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
791 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
792 <xsl:with-param name="urlencode">1</xsl:with-param>
797 <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>
800 <xsl:call-template name="subfieldSelect">
801 <xsl:with-param name="codes">avxyz</xsl:with-param>
802 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
803 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
806 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
811 <!-- MARC21 776 Additional Physical Form Entry -->
812 <xsl:if test="marc:datafield[@tag=776]">
813 <span class="results_summary add_physical_form">
814 <span class="label">Additional physical formats: </span>
815 <xsl:for-each select="marc:datafield[@tag=776]">
816 <xsl:variable name="linktext">
818 <xsl:when test="marc:subfield[@code='t']">
819 <xsl:value-of select="marc:subfield[@code='t']"/>
821 <xsl:when test="marc:subfield[@code='a']">
822 <xsl:value-of select="marc:subfield[@code='a']"/>
825 <xsl:text>No title</xsl:text>
829 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
830 <xsl:call-template name="subfieldSelect">
831 <xsl:with-param name="codes">i</xsl:with-param>
833 <xsl:text>: </xsl:text>
836 <xsl:when test="marc:subfield[@code='w']">
838 <xsl:attribute name="href">
839 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
840 <xsl:call-template name="extractControlNumber">
841 <xsl:with-param name="subfieldW">
842 <xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/>
846 <xsl:value-of select="$linktext"/>
850 <xsl:value-of select="$linktext"/>
853 <xsl:if test="position() != last()">
854 <xsl:text>; </xsl:text>
860 <!-- DDC classification -->
861 <xsl:if test="marc:datafield[@tag=082]">
862 <span class="results_summary ddc">
863 <span class="label">DDC classification: </span>
864 <xsl:for-each select="marc:datafield[@tag=082]">
865 <xsl:call-template name="subfieldSelect">
866 <xsl:with-param name="codes">a</xsl:with-param>
867 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
870 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
871 <xsl:otherwise> | </xsl:otherwise>
877 <!-- Other classification -->
878 <xsl:if test="marc:datafield[@tag=084]">
879 <span class="results_summary oc">
880 <span class="label">Other classification: </span>
881 <xsl:for-each select="marc:datafield[@tag=084]">
882 <xsl:call-template name="subfieldSelect">
883 <xsl:with-param name="codes">a</xsl:with-param>
884 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
887 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
888 <xsl:otherwise> | </xsl:otherwise>
895 <!-- Image processing code added here, takes precedence over text links including y3z text -->
896 <xsl:if test="marc:datafield[@tag=856]">
897 <span class="results_summary online_resources"><span class="label">Online resources: </span>
898 <xsl:for-each select="marc:datafield[@tag=856]">
899 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
902 <xsl:when test="$OPACTrackClicks='track'">
903 <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>
905 <xsl:when test="$OPACTrackClicks='anonymous'">
906 <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>
909 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
912 <xsl:if test="$OPACURLOpenInNewWindow='1'">
913 <xsl:attribute name="target">_blank</xsl:attribute>
916 <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')">
917 <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>
919 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
920 <xsl:call-template name="subfieldSelect">
921 <xsl:with-param name="codes">y3z</xsl:with-param>
924 <xsl:when test="$URLLinkText!=''">
925 <xsl:value-of select="$URLLinkText"/>
928 <xsl:text>Click here to access online</xsl:text>
933 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
934 <xsl:otherwise> | </xsl:otherwise>
941 <xsl:if test="marc:datafield[@tag=530]">
942 <xsl:for-each select="marc:datafield[@tag=530]">
943 <span class="results_summary additionalforms">
944 <xsl:call-template name="subfieldSelect">
945 <xsl:with-param name="codes">abcd</xsl:with-param>
947 <xsl:for-each select="marc:subfield[@code='u']">
948 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
949 <xsl:if test="$OPACURLOpenInNewWindow='1'">
950 <xsl:attribute name="target">_blank</xsl:attribute>
952 <xsl:value-of select="text()"/>
960 <xsl:if test="marc:datafield[@tag=505]">
961 <div class="results_summary contents">
962 <xsl:for-each select="marc:datafield[@tag=505]">
963 <xsl:if test="position()=1">
965 <xsl:when test="@ind1=1">
966 <span class="label">Incomplete contents:</span>
968 <xsl:when test="@ind1=2">
969 <span class="label">Partial contents:</span>
972 <span class="label">Contents:</span>
976 <div class='contentblock' property='description'>
978 <xsl:when test="@ind2=0">
979 <xsl:call-template name="subfieldSelectSpan">
980 <xsl:with-param name="codes">tru</xsl:with-param>
984 <xsl:call-template name="subfieldSelectSpan">
985 <xsl:with-param name="codes">atru</xsl:with-param>
995 <xsl:if test="marc:datafield[@tag=583]">
996 <xsl:for-each select="marc:datafield[@tag=583]">
997 <xsl:if test="@ind1=1 or @ind1=' '">
998 <span class="results_summary actionnote">
999 <span class="label">Action note: </span>
1001 <xsl:when test="marc:subfield[@code='z']">
1002 <xsl:value-of select="marc:subfield[@code='z']"/>
1005 <xsl:call-template name="subfieldSelect">
1006 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1007 </xsl:call-template>
1016 <xsl:if test="marc:datafield[@tag=508]">
1017 <div class="results_summary prod_credits">
1018 <span class="label">Production Credits: </span>
1019 <xsl:for-each select="marc:datafield[@tag=508]">
1020 <xsl:call-template name="subfieldSelectSpan">
1021 <xsl:with-param name="codes">a</xsl:with-param>
1022 </xsl:call-template>
1023 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1029 <xsl:if test="marc:datafield[@tag=586]">
1030 <span class="results_summary awardsnote">
1031 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1032 <span class="label">Awards: </span>
1034 <xsl:for-each select="marc:datafield[@tag=586]">
1035 <xsl:value-of select="marc:subfield[@code='a']"/>
1036 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1042 <xsl:if test="marc:datafield[@tag=773]">
1043 <xsl:for-each select="marc:datafield[@tag=773]">
1044 <xsl:if test="@ind1 !=1">
1045 <span class="results_summary in"><span class="label">
1047 <xsl:when test="@ind2=' '">
1050 <xsl:when test="@ind2=8">
1051 <xsl:if test="marc:subfield[@code='i']">
1052 <xsl:value-of select="marc:subfield[@code='i']"/>
1057 <xsl:variable name="f773">
1058 <xsl:call-template name="chopPunctuation">
1059 <xsl:with-param name="chopString">
1060 <xsl:call-template name="subfieldSelect">
1061 <xsl:with-param name="codes">a_t</xsl:with-param>
1062 </xsl:call-template>
1064 </xsl:call-template>
1067 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1068 <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>
1069 <xsl:value-of select="translate($f773, '()', '')"/>
1072 <xsl:when test="marc:subfield[@code='0']">
1073 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
1074 <xsl:value-of select="$f773"/>
1078 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
1079 <xsl:value-of select="$f773"/>
1083 <xsl:if test="marc:subfield[@code='g']">
1084 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1088 <xsl:if test="marc:subfield[@code='n']">
1089 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1096 <xsl:for-each select="marc:datafield[@tag=511]">
1097 <span class="results_summary perf_note">
1098 <span class="label">
1099 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1101 <xsl:call-template name="subfieldSelect">
1102 <xsl:with-param name="codes">a</xsl:with-param>
1103 </xsl:call-template>
1107 <xsl:if test="marc:datafield[@tag=502]">
1108 <span class="results_summary diss_note">
1109 <span class="label">Dissertation note: </span>
1110 <xsl:for-each select="marc:datafield[@tag=502]">
1111 <xsl:call-template name="subfieldSelect">
1112 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1113 </xsl:call-template>
1115 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1119 <xsl:for-each select="marc:datafield[@tag=520]">
1120 <span class="results_summary summary"><span class="label">
1122 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1123 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1124 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1125 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1126 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1127 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1130 <xsl:call-template name="subfieldSelect">
1131 <xsl:with-param name="codes">abcu</xsl:with-param>
1132 </xsl:call-template>
1136 <!-- 866 textual holdings -->
1137 <xsl:if test="marc:datafield[@tag=866]">
1138 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
1139 <xsl:for-each select="marc:datafield[@tag=866]">
1140 <xsl:call-template name="subfieldSelect">
1141 <xsl:with-param name="codes">az</xsl:with-param>
1142 </xsl:call-template>
1143 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1148 <!-- 775 Other Edition -->
1149 <xsl:if test="marc:datafield[@tag=775]">
1150 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1151 <xsl:for-each select="marc:datafield[@tag=775]">
1152 <xsl:variable name="f775">
1153 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1154 <xsl:with-param name="codes">a_t</xsl:with-param>
1155 </xsl:call-template></xsl:with-param></xsl:call-template>
1157 <xsl:if test="marc:subfield[@code='i']">
1158 <xsl:call-template name="subfieldSelect">
1159 <xsl:with-param name="codes">i</xsl:with-param>
1160 </xsl:call-template>
1161 <xsl:text>: </xsl:text>
1165 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1166 <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>
1169 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
1172 <xsl:call-template name="subfieldSelect">
1173 <xsl:with-param name="codes">a_t</xsl:with-param>
1174 </xsl:call-template>
1177 <xsl:when test="position()=last()"></xsl:when>
1178 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1185 <xsl:if test="marc:datafield[@tag=780]">
1186 <xsl:for-each select="marc:datafield[@tag=780]">
1187 <xsl:if test="@ind1=0">
1188 <span class="results_summary preceeding_entry">
1190 <xsl:when test="@ind2=0">
1191 <span class="label">Continues:</span>
1193 <xsl:when test="@ind2=1">
1194 <span class="label">Continues in part:</span>
1196 <xsl:when test="@ind2=2">
1197 <span class="label">Supersedes:</span>
1199 <xsl:when test="@ind2=3">
1200 <span class="label">Supersedes in part:</span>
1202 <xsl:when test="@ind2=4">
1203 <span class="label">Formed by the union: ... and: ...</span>
1205 <xsl:when test="@ind2=5">
1206 <span class="label">Absorbed:</span>
1208 <xsl:when test="@ind2=6">
1209 <span class="label">Absorbed in part:</span>
1211 <xsl:when test="@ind2=7">
1212 <span class="label">Separated from:</span>
1215 <xsl:text> </xsl:text>
1216 <xsl:variable name="f780">
1217 <xsl:call-template name="subfieldSelect">
1218 <xsl:with-param name="codes">a_t</xsl:with-param>
1219 </xsl:call-template>
1222 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1223 <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>
1224 <xsl:value-of select="translate($f780, '()', '')"/>
1228 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1229 <xsl:value-of select="translate($f780, '()', '')"/>
1235 <xsl:if test="marc:subfield[@code='n']">
1236 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1244 <xsl:if test="marc:datafield[@tag=785]">
1245 <xsl:for-each select="marc:datafield[@tag=785]">
1246 <xsl:if test="@ind1=0">
1247 <span class="results_summary succeeding_entry">
1249 <xsl:when test="@ind2=0">
1250 <span class="label">Continued by:</span>
1252 <xsl:when test="@ind2=1">
1253 <span class="label">Continued in part by:</span>
1255 <xsl:when test="@ind2=2">
1256 <span class="label">Superseded by:</span>
1258 <xsl:when test="@ind2=3">
1259 <span class="label">Superseded in part by:</span>
1261 <xsl:when test="@ind2=4">
1262 <span class="label">Absorbed by:</span>
1264 <xsl:when test="@ind2=5">
1265 <span class="label">Absorbed in part by:</span>
1267 <xsl:when test="@ind2=6">
1268 <span class="label">Split into .. and ...:</span>
1270 <xsl:when test="@ind2=7">
1271 <span class="label">Merged with ... to form ...</span>
1273 <xsl:when test="@ind2=8">
1274 <span class="label">Changed back to:</span>
1277 <xsl:text> </xsl:text>
1278 <xsl:variable name="f785">
1279 <xsl:call-template name="subfieldSelect">
1280 <xsl:with-param name="codes">a_t</xsl:with-param>
1281 </xsl:call-template>
1285 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1286 <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>
1287 <xsl:value-of select="translate($f785, '()', '')"/>
1291 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1292 <xsl:value-of select="translate($f785, '()', '')"/>
1299 <xsl:if test="marc:subfield[@code='n']">
1300 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1310 <xsl:template name="showAuthor">
1311 <xsl:param name="authorfield" />
1312 <xsl:param name="UseAuthoritiesForTracings" />
1313 <xsl:param name="materialTypeLabel" />
1314 <xsl:param name="theme" />
1315 <xsl:if test="count($authorfield)>0">
1317 <xsl:for-each select="$authorfield">
1319 <xsl:when test="position()>1"/>
1321 <xsl:when test="@tag<700">By: </xsl:when>
1322 <!--#13382 Changed Additional author to contributor -->
1323 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1326 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1327 <xsl:when test="marc:subfield[@code='n']">
1328 <xsl:text> </xsl:text>
1329 <xsl:call-template name="subfieldSelect">
1330 <xsl:with-param name="codes">n</xsl:with-param>
1331 </xsl:call-template>
1332 <xsl:text> </xsl:text>
1337 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1338 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="marc:subfield[@code=9]"/>"</xsl:attribute>
1341 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1344 <span resource="#record"><span>
1346 <xsl:when test="substring(@tag, 1, 1)='1'">
1348 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1349 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1352 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1355 <xsl:when test="substring(@tag, 2, 1)='0'">
1357 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1358 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1361 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1363 <span property="name">
1365 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1367 <xsl:call-template name="chopPunctuation">
1368 <xsl:with-param name="chopString">
1369 <xsl:call-template name="subfieldSelect">
1370 <xsl:with-param name="codes">
1372 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1373 <xsl:when test="@tag=111">aeq</xsl:when>
1374 <xsl:when test="@tag=110">ab</xsl:when>
1375 <xsl:otherwise>abcjq</xsl:otherwise>
1378 </xsl:call-template>
1380 <xsl:with-param name="punctuation">
1381 <xsl:text>:,;/ </xsl:text>
1383 </xsl:call-template>
1384 <!-- Display only name and title portion in 110 field -->
1385 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1386 <span class="titleportion">
1388 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1389 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1391 <xsl:call-template name="chopPunctuation">
1392 <xsl:with-param name="chopString">
1393 <xsl:call-template name="subfieldSelect">
1394 <xsl:with-param name="codes">cdnt</xsl:with-param>
1395 </xsl:call-template>
1397 </xsl:call-template>
1400 <!-- Display only name and title portion in 111 field -->
1401 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1402 <span class="titleportion">
1404 <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>
1405 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1408 <xsl:call-template name="chopPunctuation">
1409 <xsl:with-param name="chopString">
1410 <xsl:call-template name="subfieldSelect">
1411 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1412 </xsl:call-template>
1414 </xsl:call-template>
1417 <!-- Display only dates in 100 field -->
1418 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1419 <span class="authordates">
1420 <xsl:text>, </xsl:text>
1421 <xsl:call-template name="chopPunctuation">
1422 <xsl:with-param name="chopString">
1423 <xsl:call-template name="subfieldSelect">
1424 <xsl:with-param name="codes">d</xsl:with-param>
1425 </xsl:call-template>
1427 </xsl:call-template>
1431 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1432 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1433 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1434 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1435 <xsl:if test="@tag=710 or @tag=711">
1436 <xsl:call-template name="chopPunctuation">
1437 <xsl:with-param name="chopString">
1438 <xsl:call-template name="subfieldSelect">
1439 <xsl:with-param name="codes">
1441 <xsl:when test="@tag=711">aeq</xsl:when>
1442 <xsl:otherwise>ab</xsl:otherwise>
1445 </xsl:call-template>
1447 <xsl:with-param name="punctuation">
1448 <xsl:text>:,;/ </xsl:text>
1450 </xsl:call-template>
1451 <!-- Display only name and title portion in 711 field -->
1452 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1453 <span class="titleportion">
1455 <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>
1456 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1459 <xsl:call-template name="chopPunctuation">
1460 <xsl:with-param name="chopString">
1461 <xsl:call-template name="subfieldSelect">
1462 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1463 </xsl:call-template>
1465 </xsl:call-template>
1468 <!-- Display only name and title portion in 710 field -->
1469 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1470 <span class="titleportion">
1472 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1473 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1475 <xsl:call-template name="chopPunctuation">
1476 <xsl:with-param name="chopString">
1477 <xsl:call-template name="subfieldSelect">
1478 <xsl:with-param name="codes">cdnt</xsl:with-param>
1479 </xsl:call-template>
1481 </xsl:call-template>
1486 <!-- Display only name portion in 700 field -->
1487 <xsl:if test="@tag=700">
1488 <xsl:call-template name="chopPunctuation">
1489 <xsl:with-param name="chopString">
1490 <xsl:call-template name="subfieldSelect">
1491 <xsl:with-param name="codes">abcq</xsl:with-param>
1492 </xsl:call-template>
1494 </xsl:call-template>
1496 <!-- Display class "authordates" in 700 field -->
1497 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1498 <span class="authordates">
1499 <xsl:text>, </xsl:text>
1500 <xsl:call-template name="chopPunctuation">
1501 <xsl:with-param name="chopString">
1502 <xsl:call-template name="subfieldSelect">
1503 <xsl:with-param name="codes">d</xsl:with-param>
1504 </xsl:call-template>
1506 </xsl:call-template>
1509 <!-- Display class "titleportion" in 700 field -->
1510 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1511 <xsl:if test="@tag=700 and $titleportionfields">
1512 <span class="titleportion">
1513 <xsl:text>. </xsl:text>
1514 <xsl:call-template name="chopPunctuation">
1515 <xsl:with-param name="chopString">
1516 <xsl:call-template name="subfieldSelect">
1517 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1518 </xsl:call-template>
1520 </xsl:call-template>
1526 </span></span></span>
1528 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1529 <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1531 <span class="relatorcode">
1532 <xsl:text> [</xsl:text>
1534 <xsl:when test="@tag=111 or @tag=711">
1536 <!-- Prefer j over 4 for 111 and 711 -->
1537 <xsl:when test="marc:subfield[@code='j']">
1538 <xsl:for-each select="marc:subfield[@code='j']">
1539 <xsl:value-of select="."/>
1540 <xsl:if test="position() != last()">, </xsl:if>
1544 <xsl:for-each select="marc:subfield[@code=4]">
1545 <xsl:value-of select="."/>
1546 <xsl:if test="position() != last()">, </xsl:if>
1551 <!-- Prefer e over 4 on 100 and 110-->
1552 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1553 <xsl:for-each select="marc:subfield[@code='e']">
1554 <xsl:value-of select="."/>
1555 <xsl:if test="position() != last()">, </xsl:if>
1559 <xsl:for-each select="marc:subfield[@code=4]">
1560 <xsl:value-of select="."/>
1561 <xsl:if test="position() != last()">, </xsl:if>
1565 <xsl:text>]</xsl:text>
1569 <xsl:if test="marc:subfield[@code=9]">
1570 <a class='authlink'>
1571 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1572 <xsl:element name="img">
1573 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
1574 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
1575 <xsl:attribute name="height">15</xsl:attribute>
1576 <xsl:attribute name="width">15</xsl:attribute>
1581 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1588 <xsl:template name="nameABCQ">
1589 <xsl:call-template name="chopPunctuation">
1590 <xsl:with-param name="chopString">
1591 <xsl:call-template name="subfieldSelect">
1592 <xsl:with-param name="codes">abcq</xsl:with-param>
1593 </xsl:call-template>
1595 <xsl:with-param name="punctuation">
1596 <xsl:text>:,;/ </xsl:text>
1598 </xsl:call-template>
1601 <xsl:template name="nameABCDN">
1602 <xsl:call-template name="chopPunctuation">
1603 <xsl:with-param name="chopString">
1604 <xsl:call-template name="subfieldSelect">
1605 <xsl:with-param name="codes">abcdn</xsl:with-param>
1606 </xsl:call-template>
1608 <xsl:with-param name="punctuation">
1609 <xsl:text>:,;/ </xsl:text>
1611 </xsl:call-template>
1614 <xsl:template name="nameACDEQ">
1615 <xsl:call-template name="subfieldSelect">
1616 <xsl:with-param name="codes">acdeq</xsl:with-param>
1617 </xsl:call-template>
1620 <xsl:template name="part">
1621 <xsl:variable name="partNumber">
1622 <xsl:call-template name="specialSubfieldSelect">
1623 <xsl:with-param name="axis">n</xsl:with-param>
1624 <xsl:with-param name="anyCodes">n</xsl:with-param>
1625 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1626 </xsl:call-template>
1628 <xsl:variable name="partName">
1629 <xsl:call-template name="specialSubfieldSelect">
1630 <xsl:with-param name="axis">p</xsl:with-param>
1631 <xsl:with-param name="anyCodes">p</xsl:with-param>
1632 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1633 </xsl:call-template>
1635 <xsl:if test="string-length(normalize-space($partNumber))">
1636 <xsl:call-template name="chopPunctuation">
1637 <xsl:with-param name="chopString" select="$partNumber"/>
1638 </xsl:call-template>
1640 <xsl:if test="string-length(normalize-space($partName))">
1641 <xsl:call-template name="chopPunctuation">
1642 <xsl:with-param name="chopString" select="$partName"/>
1643 </xsl:call-template>
1647 <xsl:template name="specialSubfieldSelect">
1648 <xsl:param name="anyCodes"/>
1649 <xsl:param name="axis"/>
1650 <xsl:param name="beforeCodes"/>
1651 <xsl:param name="afterCodes"/>
1652 <xsl:variable name="str">
1653 <xsl:for-each select="marc:subfield">
1654 <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])">
1655 <xsl:value-of select="text()"/>
1656 <xsl:text> </xsl:text>
1660 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1663 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1664 <xsl:template name="subfieldSelectSubject">
1665 <xsl:param name="codes"/>
1666 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1667 <xsl:param name="subdivCodes"/>
1668 <xsl:param name="subdivDelimiter"/>
1669 <xsl:param name="prefix"/>
1670 <xsl:param name="suffix"/>
1671 <xsl:param name="urlencode"/>
1672 <xsl:variable name="str">
1673 <xsl:for-each select="marc:subfield">
1674 <xsl:if test="contains($codes, @code)">
1675 <xsl:if test="contains($subdivCodes, @code)">
1676 <xsl:value-of select="$subdivDelimiter"/>
1678 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1683 <xsl:when test="$urlencode=1">
1684 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1687 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>