1 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
6 <!-- Edited: Bug 1807 [ENH] XSLT enhancements sponsored by bywater solutions 2015/01/19 WS wsalesky@gmail.com -->
7 <xsl:stylesheet version="1.0"
8 xmlns:marc="http://www.loc.gov/MARC21/slim"
9 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 xmlns:str="http://exslt.org/strings"
11 exclude-result-prefixes="marc str">
12 <xsl:import href="MARC21slimUtils.xsl"/>
13 <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])"/>
22 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
23 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
25 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
26 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
27 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
28 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
29 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
30 <xsl:variable name="OpacSuppression" select="marc:sysprefs/marc:syspref[@name='OpacSuppression']"/>
31 <xsl:variable name="TracingQuotesLeft">
33 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
34 <xsl:otherwise>"</xsl:otherwise>
37 <xsl:variable name="TracingQuotesRight">
39 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
40 <xsl:otherwise>"</xsl:otherwise>
44 <xsl:variable name="leader" select="marc:leader"/>
45 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
46 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
47 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
48 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
49 <xsl:variable name="materialTypeCode">
51 <xsl:when test="$leader19='a'">ST</xsl:when>
52 <xsl:when test="$leader6='a'">
54 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
55 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
56 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
59 <xsl:when test="$leader6='t'">BK</xsl:when>
60 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
61 <xsl:when test="$leader6='m'">CF</xsl:when>
62 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
63 <xsl:when test="$leader6='g'">VM</xsl:when>
64 <xsl:when test="$leader6='k'">PK</xsl:when>
65 <xsl:when test="$leader6='r'">OB</xsl:when>
66 <xsl:when test="$leader6='i'">MU</xsl:when>
67 <xsl:when test="$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'">Text</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'">Text</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'">Film</xsl:when>
92 <xsl:when test="$leader6='k'">Picture</xsl:when>
93 <xsl:when test="$leader6='r'">Object</xsl:when>
94 <xsl:when test="$leader6='j'">Music</xsl:when>
95 <xsl:when test="$leader6='i'">Sound</xsl:when>
96 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
100 <!-- Indicate if record is suppressed in OPAC -->
101 <xsl:if test="$OpacSuppression = 1">
102 <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
103 <span class="results_summary suppressed_opac">Suppressed in OPAC</span>
107 <!-- Title Statement -->
108 <!-- Alternate Graphic Representation (MARC 880) -->
109 <xsl:if test="$display880">
111 <xsl:call-template name="m880Select">
112 <xsl:with-param name="basetags">245</xsl:with-param>
113 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
119 <xsl:if test="marc:datafield[@tag=245]">
120 <h1 class="title" property="name">
121 <xsl:for-each select="marc:datafield[@tag=245]">
122 <xsl:call-template name="subfieldSelect">
123 <xsl:with-param name="codes">a</xsl:with-param>
125 <xsl:text> </xsl:text>
126 <!-- 13381 add additional subfields-->
127 <!-- bz 17625 adding subfields f and g -->
128 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
130 <xsl:when test="@code='h'">
131 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
132 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
134 <xsl:when test="@code='c'">
135 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
136 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
139 <xsl:apply-templates/>
140 <xsl:text> </xsl:text>
148 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
149 <xsl:if test="$display880">
151 <xsl:call-template name="m880Select">
152 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
153 <xsl:with-param name="codes">abc</xsl:with-param>
154 <xsl:with-param name="index">au</xsl:with-param>
155 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
156 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
161 <!-- Author Statement -->
162 <xsl:call-template name="showAuthor">
163 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
164 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
167 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
168 <xsl:call-template name="showAuthor">
169 <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'])]"/>
170 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
173 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
174 <span class="results_summary type"><span class="label">Material type: </span>
175 <xsl:element name="img"><xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
176 <xsl:text> </xsl:text>
177 <xsl:value-of select="$materialTypeLabel"/>
181 <xsl:call-template name="show-lang-041"/>
183 <!--Series: Alternate Graphic Representation (MARC 880) -->
184 <xsl:if test="$display880">
185 <xsl:call-template name="m880Select">
186 <xsl:with-param name="basetags">440,490</xsl:with-param>
187 <xsl:with-param name="codes">av</xsl:with-param>
188 <xsl:with-param name="class">results_summary series</xsl:with-param>
189 <xsl:with-param name="label">Series: </xsl:with-param>
190 <xsl:with-param name="index">se</xsl:with-param>
194 <xsl:call-template name="show-series">
195 <xsl:with-param name="searchurl">/cgi-bin/koha/catalogue/search.pl</xsl:with-param>
196 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
197 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
200 <!-- Analytics information -->
201 <xsl:variable name="leader7_class">
203 <!--xsl:when test="$leader7='a'">analytic_mcp</xsl:when-->
204 <!--xsl:when test="$leader7='b'">analytic_scp</xsl:when-->
205 <xsl:when test="$leader7='c'">analytic_collection</xsl:when>
206 <xsl:when test="$leader7='d'">analytic_subunit</xsl:when>
207 <xsl:when test="$leader7='i'">analytic_ires</xsl:when>
208 <xsl:when test="$leader7='m'">analytic_monograph</xsl:when>
209 <xsl:when test="$leader7='s'">analytic_serial</xsl:when>
210 <xsl:otherwise>analytic_undefined</xsl:otherwise>
214 <xsl:variable name="show_analytics_link" select="marc:variables/marc:variable[@name='show_analytics_link']" />
215 <xsl:if test="$show_analytics_link='1'">
216 <xsl:element name="span">
217 <xsl:attribute name="class">results_summary analytics <xsl:value-of select="$leader7_class"/></xsl:attribute>
218 <span class="label">Analytics: </span>
221 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
222 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
225 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
228 <xsl:text>Show analytics</xsl:text>
233 <!-- Volumes of sets and traced series -->
234 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
235 <span class="results_summary volumes"><span class="label">Volumes: </span>
238 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
239 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
242 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
245 <xsl:text>Show volumes</xsl:text>
251 <xsl:if test="$leader19='c'">
252 <span class="results_summary set"><span class="label">Set: </span>
253 <xsl:for-each select="marc:datafield[@tag=773]">
256 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
257 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
260 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
263 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
266 <xsl:when test="position()=last()"></xsl:when>
267 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
273 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
274 <xsl:if test="$display880">
275 <xsl:call-template name="m880Select">
276 <xsl:with-param name="basetags">260</xsl:with-param>
277 <xsl:with-param name="codes">abcg</xsl:with-param>
278 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
279 <xsl:with-param name="label">Publisher: </xsl:with-param>
283 <!-- Publisher info and RDA related info from tags 260, 264 -->
285 <xsl:when test="marc:datafield[@tag=264]">
286 <xsl:call-template name="showRDAtag264">
287 <xsl:with-param name="show_url">1</xsl:with-param>
290 <xsl:when test="marc:datafield[@tag=260]">
291 <span class="results_summary publisher"><span class="label">Publisher: </span>
292 <xsl:for-each select="marc:datafield[@tag=260]">
293 <xsl:if test="marc:subfield[@code='a']">
294 <xsl:call-template name="subfieldSelect">
295 <xsl:with-param name="codes">a</xsl:with-param>
298 <xsl:text> </xsl:text>
299 <xsl:if test="marc:subfield[@code='b']">
301 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/>"</xsl:attribute>
302 <xsl:call-template name="subfieldSelect">
303 <xsl:with-param name="codes">b</xsl:with-param>
307 <xsl:text> </xsl:text>
308 <xsl:call-template name="chopPunctuation">
309 <xsl:with-param name="chopString">
310 <xsl:call-template name="subfieldSelect">
311 <xsl:with-param name="codes">cg</xsl:with-param>
315 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
321 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
322 <xsl:if test="$display880">
323 <xsl:call-template name="m880Select">
324 <xsl:with-param name="basetags">250</xsl:with-param>
325 <xsl:with-param name="codes">ab</xsl:with-param>
326 <xsl:with-param name="class">results_summary edition</xsl:with-param>
327 <xsl:with-param name="label">Edition: </xsl:with-param>
331 <xsl:if test="marc:datafield[@tag=250]">
332 <span class="results_summary edition"><span class="label">Edition: </span>
333 <xsl:for-each select="marc:datafield[@tag=250]">
334 <xsl:call-template name="chopPunctuation">
335 <xsl:with-param name="chopString">
336 <xsl:call-template name="subfieldSelect">
337 <xsl:with-param name="codes">ab</xsl:with-param>
341 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
346 <!-- Description: Alternate Graphic Representation (MARC 880) -->
347 <xsl:if test="$display880">
348 <xsl:call-template name="m880Select">
349 <xsl:with-param name="basetags">300</xsl:with-param>
350 <xsl:with-param name="codes">abceg</xsl:with-param>
351 <xsl:with-param name="class">results_summary description</xsl:with-param>
352 <xsl:with-param name="label">Description: </xsl:with-param>
356 <xsl:if test="marc:datafield[@tag=300]">
357 <span class="results_summary description"><span class="label">Description: </span>
358 <xsl:for-each select="marc:datafield[@tag=300]">
359 <xsl:call-template name="chopPunctuation">
360 <xsl:with-param name="chopString">
361 <xsl:call-template name="subfieldSelect">
362 <xsl:with-param name="codes">abcefg</xsl:with-param>
366 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
371 <!-- Content Type -->
372 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
373 <span class="results_summary" id="content_type">
374 <xsl:if test="marc:datafield[@tag=336]">
375 <span class="label">Content type: </span>
376 <xsl:for-each select="marc:datafield[@tag=336]">
377 <xsl:call-template name="subfieldSelect">
378 <xsl:with-param name="codes">a</xsl:with-param>
379 <xsl:with-param name="delimeter">, </xsl:with-param>
381 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
384 <xsl:text> </xsl:text>
386 <xsl:if test="marc:datafield[@tag=337]">
387 <span class="label">Media type: </span>
388 <xsl:for-each select="marc:datafield[@tag=337]">
389 <xsl:call-template name="subfieldSelect">
390 <xsl:with-param name="codes">a</xsl:with-param>
391 <xsl:with-param name="delimeter">, </xsl:with-param>
393 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
396 <xsl:text> </xsl:text>
398 <xsl:if test="marc:datafield[@tag=338]">
399 <span class="label">Carrier type: </span>
400 <xsl:for-each select="marc:datafield[@tag=338]">
401 <xsl:call-template name="subfieldSelect">
402 <xsl:with-param name="codes">a</xsl:with-param>
403 <xsl:with-param name="delimeter">, </xsl:with-param>
405 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
411 <!-- 385 - Audience -->
412 <xsl:if test="marc:datafield[@tag=385]">
413 <span class="results_summary audience">
414 <span class="label">Audience: </span>
415 <xsl:for-each select="marc:datafield[@tag=385]">
416 <xsl:if test="marc:subfield[@code='m']">
417 <xsl:call-template name="chopPunctuation">
418 <xsl:with-param name="chopString">
419 <xsl:call-template name="subfieldSelect">
420 <xsl:with-param name="codes">m</xsl:with-param>
424 <xsl:text>: </xsl:text>
426 <xsl:call-template name="chopPunctuation">
427 <xsl:with-param name="chopString">
428 <xsl:call-template name="subfieldSelect">
429 <xsl:with-param name="codes">a</xsl:with-param>
430 <xsl:with-param name="delimeter">, </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>
439 <xsl:call-template name="showISBNISSN"/>
441 <xsl:if test="marc:datafield[@tag=013]">
442 <span class="results_summary patent_info">
443 <span class="label">Patent information: </span>
444 <xsl:for-each select="marc:datafield[@tag=013]">
445 <xsl:call-template name="subfieldSelect">
446 <xsl:with-param name="codes">acdef</xsl:with-param>
447 <xsl:with-param name="delimeter">, </xsl:with-param>
449 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
454 <xsl:if test="marc:datafield[@tag=088]">
455 <span class="results_summary report_number">
456 <span class="label">Report number: </span>
457 <xsl:for-each select="marc:datafield[@tag=088]">
458 <xsl:call-template name="subfieldSelect">
459 <xsl:with-param name="codes">a</xsl:with-param>
461 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
466 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
467 <xsl:if test="$display880">
468 <xsl:call-template name="m880Select">
469 <xsl:with-param name="basetags">246</xsl:with-param>
470 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
471 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
472 <xsl:with-param name="label">Other title: </xsl:with-param>
476 <xsl:if test="marc:datafield[@tag=246]">
477 <span class="results_summary other_title"><span class="label">Other title: </span>
478 <xsl:for-each select="marc:datafield[@tag=246]">
479 <xsl:if test="marc:subfield[@code='i']">
480 <xsl:call-template name="subfieldSelect">
481 <xsl:with-param name="codes">i</xsl:with-param>
484 <xsl:text> </xsl:text>
485 <xsl:call-template name="chopPunctuation">
486 <xsl:with-param name="chopString">
487 <xsl:call-template name="subfieldSelect">
488 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
492 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
494 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
495 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
496 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
497 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
498 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
499 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
500 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
501 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
502 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
505 <!-- #13386 added separator | -->
506 <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>
511 <xsl:if test="marc:datafield[@tag=242]">
512 <span class="results_summary translated_title"><span class="label">Title translated: </span>
513 <xsl:for-each select="marc:datafield[@tag=242]">
514 <xsl:call-template name="chopPunctuation">
515 <xsl:with-param name="chopString">
516 <xsl:call-template name="subfieldSelect">
517 <xsl:with-param name="codes">abchnp</xsl:with-param>
521 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
526 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
527 <xsl:if test="$display880">
528 <xsl:call-template name="m880Select">
529 <xsl:with-param name="basetags">130,240</xsl:with-param>
530 <xsl:with-param name="codes">adfklmor</xsl:with-param>
531 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
532 <xsl:with-param name="label">Uniform title: </xsl:with-param>
536 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
537 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
538 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
539 <xsl:if test="marc:subfield[@code='i']">
540 <xsl:call-template name="subfieldSelect">
541 <xsl:with-param name="codes">i</xsl:with-param>
544 <xsl:text> </xsl:text>
545 <xsl:for-each select="marc:subfield">
546 <xsl:if test="contains('adfghklmnoprst',@code)">
547 <xsl:value-of select="text()"/>
548 <xsl:text> </xsl:text>
551 <xsl:if test="position() != last()">
552 <span class="separator"><xsl:text> | </xsl:text></span>
558 <!-- #13382 Added Related works 700$i -->
559 <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']]">
560 <span class="results_summary related_works"><span class="label">Related works: </span>
561 <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']]">
562 <xsl:variable name="str">
563 <xsl:call-template name="subfieldSelect">
564 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
567 <xsl:call-template name="chopPunctuation">
568 <xsl:with-param name="chopString">
569 <xsl:value-of select="$str"/>
572 <!-- add relator code too between brackets-->
573 <xsl:if test="marc:subfield[@code='4' or @code='e']">
574 <span class="relatorcode">
575 <xsl:text> [</xsl:text>
577 <xsl:when test="marc:subfield[@code='e']">
578 <xsl:for-each select="marc:subfield[@code='e']">
579 <xsl:value-of select="."/>
580 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
584 <xsl:for-each select="marc:subfield[@code='4']">
585 <xsl:value-of select="."/>
586 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
590 <xsl:text>]</xsl:text>
594 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
600 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
601 <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'])]">
602 <span class="results_summary contained_works"><span class="label">Contained works: </span>
603 <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'])]">
604 <xsl:variable name="str">
605 <xsl:call-template name="subfieldSelect">
606 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
609 <xsl:call-template name="chopPunctuation">
610 <xsl:with-param name="chopString">
611 <xsl:value-of select="$str"/>
614 <!-- add relator code too between brackets-->
615 <xsl:if test="marc:subfield[@code='4' or @code='e']">
616 <span class="relatorcode">
617 <xsl:text> [</xsl:text>
619 <xsl:when test="marc:subfield[@code='e']">
620 <xsl:for-each select="marc:subfield[@code='e']">
621 <xsl:value-of select="."/>
622 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
626 <xsl:for-each select="marc:subfield[@code='4']">
627 <xsl:value-of select="."/>
628 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
632 <xsl:text>]</xsl:text>
636 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
643 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
644 <span class="results_summary subjects"><span class="label">Subject(s): </span>
645 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
648 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
649 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
650 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
652 <xsl:when test="$TraceSubjectSubdivisions='1'">
653 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
654 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
655 <xsl:with-param name="delimeter"> AND </xsl:with-param>
656 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
657 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
658 <xsl:with-param name="urlencode">1</xsl:with-param>
663 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
665 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
669 <xsl:call-template name="chopPunctuation">
670 <xsl:with-param name="chopString">
671 <xsl:call-template name="subfieldSelect">
672 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
673 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
674 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
680 <xsl:if test="marc:subfield[@code=9]">
681 <xsl:text> </xsl:text>
683 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
684 <xsl:element name="img">
685 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
686 <xsl:attribute name="alt"></xsl:attribute>
687 <xsl:attribute name="height">15</xsl:attribute>
688 <xsl:attribute name="width">15</xsl:attribute>
694 <xsl:when test="position()=last()"></xsl:when>
695 <xsl:otherwise> | </xsl:otherwise>
703 <xsl:if test="marc:datafield[@tag=655]">
704 <span class="results_summary genre"><span class="label">Genre/Form: </span>
705 <xsl:for-each select="marc:datafield[@tag=655]">
708 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
709 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
711 <xsl:when test="$TraceSubjectSubdivisions='1'">
712 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
713 <xsl:with-param name="codes">avxyz</xsl:with-param>
714 <xsl:with-param name="delimeter"> AND </xsl:with-param>
715 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
716 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
717 <xsl:with-param name="urlencode">1</xsl:with-param>
722 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
725 <xsl:call-template name="subfieldSelect">
726 <xsl:with-param name="codes">avxyz</xsl:with-param>
727 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
728 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
732 <xsl:if test="marc:subfield[@code=9]">
733 <xsl:text> </xsl:text>
735 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
736 <xsl:element name="img">
737 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
738 <xsl:attribute name="alt"></xsl:attribute>
739 <xsl:attribute name="height">15</xsl:attribute>
740 <xsl:attribute name="width">15</xsl:attribute>
744 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
749 <!-- MARC21 776 Additional Physical Form Entry -->
750 <xsl:if test="marc:datafield[@tag=776]">
751 <span class="results_summary add_physical_form">
752 <span class="label">Additional physical formats: </span>
753 <xsl:for-each select="marc:datafield[@tag=776]">
754 <xsl:variable name="linktext">
756 <xsl:when test="marc:subfield[@code='t']">
757 <xsl:value-of select="marc:subfield[@code='t']"/>
759 <xsl:when test="marc:subfield[@code='a']">
760 <xsl:value-of select="marc:subfield[@code='a']"/>
763 <xsl:text>No title</xsl:text>
767 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
768 <xsl:call-template name="subfieldSelect">
769 <xsl:with-param name="codes">i</xsl:with-param>
771 <xsl:text>: </xsl:text>
774 <xsl:when test="marc:subfield[@code='w']">
776 <xsl:attribute name="href">
777 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
778 <xsl:call-template name="extractControlNumber">
779 <xsl:with-param name="subfieldW">
780 <xsl:value-of select="marc:subfield[@code='w']"/>
784 <xsl:value-of select="$linktext"/>
788 <xsl:value-of select="$linktext"/>
791 <xsl:if test="position() != last()">
792 <xsl:text>; </xsl:text>
798 <!-- MARC21 777 - Issued With Entry -->
799 <xsl:if test="marc:datafield[@tag=777]">
800 <xsl:for-each select="marc:datafield[@tag=777]">
801 <xsl:if test="@ind1 != 1">
802 <span class="results_summary issued_with">
805 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
806 <xsl:value-of select="marc:subfield[@code='i']"/>
809 <xsl:text>Issued with:</xsl:text>
812 <xsl:text> </xsl:text>
814 <xsl:variable name="f777">
815 <xsl:call-template name="chopPunctuation">
816 <xsl:with-param name="chopString">
817 <xsl:call-template name="subfieldSelect">
818 <xsl:with-param name="codes">a_t</xsl:with-param>
824 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
825 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
826 <xsl:value-of select="translate($f777, '()', '')"/>
830 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/></xsl:attribute>
831 <xsl:value-of select="$f777"/>
835 <xsl:if test="marc:subfield[@code='g']">
836 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
839 <xsl:if test="marc:subfield[@code='n']">
840 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
846 <!-- DDC classification -->
847 <xsl:if test="marc:datafield[@tag=082]">
848 <span class="results_summary ddc">
849 <span class="label">DDC classification: </span>
850 <xsl:for-each select="marc:datafield[@tag=082]">
851 <xsl:call-template name="subfieldSelect">
852 <xsl:with-param name="codes">a</xsl:with-param>
853 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
856 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
857 <xsl:otherwise> | </xsl:otherwise>
863 <!-- LOC classification -->
864 <xsl:if test="marc:datafield[@tag=050]">
865 <span class="results_summary loc">
866 <span class="label">LOC classification: </span>
867 <xsl:for-each select="marc:datafield[@tag=050]">
868 <xsl:call-template name="subfieldSelect">
869 <xsl:with-param name="codes">ab</xsl:with-param>
870 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
876 <!-- NLM classification -->
877 <xsl:if test="marc:datafield[@tag=060]">
878 <span class="results_summary nlm">
879 <span class="label">NLM classification: </span>
880 <xsl:for-each select="marc:datafield[@tag=060]">
881 <xsl:call-template name="subfieldSelect">
882 <xsl:with-param name="codes">a</xsl:with-param>
883 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
885 <xsl:if test="not(position()=last())"><xsl:text> | </xsl:text></xsl:if>
890 <!-- Other classification -->
891 <xsl:if test="marc:datafield[@tag=084]">
892 <span class="results_summary oc">
893 <span class="label">Other classification: </span>
894 <xsl:for-each select="marc:datafield[@tag=084]">
895 <xsl:call-template name="subfieldSelect">
896 <xsl:with-param name="codes">a</xsl:with-param>
897 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
900 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
901 <xsl:otherwise> | </xsl:otherwise>
907 <xsl:if test="marc:datafield[@tag=856]">
908 <span class="results_summary online_resources"><span class="label">Online resources: </span>
909 <xsl:for-each select="marc:datafield[@tag=856]">
910 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
912 <xsl:attribute name="href">
913 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
915 <xsl:when test="@ind1=7">
916 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
918 <xsl:when test="@ind1=1">
919 <xsl:text>ftp://</xsl:text>
922 <xsl:text>http://</xsl:text>
926 <xsl:value-of select="marc:subfield[@code='u']"/>
929 <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')">
930 <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="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
932 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
933 <xsl:call-template name="subfieldSelect">
934 <xsl:with-param name="codes">y3z</xsl:with-param>
937 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
939 <xsl:when test="$URLLinkText!=''">
940 <xsl:value-of select="$URLLinkText"/>
943 <xsl:text>Click here to access online</xsl:text>
950 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
951 <xsl:otherwise> | </xsl:otherwise>
958 <!-- 505 - Formatted contents note -->
959 <xsl:if test="marc:datafield[@tag=505]">
960 <div class="results_summary contents">
962 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
963 <span class="label">Contents:</span>
965 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
966 <span class="label">Incomplete contents:</span>
968 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
969 <span class="label">Partial contents:</span>
972 <xsl:for-each select="marc:datafield[@tag=505]">
973 <div class='contentblock'>
975 <xsl:when test="@ind2=0">
976 <xsl:call-template name="subfieldSelectSpan">
977 <xsl:with-param name="newline">1</xsl:with-param>
978 <xsl:with-param name="codes">trug</xsl:with-param>
982 <xsl:call-template name="subfieldSelectSpan">
983 <xsl:with-param name="newline">1</xsl:with-param>
984 <xsl:with-param name="codes">atrug</xsl:with-param>
994 <xsl:if test="marc:datafield[@tag=586]">
995 <span class="results_summary awardsnote">
996 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
997 <span class="label">Awards: </span>
999 <xsl:for-each select="marc:datafield[@tag=586]">
1000 <xsl:value-of select="marc:subfield[@code='a']"/>
1001 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1007 <xsl:if test="marc:datafield[@tag=508]">
1008 <span class="results_summary prod_credits">
1009 <span class="label">Production credits: </span>
1010 <xsl:for-each select="marc:datafield[@tag=508]">
1011 <xsl:call-template name="subfieldSelectSpan">
1012 <xsl:with-param name="codes">a</xsl:with-param>
1013 </xsl:call-template>
1014 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1020 <xsl:if test="marc:datafield[@tag=583]">
1021 <span class="results_summary actionnote">
1022 <span class="label">Action note: </span>
1023 <xsl:for-each select="marc:datafield[@tag=583]">
1025 <xsl:when test="marc:subfield[@code='z']">
1026 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1029 <xsl:call-template name="subfieldSelect">
1030 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1031 </xsl:call-template>
1034 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1040 <xsl:if test="marc:datafield[@tag=773]">
1041 <xsl:for-each select="marc:datafield[@tag=773]">
1042 <xsl:if test="@ind1 !=1">
1043 <span class="results_summary in"><span class="label">
1045 <xsl:when test="@ind2=' '">
1048 <xsl:when test="@ind2=8">
1049 <xsl:if test="marc:subfield[@code='i']">
1050 <xsl:value-of select="marc:subfield[@code='i']"/>
1055 <xsl:variable name="f773">
1056 <xsl:call-template name="chopPunctuation">
1057 <xsl:with-param name="chopString">
1058 <xsl:call-template name="subfieldSelect">
1059 <xsl:with-param name="codes">a_t</xsl:with-param>
1060 </xsl:call-template>
1062 </xsl:call-template>
1065 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1066 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1067 <xsl:value-of select="translate($f773, '()', '')"/>
1070 <xsl:when test="marc:subfield[@code='0']">
1071 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:subfield[@code='0'], true())"/></xsl:attribute>
1072 <xsl:value-of select="$f773"/>
1076 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
1077 <xsl:value-of select="$f773"/>
1081 <xsl:if test="marc:subfield[@code='g']">
1082 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1086 <xsl:if test="marc:subfield[@code='n']">
1087 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1094 <xsl:if test="marc:datafield[@tag=502]">
1095 <span class="results_summary diss_note">
1096 <span class="label">Dissertation note: </span>
1097 <xsl:for-each select="marc:datafield[@tag=502]">
1098 <xsl:call-template name="subfieldSelect">
1099 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1100 </xsl:call-template>
1102 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1106 <!-- 866 textual holdings -->
1107 <xsl:if test="marc:datafield[@tag=866]">
1108 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1109 <xsl:for-each select="marc:datafield[@tag=866]">
1110 <span class="holdings_note_data">
1111 <xsl:call-template name="subfieldSelect">
1112 <xsl:with-param name="codes">axz</xsl:with-param>
1113 </xsl:call-template>
1114 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1120 <!-- 867 textual holdings -->
1121 <xsl:if test="marc:datafield[@tag=867]">
1122 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1123 <xsl:for-each select="marc:datafield[@tag=867]">
1124 <span class="holdings_note_data">
1125 <xsl:call-template name="subfieldSelect">
1126 <xsl:with-param name="codes">axz</xsl:with-param>
1127 </xsl:call-template>
1128 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1134 <!-- 868 textual holdings -->
1135 <xsl:if test="marc:datafield[@tag=868]">
1136 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1137 <xsl:for-each select="marc:datafield[@tag=868]">
1138 <span class="holdings_note_data">
1139 <xsl:call-template name="subfieldSelect">
1140 <xsl:with-param name="codes">axz</xsl:with-param>
1141 </xsl:call-template>
1142 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1149 <!-- 775 Other Edition -->
1150 <xsl:if test="marc:datafield[@tag=775]">
1151 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1152 <xsl:for-each select="marc:datafield[@tag=775]">
1153 <xsl:variable name="f775">
1154 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1155 <xsl:with-param name="codes">a_t</xsl:with-param>
1156 </xsl:call-template></xsl:with-param></xsl:call-template>
1158 <xsl:if test="marc:subfield[@code='i']">
1159 <xsl:call-template name="subfieldSelect">
1160 <xsl:with-param name="codes">i</xsl:with-param>
1161 </xsl:call-template>
1162 <xsl:text>: </xsl:text>
1166 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1167 <xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1170 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f775, '()', ''), true())"/></xsl:attribute>
1173 <xsl:call-template name="subfieldSelect">
1174 <xsl:with-param name="codes">a_t</xsl:with-param>
1175 </xsl:call-template>
1178 <xsl:when test="position()=last()"></xsl:when>
1179 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1186 <xsl:if test="marc:datafield[@tag=780]">
1187 <xsl:for-each select="marc:datafield[@tag=780]">
1188 <xsl:if test="@ind1=0">
1189 <span class="results_summary preceeding_entry">
1191 <xsl:when test="@ind2=0">
1192 <span class="label">Continues:</span>
1194 <xsl:when test="@ind2=1">
1195 <span class="label">Continues in part:</span>
1197 <xsl:when test="@ind2=2">
1198 <span class="label">Supersedes:</span>
1200 <xsl:when test="@ind2=3">
1201 <span class="label">Supersedes in part:</span>
1203 <xsl:when test="@ind2=4">
1204 <span class="label">Formed by the union: ... and: ...</span>
1206 <xsl:when test="@ind2=5">
1207 <span class="label">Absorbed:</span>
1209 <xsl:when test="@ind2=6">
1210 <span class="label">Absorbed in part:</span>
1212 <xsl:when test="@ind2=7">
1213 <span class="label">Separated from:</span>
1216 <xsl:text> </xsl:text>
1218 <xsl:if test="marc:subfield[@code='i']">
1219 <span class="780_rel_info">
1220 <xsl:value-of select="marc:subfield[@code='i']"/>
1221 <xsl:text> </xsl:text>
1225 <xsl:variable name="f780">
1226 <xsl:call-template name="subfieldSelect">
1227 <xsl:with-param name="codes">a_t</xsl:with-param>
1228 </xsl:call-template>
1231 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1232 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1233 <xsl:value-of select="$f780"/>
1237 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
1238 <xsl:value-of select="$f780"/>
1244 <xsl:if test="marc:subfield[@code='n']">
1245 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1253 <xsl:if test="marc:datafield[@tag=785]">
1254 <xsl:for-each select="marc:datafield[@tag=785]">
1255 <xsl:if test="@ind1=0">
1256 <span class="results_summary succeeding_entry">
1258 <xsl:when test="@ind2=0">
1259 <span class="label">Continued by:</span>
1261 <xsl:when test="@ind2=1">
1262 <span class="label">Continued in part by:</span>
1264 <xsl:when test="@ind2=2">
1265 <span class="label">Superseded by:</span>
1267 <xsl:when test="@ind2=3">
1268 <span class="label">Superseded in part by:</span>
1270 <xsl:when test="@ind2=4">
1271 <span class="label">Absorbed by:</span>
1273 <xsl:when test="@ind2=5">
1274 <span class="label">Absorbed in part by:</span>
1276 <xsl:when test="@ind2=6">
1277 <span class="label">Split into .. and ...:</span>
1279 <xsl:when test="@ind2=7">
1280 <span class="label">Merged with ... to form ...</span>
1282 <xsl:when test="@ind2=8">
1283 <span class="label">Changed back to:</span>
1286 <xsl:text> </xsl:text>
1288 <xsl:if test="marc:subfield[@code='i']">
1289 <span class="785_rel_info">
1290 <xsl:value-of select="marc:subfield[@code='i']"/>
1291 <xsl:text> </xsl:text>
1295 <xsl:variable name="f785">
1296 <xsl:call-template name="subfieldSelect">
1297 <xsl:with-param name="codes">a_t</xsl:with-param>
1298 </xsl:call-template>
1302 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1303 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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>
1304 <xsl:value-of select="$f785"/>
1308 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
1309 <xsl:value-of select="$f785"/>
1319 <xsl:if test="$OPACBaseURL!=''">
1320 <span class="results_summary opac_view"><span class="label">OPAC view: </span>
1321 <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:datafield[@tag=999]/marc:subfield[@code='c'], true())"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>.
1327 <xsl:template name="nameABCQ">
1328 <xsl:call-template name="chopPunctuation">
1329 <xsl:with-param name="chopString">
1330 <xsl:call-template name="subfieldSelect">
1331 <xsl:with-param name="codes">abcq</xsl:with-param>
1332 </xsl:call-template>
1334 <xsl:with-param name="punctuation">
1335 <xsl:text>:,;/ </xsl:text>
1337 </xsl:call-template>
1340 <xsl:template name="nameABCDN">
1341 <xsl:call-template name="chopPunctuation">
1342 <xsl:with-param name="chopString">
1343 <xsl:call-template name="subfieldSelect">
1344 <xsl:with-param name="codes">abcdn</xsl:with-param>
1345 </xsl:call-template>
1347 <xsl:with-param name="punctuation">
1348 <xsl:text>:,;/ </xsl:text>
1350 </xsl:call-template>
1353 <xsl:template name="nameACDEQ">
1354 <xsl:call-template name="subfieldSelect">
1355 <xsl:with-param name="codes">acdeq</xsl:with-param>
1356 </xsl:call-template>
1359 <xsl:template name="specialSubfieldSelect">
1360 <xsl:param name="anyCodes"/>
1361 <xsl:param name="axis"/>
1362 <xsl:param name="beforeCodes"/>
1363 <xsl:param name="afterCodes"/>
1364 <xsl:variable name="str">
1365 <xsl:for-each select="marc:subfield">
1366 <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])">
1367 <xsl:value-of select="text()"/>
1368 <xsl:text> </xsl:text>
1372 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1375 <xsl:template name="showAuthor">
1376 <xsl:param name="authorfield"/>
1377 <xsl:param name="UseAuthoritiesForTracings"/>
1378 <xsl:if test="count($authorfield)>0">
1380 <xsl:for-each select="$authorfield">
1382 <xsl:when test="position()>1"/>
1384 <xsl:when test="@tag<700"><span class="byAuthor">By: </span></xsl:when>
1385 <!--#13382 Changed Additional author to contributor -->
1386 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1390 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1391 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
1394 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
1398 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1400 <xsl:call-template name="chopPunctuation">
1401 <xsl:with-param name="chopString">
1402 <xsl:call-template name="subfieldSelect">
1403 <xsl:with-param name="codes">
1405 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1406 <xsl:when test="@tag=111">aeq</xsl:when>
1407 <xsl:when test="@tag=110">ab</xsl:when>
1408 <xsl:otherwise>abcjq</xsl:otherwise>
1411 </xsl:call-template>
1413 <xsl:with-param name="punctuation">
1414 <xsl:text>:,;/ </xsl:text>
1416 </xsl:call-template>
1417 <!-- Display only name and title portion in 110 field -->
1418 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1419 <span class="titleportion">
1421 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1422 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1424 <xsl:call-template name="chopPunctuation">
1425 <xsl:with-param name="chopString">
1426 <xsl:call-template name="subfieldSelect">
1427 <xsl:with-param name="codes">cdnt</xsl:with-param>
1428 </xsl:call-template>
1430 </xsl:call-template>
1433 <!-- Display only name and title portion in 111 field -->
1434 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1435 <span class="titleportion">
1437 <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>
1438 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1441 <xsl:call-template name="chopPunctuation">
1442 <xsl:with-param name="chopString">
1443 <xsl:call-template name="subfieldSelect">
1444 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1445 </xsl:call-template>
1447 </xsl:call-template>
1450 <!-- Display only dates in 100 field -->
1451 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1452 <span class="authordates">
1453 <xsl:text>, </xsl:text>
1454 <xsl:call-template name="chopPunctuation">
1455 <xsl:with-param name="chopString">
1456 <xsl:call-template name="subfieldSelect">
1457 <xsl:with-param name="codes">d</xsl:with-param>
1458 </xsl:call-template>
1460 </xsl:call-template>
1465 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1466 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1467 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1468 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1469 <xsl:if test="@tag=710 or @tag=711">
1470 <xsl:call-template name="chopPunctuation">
1471 <xsl:with-param name="chopString">
1472 <xsl:call-template name="subfieldSelect">
1473 <xsl:with-param name="codes">
1475 <xsl:when test="@tag=711">aeq</xsl:when>
1476 <xsl:otherwise>ab</xsl:otherwise>
1479 </xsl:call-template>
1481 <xsl:with-param name="punctuation">
1482 <xsl:text>:,;/ </xsl:text>
1484 </xsl:call-template>
1485 <!-- Display only name and title portion in 711 field -->
1486 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1487 <span class="titleportion">
1489 <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>
1490 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1493 <xsl:call-template name="chopPunctuation">
1494 <xsl:with-param name="chopString">
1495 <xsl:call-template name="subfieldSelect">
1496 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1497 </xsl:call-template>
1499 </xsl:call-template>
1502 <!-- Display only name and title portion in 710 field -->
1503 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1504 <span class="titleportion">
1506 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1507 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1509 <xsl:call-template name="chopPunctuation">
1510 <xsl:with-param name="chopString">
1511 <xsl:call-template name="subfieldSelect">
1512 <xsl:with-param name="codes">cdnt</xsl:with-param>
1513 </xsl:call-template>
1515 </xsl:call-template>
1520 <!-- Display only name portion in 700 field -->
1521 <xsl:if test="@tag=700">
1522 <xsl:call-template name="chopPunctuation">
1523 <xsl:with-param name="chopString">
1524 <xsl:call-template name="subfieldSelect">
1525 <xsl:with-param name="codes">abcq</xsl:with-param>
1526 </xsl:call-template>
1528 </xsl:call-template>
1530 <!-- Display class "authordates" in 700 field -->
1531 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1532 <span class="authordates">
1533 <xsl:text>, </xsl:text>
1534 <xsl:call-template name="chopPunctuation">
1535 <xsl:with-param name="chopString">
1536 <xsl:call-template name="subfieldSelect">
1537 <xsl:with-param name="codes">d</xsl:with-param>
1538 </xsl:call-template>
1540 </xsl:call-template>
1543 <!-- Display class "titleportion" in 700 field -->
1544 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1545 <xsl:if test="@tag=700 and $titleportionfields">
1546 <span class="titleportion">
1547 <xsl:text>. </xsl:text>
1548 <xsl:call-template name="chopPunctuation">
1549 <xsl:with-param name="chopString">
1550 <xsl:call-template name="subfieldSelect">
1551 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1552 </xsl:call-template>
1554 </xsl:call-template>
1561 <!-- add relator code too between brackets-->
1562 <!-- #13383 include relator code j for field 111 -->
1563 <xsl:if test="(@tag!=111 and @tag!=711 and marc:subfield[@code='4' or @code='e']) or ((@tag=111 or @tag=711) and marc:subfield[@code='4' or @code='j'])">
1564 <span class="relatorcode">
1565 <xsl:text> [</xsl:text>
1567 <xsl:when test="@tag=111 or @tag=711">
1569 <!-- Prefer j over 4 for fields 111 and 711-->
1570 <xsl:when test="marc:subfield[@code='j']">
1571 <xsl:for-each select="marc:subfield[@code='j']">
1572 <xsl:value-of select="."/>
1573 <xsl:if test="position() != last()">, </xsl:if>
1577 <xsl:for-each select="marc:subfield[@code=4]">
1578 <xsl:value-of select="."/>
1579 <xsl:if test="position() != last()">, </xsl:if>
1584 <!-- Prefer e over 4 for fields 111 and 711-->
1585 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1586 <xsl:for-each select="marc:subfield[@code='e']">
1587 <xsl:value-of select="."/>
1588 <xsl:if test="position() != last()">, </xsl:if>
1592 <xsl:for-each select="marc:subfield[@code=4]">
1593 <xsl:value-of select="."/>
1594 <xsl:if test="position() != last()">, </xsl:if>
1598 <xsl:text>]</xsl:text>
1603 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1611 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1612 <xsl:template name="subfieldSelectSubject">
1613 <xsl:param name="codes"/>
1614 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1615 <xsl:param name="subdivCodes"/>
1616 <xsl:param name="subdivDelimiter"/>
1617 <xsl:param name="prefix"/>
1618 <xsl:param name="suffix"/>
1619 <xsl:param name="urlencode"/>
1620 <xsl:variable name="str">
1621 <xsl:for-each select="marc:subfield">
1622 <xsl:if test="contains($codes, @code)">
1623 <xsl:if test="contains($subdivCodes, @code)">
1624 <xsl:value-of select="$subdivDelimiter"/>
1626 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1631 <xsl:when test="$urlencode=1">
1632 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1635 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>