1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
4 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <xsl:stylesheet version="1.0"
6 xmlns:marc="http://www.loc.gov/MARC21/slim"
7 xmlns:items="http://www.koha-community.org/items"
8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 exclude-result-prefixes="marc items">
10 <xsl:import href="MARC21slimUtils.xsl"/>
11 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
13 <xsl:template match="/">
14 <xsl:apply-templates/>
17 <xsl:template match="marc:record">
19 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
20 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
24 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
25 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
27 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
28 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
29 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
30 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
31 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
32 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
33 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
34 <xsl:variable name="TracingQuotesLeft">
36 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
37 <xsl:otherwise>"</xsl:otherwise>
40 <xsl:variable name="TracingQuotesRight">
42 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
43 <xsl:otherwise>"</xsl:otherwise>
46 <xsl:variable name="leader" select="marc:leader"/>
47 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
48 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
49 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
50 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
51 <xsl:variable name="materialTypeCode">
53 <xsl:when test="$leader19='a'">ST</xsl:when>
54 <xsl:when test="$leader6='a'">
56 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
57 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
58 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
61 <xsl:when test="$leader6='t'">BK</xsl:when>
62 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
63 <xsl:when test="$leader6='m'">CF</xsl:when>
64 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
65 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
66 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
67 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
70 <xsl:variable name="materialTypeLabel">
72 <xsl:when test="$leader19='a'">Set</xsl:when>
73 <xsl:when test="$leader6='a'">
75 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
76 <xsl:when test="$leader7='i' or $leader7='s'">
78 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
79 <xsl:otherwise>Series</xsl:otherwise>
82 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
85 <xsl:when test="$leader6='t'">Book</xsl:when>
86 <xsl:when test="$leader6='o'">Kit</xsl:when>
87 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
88 <xsl:when test="$leader6='m'">Computer file</xsl:when>
89 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
90 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
91 <xsl:when test="$leader6='j'">Music</xsl:when>
92 <xsl:when test="$leader6='i'">Sound</xsl:when>
93 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
97 <!-- Schema.org type -->
98 <xsl:variable name="schemaOrgType">
100 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
101 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
102 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
103 <xsl:otherwise>CreativeWork</xsl:otherwise>
107 <!-- Wrapper div for our schema.org object -->
108 <xsl:element name="div">
109 <xsl:attribute name="class">record</xsl:attribute>
110 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
111 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
112 <xsl:attribute name="resource">#record</xsl:attribute>
114 <!-- Title Statement -->
115 <!-- Alternate Graphic Representation (MARC 880) -->
116 <xsl:if test="$display880">
117 <h1 class="title" property="alternateName">
118 <xsl:call-template name="m880Select">
119 <xsl:with-param name="basetags">245</xsl:with-param>
120 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
126 <xsl:if test="marc:datafield[@tag=245]">
127 <h1 class="title" property="name">
128 <xsl:for-each select="marc:datafield[@tag=245]">
129 <xsl:call-template name="subfieldSelect">
130 <xsl:with-param name="codes">a</xsl:with-param>
132 <xsl:text> </xsl:text>
133 <!-- 13381 add additional subfields-->
134 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
136 <xsl:when test="@code='h'">
137 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
138 <span class="title_medium"><xsl:apply-templates/> </span>
140 <xsl:when test="@code='c'">
141 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
142 <span class="title_resp_stmt"><xsl:apply-templates/> </span>
145 <xsl:apply-templates/>
146 <xsl:text> </xsl:text>
155 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
156 <xsl:if test="$display880">
158 <xsl:call-template name="m880Select">
159 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
160 <xsl:with-param name="codes">abc</xsl:with-param>
161 <xsl:with-param name="index">au</xsl:with-param>
162 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
167 <!--#13382 Added Author Statement to seperate Authors and Contributors -->
168 <xsl:call-template name="showAuthor">
169 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=100 or @tag=110 or @tag=111)]"/>
170 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
171 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
172 <xsl:with-param name="theme" select="$theme"/>
175 <xsl:call-template name="showAuthor">
176 <!-- #13382 suppress 700$i and 7xx/@ind2=2 -->
177 <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'])]"/>
178 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
181 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
182 <xsl:if test="$materialTypeCode!=''">
183 <span class="results_summary type"><span class="label">Material type: </span>
184 <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>
185 <xsl:value-of select="$materialTypeLabel"/>
190 <!--Series: Alternate Graphic Representation (MARC 880) -->
191 <xsl:if test="$display880">
192 <xsl:call-template name="m880Select">
193 <xsl:with-param name="basetags">440,490</xsl:with-param>
194 <xsl:with-param name="codes">av</xsl:with-param>
195 <xsl:with-param name="class">results_summary series</xsl:with-param>
196 <xsl:with-param name="label">Series: </xsl:with-param>
197 <xsl:with-param name="index">se</xsl:with-param>
202 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
203 <span class="results_summary series"><span class="label">Series: </span>
205 <xsl:for-each select="marc:datafield[@tag=440]">
206 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
207 <xsl:call-template name="chopPunctuation">
208 <xsl:with-param name="chopString">
209 <xsl:call-template name="subfieldSelect">
210 <xsl:with-param name="codes">av</xsl:with-param>
215 <xsl:call-template name="part"/>
216 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
219 <!-- 490 Series not traced, Ind1 = 0 -->
220 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
221 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
222 <xsl:call-template name="chopPunctuation">
223 <xsl:with-param name="chopString">
224 <xsl:call-template name="subfieldSelect">
225 <xsl:with-param name="codes">av</xsl:with-param>
230 <xsl:call-template name="part"/>
231 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
233 <!-- 490 Series traced, Ind1 = 1 -->
234 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
235 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
237 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
238 <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
239 <xsl:call-template name="chopPunctuation">
240 <xsl:with-param name="chopString">
241 <xsl:call-template name="subfieldSelect">
242 <xsl:with-param name="codes">a_t</xsl:with-param>
249 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
250 <xsl:call-template name="chopPunctuation">
251 <xsl:with-param name="chopString">
252 <xsl:call-template name="subfieldSelect">
253 <xsl:with-param name="codes">a_t</xsl:with-param>
258 <xsl:call-template name="part"/>
261 <xsl:text>: </xsl:text>
262 <xsl:value-of select="marc:subfield[@code='v']" />
263 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
270 <xsl:if test="$leader7='s'">
271 <span class="results_summary analytics"><span class="label">Analytics: </span>
274 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
275 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
278 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
281 <xsl:text>Show analytics</xsl:text>
286 <!-- Volumes of sets and traced series -->
287 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
288 <span class="results_summary volumes"><span class="label">Volumes: </span>
291 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
292 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
295 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
298 <xsl:text>Show volumes</xsl:text>
304 <xsl:if test="$leader19='c'">
305 <span class="results_summary set"><span class="label">Set: </span>
306 <xsl:for-each select="marc:datafield[@tag=773]">
309 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
310 <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>
313 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
316 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
319 <xsl:when test="position()=last()"></xsl:when>
320 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
326 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
327 <xsl:if test="$display880">
328 <xsl:call-template name="m880Select">
329 <xsl:with-param name="basetags">260</xsl:with-param>
330 <xsl:with-param name="codes">abcg</xsl:with-param>
331 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
332 <xsl:with-param name="label">Publisher: </xsl:with-param>
336 <!-- Publisher info and RDA related info from tags 260, 264 -->
338 <xsl:when test="marc:datafield[@tag=260]">
339 <span class="results_summary publisher"><span class="label">Publisher: </span>
340 <xsl:for-each select="marc:datafield[@tag=260]">
341 <span property="publisher" typeof="Organization">
342 <xsl:if test="marc:subfield[@code='a']">
343 <span property="location">
344 <xsl:call-template name="subfieldSelect">
345 <xsl:with-param name="codes">a</xsl:with-param>
349 <xsl:text> </xsl:text>
350 <xsl:if test="marc:subfield[@code='b']">
351 <span property="name"><a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
352 <xsl:call-template name="subfieldSelect">
353 <xsl:with-param name="codes">b</xsl:with-param>
358 <xsl:text> </xsl:text>
359 <xsl:if test="marc:subfield[@code='c' or @code='g']">
360 <span property="datePublished">
361 <xsl:call-template name="chopPunctuation">
362 <xsl:with-param name="chopString">
363 <xsl:call-template name="subfieldSelect">
364 <xsl:with-param name="codes">cg</xsl:with-param>
370 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
372 <xsl:if test="marc:datafield[@tag=264]">
373 <xsl:text>; </xsl:text>
374 <xsl:call-template name="showRDAtag264"/>
378 <xsl:when test="marc:datafield[@tag=264]">
379 <span class="results_summary">
380 <xsl:call-template name="showRDAtag264"/>
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">abceg</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">iabhfgnp</xsl:with-param>
566 <!-- #13386 added separator | -->
567 <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>
573 <xsl:if test="marc:datafield[@tag=242]">
574 <span class="results_summary translated_title"><span class="label">Title translated: </span>
575 <xsl:for-each select="marc:datafield[@tag=242]">
576 <span property="alternateName">
577 <xsl:call-template name="chopPunctuation">
578 <xsl:with-param name="chopString">
579 <xsl:call-template name="subfieldSelect">
580 <xsl:with-param name="codes">abchnp</xsl:with-param>
585 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
590 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
591 <xsl:if test="$display880">
592 <span property="alternateName">
593 <xsl:call-template name="m880Select">
594 <xsl:with-param name="basetags">130,240</xsl:with-param>
595 <xsl:with-param name="codes">adfklmor</xsl:with-param>
596 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
597 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
602 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
603 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
604 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
605 <span property="alternateName">
606 <xsl:for-each select="marc:subfield">
607 <xsl:if test="contains('adfghklmnoprst',@code)">
608 <xsl:value-of select="text()"/>
609 <xsl:text> </xsl:text>
613 <xsl:if test="position() != last()">
614 <span class="separator"><xsl:text> | </xsl:text></span>
621 <!-- #13382 Added Related works 700$i -->
622 <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']]">
623 <span class="results_summary related_works"><span class="label">Related Works: </span>
624 <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']]">
625 <xsl:variable name="str">
626 <xsl:call-template name="subfieldSelect">
627 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
630 <xsl:call-template name="chopPunctuation">
631 <xsl:with-param name="chopString">
632 <xsl:value-of select="$str"/>
635 <!-- add relator code too between brackets-->
636 <xsl:if test="marc:subfield[@code='4' or @code='e']">
637 <span class="relatorcode">
638 <xsl:text> [</xsl:text>
640 <xsl:when test="marc:subfield[@code='e']">
641 <xsl:for-each select="marc:subfield[@code='e']">
642 <xsl:value-of select="."/>
643 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
647 <xsl:for-each select="marc:subfield[@code='4']">
648 <xsl:value-of select="."/>
649 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
653 <xsl:text>]</xsl:text>
657 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
663 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
664 <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'])]">
665 <span class="results_summary contained_works"><span class="label">Contained Works: </span>
666 <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'])]">
667 <xsl:variable name="str">
668 <xsl:call-template name="subfieldSelect">
669 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
672 <xsl:call-template name="chopPunctuation">
673 <xsl:with-param name="chopString">
674 <xsl:value-of select="$str"/>
677 <!-- add relator code too between brackets-->
678 <xsl:if test="marc:subfield[@code='4' or @code='e']">
679 <span class="relatorcode">
680 <xsl:text> [</xsl:text>
682 <xsl:when test="marc:subfield[@code='e']">
683 <xsl:for-each select="marc:subfield[@code='e']">
684 <xsl:value-of select="."/>
685 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
689 <xsl:for-each select="marc:subfield[@code='4']">
690 <xsl:value-of select="."/>
691 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
695 <xsl:text>]</xsl:text>
699 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
705 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
706 <span class="results_summary subjects"><span class="label">Subject(s): </span>
707 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
708 <span property="keywords">
711 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
712 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
714 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
715 <xsl:when test="$TraceSubjectSubdivisions='1'">
716 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
717 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
718 <xsl:with-param name="delimeter"> AND </xsl:with-param>
719 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
720 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
724 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
726 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="translate(marc:subfield[@code='a'],'()','')"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
729 <xsl:call-template name="chopPunctuation">
730 <xsl:with-param name="chopString">
731 <xsl:call-template name="subfieldSelect">
732 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
733 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
734 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
740 <xsl:if test="marc:subfield[@code=9]">
742 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
743 <xsl:element name="img">
744 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
745 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
746 <xsl:attribute name="height">15</xsl:attribute>
747 <xsl:attribute name="width">15</xsl:attribute>
752 <xsl:when test="position()=last()"></xsl:when>
753 <xsl:otherwise> | </xsl:otherwise>
761 <xsl:if test="marc:datafield[@tag=655]">
762 <span class="results_summary genre"><span class="label">Genre/Form: </span>
763 <xsl:for-each select="marc:datafield[@tag=655]">
766 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
767 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
769 <xsl:when test="$TraceSubjectSubdivisions='1'">
770 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
771 <xsl:with-param name="codes">avxyz</xsl:with-param>
772 <xsl:with-param name="delimeter"> AND </xsl:with-param>
773 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
774 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
779 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
783 <xsl:call-template name="subfieldSelect">
784 <xsl:with-param name="codes">avxyz</xsl:with-param>
785 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
786 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
788 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
793 <!-- DDC classification -->
794 <xsl:if test="marc:datafield[@tag=082]">
795 <span class="results_summary ddc">
796 <span class="label">DDC classification: </span>
797 <xsl:for-each select="marc:datafield[@tag=082]">
798 <xsl:call-template name="subfieldSelect">
799 <xsl:with-param name="codes">a</xsl:with-param>
800 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
803 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
804 <xsl:otherwise> | </xsl:otherwise>
811 <!-- Image processing code added here, takes precedence over text links including y3z text -->
812 <xsl:if test="marc:datafield[@tag=856]">
813 <span class="results_summary online_resources"><span class="label">Online resources: </span>
814 <xsl:for-each select="marc:datafield[@tag=856]">
815 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
818 <xsl:when test="$OPACTrackClicks='track'">
819 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
821 <xsl:when test="$OPACTrackClicks='anonymous'">
822 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
825 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
828 <xsl:if test="$OPACURLOpenInNewWindow='1'">
829 <xsl:attribute name="target">_blank</xsl:attribute>
832 <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')">
833 <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>
835 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
836 <xsl:call-template name="subfieldSelect">
837 <xsl:with-param name="codes">y3z</xsl:with-param>
840 <xsl:when test="$URLLinkText!=''">
841 <xsl:value-of select="$URLLinkText"/>
844 <xsl:text>Click here to access online</xsl:text>
849 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
850 <xsl:otherwise> | </xsl:otherwise>
857 <xsl:if test="marc:datafield[@tag=530]">
858 <xsl:for-each select="marc:datafield[@tag=530]">
859 <span class="results_summary additionalforms">
860 <xsl:call-template name="subfieldSelect">
861 <xsl:with-param name="codes">abcd</xsl:with-param>
863 <xsl:for-each select="marc:subfield[@code='u']">
864 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
865 <xsl:if test="$OPACURLOpenInNewWindow='1'">
866 <xsl:attribute name="target">_blank</xsl:attribute>
868 <xsl:value-of select="text()"/>
876 <xsl:if test="marc:datafield[@tag=505]">
877 <div class="results_summary contents">
878 <xsl:for-each select="marc:datafield[@tag=505]">
879 <xsl:if test="position()=1">
881 <xsl:when test="@ind1=1">
882 <span class="label">Incomplete contents:</span>
884 <xsl:when test="@ind1=2">
885 <span class="label">Partial contents:</span>
888 <span class="label">Contents:</span>
892 <div class='contentblock' property='description'>
894 <xsl:when test="@ind2=0">
895 <xsl:call-template name="subfieldSelectSpan">
896 <xsl:with-param name="codes">tru</xsl:with-param>
900 <xsl:call-template name="subfieldSelectSpan">
901 <xsl:with-param name="codes">atru</xsl:with-param>
911 <xsl:if test="marc:datafield[@tag=583]">
912 <xsl:for-each select="marc:datafield[@tag=583]">
913 <xsl:if test="@ind1=1 or @ind1=' '">
914 <span class="results_summary actionnote">
916 <xsl:when test="marc:subfield[@code='z']">
917 <xsl:value-of select="marc:subfield[@code='z']"/>
920 <xsl:call-template name="subfieldSelect">
921 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
931 <xsl:if test="marc:datafield[@tag=508]">
932 <div class="results_summary prod_credits">
933 <span class="label">Production Credits: </span>
934 <xsl:for-each select="marc:datafield[@tag=508]">
935 <xsl:call-template name="subfieldSelectSpan">
936 <xsl:with-param name="codes">a</xsl:with-param>
943 <xsl:if test="marc:datafield[@tag=586]">
944 <span class="results_summary awardsnote">
945 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
946 <span class="label">Awards: </span>
948 <xsl:for-each select="marc:datafield[@tag=586]">
949 <xsl:value-of select="marc:subfield[@code='a']"/>
950 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
956 <xsl:if test="marc:datafield[@tag=773]">
957 <xsl:for-each select="marc:datafield[@tag=773]">
958 <xsl:if test="@ind1 !=1">
959 <span class="results_summary in"><span class="label">
961 <xsl:when test="@ind2=' '">
964 <xsl:when test="@ind2=8">
965 <xsl:if test="marc:subfield[@code='i']">
966 <xsl:value-of select="marc:subfield[@code='i']"/>
971 <xsl:variable name="f773">
972 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
973 <xsl:with-param name="codes">a_t</xsl:with-param>
974 </xsl:call-template></xsl:with-param></xsl:call-template>
977 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
978 <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>
979 <xsl:value-of select="translate($f773, '()', '')"/>
981 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
983 <xsl:when test="marc:subfield[@code='0']">
984 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
985 <xsl:value-of select="$f773"/>
989 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
990 <xsl:value-of select="$f773"/>
992 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
997 <xsl:if test="marc:subfield[@code='n']">
998 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1005 <xsl:for-each select="marc:datafield[@tag=511]">
1006 <span class="results_summary perf_note">
1007 <span class="label">
1008 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1010 <xsl:call-template name="subfieldSelect">
1011 <xsl:with-param name="codes">a</xsl:with-param>
1012 </xsl:call-template>
1016 <xsl:if test="marc:datafield[@tag=502]">
1017 <span class="results_summary diss_note">
1018 <span class="label">Dissertation note: </span>
1019 <xsl:for-each select="marc:datafield[@tag=502]">
1020 <xsl:call-template name="subfieldSelect">
1021 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1022 </xsl:call-template>
1024 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1028 <xsl:for-each select="marc:datafield[@tag=520]">
1029 <span class="results_summary summary"><span class="label">
1031 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1032 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1033 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1034 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1035 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1036 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1039 <xsl:call-template name="subfieldSelect">
1040 <xsl:with-param name="codes">abcu</xsl:with-param>
1041 </xsl:call-template>
1045 <!-- 866 textual holdings -->
1046 <xsl:if test="marc:datafield[@tag=866]">
1047 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
1048 <xsl:for-each select="marc:datafield[@tag=866]">
1049 <xsl:call-template name="subfieldSelect">
1050 <xsl:with-param name="codes">az</xsl:with-param>
1051 </xsl:call-template>
1052 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1057 <!-- 775 Other Edition -->
1058 <xsl:if test="marc:datafield[@tag=775]">
1059 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1060 <xsl:for-each select="marc:datafield[@tag=775]">
1061 <xsl:variable name="f775">
1062 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1063 <xsl:with-param name="codes">a_t</xsl:with-param>
1064 </xsl:call-template></xsl:with-param></xsl:call-template>
1066 <xsl:if test="marc:subfield[@code='i']">
1067 <xsl:call-template name="subfieldSelect">
1068 <xsl:with-param name="codes">i</xsl:with-param>
1069 </xsl:call-template>
1070 <xsl:text>: </xsl:text>
1074 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1075 <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>
1078 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
1081 <xsl:call-template name="subfieldSelect">
1082 <xsl:with-param name="codes">a_t</xsl:with-param>
1083 </xsl:call-template>
1086 <xsl:when test="position()=last()"></xsl:when>
1087 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1094 <xsl:if test="marc:datafield[@tag=780]">
1095 <xsl:for-each select="marc:datafield[@tag=780]">
1096 <xsl:if test="@ind1=0">
1097 <span class="results_summary preceeding_entry">
1099 <xsl:when test="@ind2=0">
1100 <span class="label">Continues:</span>
1102 <xsl:when test="@ind2=1">
1103 <span class="label">Continues in part:</span>
1105 <xsl:when test="@ind2=2">
1106 <span class="label">Supersedes:</span>
1108 <xsl:when test="@ind2=3">
1109 <span class="label">Supersedes in part:</span>
1111 <xsl:when test="@ind2=4">
1112 <span class="label">Formed by the union: ... and: ...</span>
1114 <xsl:when test="@ind2=5">
1115 <span class="label">Absorbed:</span>
1117 <xsl:when test="@ind2=6">
1118 <span class="label">Absorbed in part:</span>
1120 <xsl:when test="@ind2=7">
1121 <span class="label">Separated from:</span>
1124 <xsl:text> </xsl:text>
1125 <xsl:variable name="f780">
1126 <xsl:call-template name="subfieldSelect">
1127 <xsl:with-param name="codes">a_t</xsl:with-param>
1128 </xsl:call-template>
1131 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1132 <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>
1133 <xsl:value-of select="translate($f780, '()', '')"/>
1137 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1138 <xsl:value-of select="translate($f780, '()', '')"/>
1144 <xsl:if test="marc:subfield[@code='n']">
1145 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1153 <xsl:if test="marc:datafield[@tag=785]">
1154 <xsl:for-each select="marc:datafield[@tag=785]">
1155 <xsl:if test="@ind1=0">
1156 <span class="results_summary succeeding_entry">
1158 <xsl:when test="@ind2=0">
1159 <span class="label">Continued by:</span>
1161 <xsl:when test="@ind2=1">
1162 <span class="label">Continued in part by:</span>
1164 <xsl:when test="@ind2=2">
1165 <span class="label">Superseded by:</span>
1167 <xsl:when test="@ind2=3">
1168 <span class="label">Superseded in part by:</span>
1170 <xsl:when test="@ind2=4">
1171 <span class="label">Absorbed by:</span>
1173 <xsl:when test="@ind2=5">
1174 <span class="label">Absorbed in part by:</span>
1176 <xsl:when test="@ind2=6">
1177 <span class="label">Split into .. and ...:</span>
1179 <xsl:when test="@ind2=7">
1180 <span class="label">Merged with ... to form ...</span>
1182 <xsl:when test="@ind2=8">
1183 <span class="label">Changed back to:</span>
1186 <xsl:text> </xsl:text>
1187 <xsl:variable name="f785">
1188 <xsl:call-template name="subfieldSelect">
1189 <xsl:with-param name="codes">a_t</xsl:with-param>
1190 </xsl:call-template>
1194 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1195 <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>
1196 <xsl:value-of select="translate($f785, '()', '')"/>
1200 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1201 <xsl:value-of select="translate($f785, '()', '')"/>
1208 <xsl:if test="marc:subfield[@code='n']">
1209 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1219 <xsl:template name="showAuthor">
1220 <xsl:param name="authorfield" />
1221 <xsl:param name="UseAuthoritiesForTracings" />
1222 <xsl:param name="materialTypeLabel" />
1223 <xsl:param name="theme" />
1224 <xsl:if test="count($authorfield)>0">
1226 <xsl:for-each select="$authorfield">
1228 <xsl:when test="position()>1"/>
1229 <xsl:when test="@tag<700">Author(s): </xsl:when>
1230 <!--#13382 Changed Additional author to contributor -->
1231 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1234 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1235 <xsl:when test="marc:subfield[@code='n']">
1236 <xsl:text> </xsl:text>
1237 <xsl:call-template name="subfieldSelect">
1238 <xsl:with-param name="codes">n</xsl:with-param>
1239 </xsl:call-template>
1240 <xsl:text> </xsl:text>
1245 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1246 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="marc:subfield[@code=9]"/>"</xsl:attribute>
1249 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1252 <span resource="#record"><span>
1254 <xsl:when test="substring(@tag, 1, 1)='1'">
1256 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1257 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1260 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1263 <xsl:when test="substring(@tag, 2, 1)='0'">
1265 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1266 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1269 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1271 <span property="name">
1273 <xsl:when test="@tag=100"><xsl:call-template name="nameABCQ"/></xsl:when>
1274 <xsl:when test="@tag=110"><xsl:call-template name="nameABCDN"/></xsl:when>
1275 <xsl:when test="@tag=111"><xsl:call-template name="nameACDEQ"/></xsl:when>
1276 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1277 <!--#13382 Added all relevant subfields 4, e, are handled separately -->
1278 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1279 <xsl:variable name="str">
1280 <xsl:call-template name="subfieldSelect">
1281 <xsl:with-param name="codes">abcdfghiklmnoprstux</xsl:with-param>
1282 </xsl:call-template>
1284 <xsl:call-template name="chopPunctuation">
1285 <xsl:with-param name="chopString">
1286 <xsl:value-of select="$str"/>
1288 <xsl:with-param name="punctuation">
1289 <xsl:text>:,;/. </xsl:text>
1291 </xsl:call-template>
1294 </span></span></span>
1295 <!-- add relator code too between brackets-->
1296 <xsl:if test="marc:subfield[@code='4' or @code='e']">
1297 <span class="relatorcode">
1298 <xsl:text> [</xsl:text>
1300 <xsl:when test="marc:subfield[@code='e']">
1301 <xsl:for-each select="marc:subfield[@code='e']">
1302 <xsl:value-of select="."/>
1303 <xsl:if test="position() != last()">, </xsl:if>
1307 <xsl:for-each select="marc:subfield[@code=4]">
1308 <xsl:value-of select="."/>
1309 <xsl:if test="position() != last()">, </xsl:if>
1313 <xsl:text>]</xsl:text>
1317 <xsl:if test="marc:subfield[@code=9]">
1318 <a class='authlink'>
1319 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1320 <xsl:element name="img">
1321 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
1322 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
1323 <xsl:attribute name="height">15</xsl:attribute>
1324 <xsl:attribute name="width">15</xsl:attribute>
1330 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1336 <xsl:template name="nameABCQ">
1337 <xsl:call-template name="chopPunctuation">
1338 <xsl:with-param name="chopString">
1339 <xsl:call-template name="subfieldSelect">
1340 <xsl:with-param name="codes">abcq</xsl:with-param>
1341 </xsl:call-template>
1343 <xsl:with-param name="punctuation">
1344 <xsl:text>:,;/ </xsl:text>
1346 </xsl:call-template>
1349 <xsl:template name="nameABCDN">
1350 <xsl:call-template name="chopPunctuation">
1351 <xsl:with-param name="chopString">
1352 <xsl:call-template name="subfieldSelect">
1353 <xsl:with-param name="codes">abcdn</xsl:with-param>
1354 </xsl:call-template>
1356 <xsl:with-param name="punctuation">
1357 <xsl:text>:,;/ </xsl:text>
1359 </xsl:call-template>
1362 <xsl:template name="nameACDEQ">
1363 <xsl:call-template name="subfieldSelect">
1364 <xsl:with-param name="codes">acdeq</xsl:with-param>
1365 </xsl:call-template>
1368 <xsl:template name="part">
1369 <xsl:variable name="partNumber">
1370 <xsl:call-template name="specialSubfieldSelect">
1371 <xsl:with-param name="axis">n</xsl:with-param>
1372 <xsl:with-param name="anyCodes">n</xsl:with-param>
1373 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1374 </xsl:call-template>
1376 <xsl:variable name="partName">
1377 <xsl:call-template name="specialSubfieldSelect">
1378 <xsl:with-param name="axis">p</xsl:with-param>
1379 <xsl:with-param name="anyCodes">p</xsl:with-param>
1380 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1381 </xsl:call-template>
1383 <xsl:if test="string-length(normalize-space($partNumber))">
1384 <xsl:call-template name="chopPunctuation">
1385 <xsl:with-param name="chopString" select="$partNumber"/>
1386 </xsl:call-template>
1388 <xsl:if test="string-length(normalize-space($partName))">
1389 <xsl:call-template name="chopPunctuation">
1390 <xsl:with-param name="chopString" select="$partName"/>
1391 </xsl:call-template>
1395 <xsl:template name="specialSubfieldSelect">
1396 <xsl:param name="anyCodes"/>
1397 <xsl:param name="axis"/>
1398 <xsl:param name="beforeCodes"/>
1399 <xsl:param name="afterCodes"/>
1400 <xsl:variable name="str">
1401 <xsl:for-each select="marc:subfield">
1402 <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])">
1403 <xsl:value-of select="text()"/>
1404 <xsl:text> </xsl:text>
1408 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1411 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1412 <xsl:template name="subfieldSelectSubject">
1413 <xsl:param name="codes"/>
1414 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1415 <xsl:param name="subdivCodes"/>
1416 <xsl:param name="subdivDelimiter"/>
1417 <xsl:param name="prefix"/>
1418 <xsl:param name="suffix"/>
1419 <xsl:variable name="str">
1420 <xsl:for-each select="marc:subfield">
1421 <xsl:if test="contains($codes, @code)">
1422 <xsl:if test="contains($subdivCodes, @code)">
1423 <xsl:value-of select="$subdivDelimiter"/>
1425 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1429 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>