Bug 26825: Add span for publication date in OPAC
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / xslt / MARC21slim2OPACDetail.xsl
blobf768671aab26a8bf2930befeadd9bb8abf565f6c
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 "&#160;" >]>
5 <xsl:stylesheet version="1.0"
6 xmlns:marc="http://www.loc.gov/MARC21/slim"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:str="http://exslt.org/strings"
9 exclude-result-prefixes="marc str">
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/>
15 </xsl:template>
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">
35 <xsl:choose>
36 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
37 <xsl:otherwise>"</xsl:otherwise>
38 </xsl:choose>
39 </xsl:variable>
40 <xsl:variable name="TracingQuotesRight">
41 <xsl:choose>
42 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
43 <xsl:otherwise>"</xsl:otherwise>
44 </xsl:choose>
45 </xsl:variable>
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">
52 <xsl:choose>
53 <xsl:when test="$leader19='a'">ST</xsl:when>
54 <xsl:when test="$leader6='a'">
55 <xsl:choose>
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>
59 </xsl:choose>
60 </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'">VM</xsl:when>
66 <xsl:when test="$leader6='k'">PK</xsl:when>
67 <xsl:when test="$leader6='r'">OB</xsl:when>
68 <xsl:when test="$leader6='i'">MU</xsl:when>
69 <xsl:when test="$leader6='j'">MU</xsl:when>
70 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
71 </xsl:choose>
72 </xsl:variable>
73 <xsl:variable name="materialTypeLabel">
74 <xsl:choose>
75 <xsl:when test="$leader19='a'">Set</xsl:when>
76 <xsl:when test="$leader6='a'">
77 <xsl:choose>
78 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Text</xsl:when>
79 <xsl:when test="$leader7='i' or $leader7='s'">
80 <xsl:choose>
81 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
82 <xsl:otherwise>Series</xsl:otherwise>
83 </xsl:choose>
84 </xsl:when>
85 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
86 </xsl:choose>
87 </xsl:when>
88 <xsl:when test="$leader6='t'">Text</xsl:when>
89 <xsl:when test="$leader6='o'">Kit</xsl:when>
90 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
91 <xsl:when test="$leader6='m'">Computer file</xsl:when>
92 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
93 <xsl:when test="$leader6='g'">Film</xsl:when>
94 <xsl:when test="$leader6='k'">Picture</xsl:when>
95 <xsl:when test="$leader6='r'">Object</xsl:when>
96 <xsl:when test="$leader6='j'">Music</xsl:when>
97 <xsl:when test="$leader6='i'">Sound</xsl:when>
98 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
99 </xsl:choose>
100 </xsl:variable>
102 <!-- Schema.org type -->
103 <xsl:variable name="schemaOrgType">
104 <xsl:choose>
105 <xsl:when test="$materialTypeLabel='Book'">Book</xsl:when>
106 <xsl:when test="$materialTypeLabel='Map'">Map</xsl:when>
107 <xsl:when test="$materialTypeLabel='Music'">MusicAlbum</xsl:when>
108 <xsl:otherwise>CreativeWork</xsl:otherwise>
109 </xsl:choose>
110 </xsl:variable>
112 <!-- Wrapper div for our schema.org object -->
113 <xsl:element name="div">
114 <xsl:attribute name="class"><xsl:value-of select="'record'" /></xsl:attribute>
115 <xsl:attribute name="vocab">http://schema.org/</xsl:attribute>
116 <xsl:attribute name="typeof"><xsl:value-of select='$schemaOrgType' /> Product</xsl:attribute>
117 <xsl:attribute name="resource">#record</xsl:attribute>
119 <!-- Title Statement -->
120 <!-- Alternate Graphic Representation (MARC 880) -->
121 <xsl:if test="$display880">
122 <h2 class="title" property="alternateName">
123 <xsl:call-template name="m880Select">
124 <xsl:with-param name="basetags">245</xsl:with-param>
125 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
126 </xsl:call-template>
127 </h2>
128 </xsl:if>
130 <!--Bug 13381 -->
131 <xsl:if test="marc:datafield[@tag=245]">
132 <h2 class="title" property="name">
133 <xsl:for-each select="marc:datafield[@tag=245]">
134 <xsl:call-template name="subfieldSelect">
135 <xsl:with-param name="codes">a</xsl:with-param>
136 </xsl:call-template>
137 <xsl:text> </xsl:text>
138 <!-- 13381 add additional subfields-->
139 <!-- bug17625 adding f and g subfields -->
140 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
141 <xsl:choose>
142 <xsl:when test="@code='h'">
143 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
144 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
145 </xsl:when>
146 <xsl:when test="@code='c'">
147 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
148 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
149 </xsl:when>
150 <xsl:otherwise>
151 <xsl:apply-templates/>
152 <xsl:text> </xsl:text>
153 </xsl:otherwise>
154 </xsl:choose>
155 </xsl:for-each>
156 </xsl:for-each>
157 </h2>
158 </xsl:if>
161 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
162 <xsl:if test="$display880">
163 <span class="results_summary author h3">
164 <xsl:call-template name="m880Select">
165 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
166 <xsl:with-param name="codes">abc</xsl:with-param>
167 <xsl:with-param name="index">au</xsl:with-param>
168 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
169 </xsl:call-template>
170 </span>
171 </xsl:if>
173 <!--#13382 Added Author Statement to separate Authors and Contributors -->
174 <xsl:call-template name="showAuthor">
175 <xsl:with-param name="authorfield" select="marc:datafield[(@tag=100 or @tag=110 or @tag=111)]"/>
176 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
177 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
178 <xsl:with-param name="theme" select="$theme"/>
179 </xsl:call-template>
181 <xsl:call-template name="showAuthor">
182 <!-- #13382 suppress 700$i and 7xx/@ind2=2 -->
183 <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'])]"/>
184 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
185 <xsl:with-param name="materialTypeLabel" select="$materialTypeLabel"/>
186 <xsl:with-param name="theme" select="$theme"/>
187 </xsl:call-template>
189 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
190 <xsl:if test="$materialTypeCode!=''">
191 <span class="results_summary type"><span class="label">Material type: </span>
192 <xsl:element name="img">
193 <xsl:attribute name="src">/opac-tmpl/lib/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute>
194 <xsl:attribute name="alt"><xsl:value-of select="$materialTypeLabel"/></xsl:attribute>
195 <xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute>
196 </xsl:element>
197 <xsl:value-of select="$materialTypeLabel"/>
198 </span>
199 </xsl:if>
200 </xsl:if>
202 <xsl:call-template name="show-lang-041"/>
204 <!--Series: Alternate Graphic Representation (MARC 880) -->
205 <xsl:if test="$display880">
206 <xsl:call-template name="m880Select">
207 <xsl:with-param name="basetags">440,490</xsl:with-param>
208 <xsl:with-param name="codes">av</xsl:with-param>
209 <xsl:with-param name="class">results_summary series</xsl:with-param>
210 <xsl:with-param name="label">Series: </xsl:with-param>
211 <xsl:with-param name="index">se</xsl:with-param>
212 </xsl:call-template>
213 </xsl:if>
215 <xsl:call-template name="show-series">
216 <xsl:with-param name="searchurl">/cgi-bin/koha/opac-search.pl</xsl:with-param>
217 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
218 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
219 </xsl:call-template>
221 <!-- Analytics information -->
222 <xsl:variable name="leader7_class">
223 <xsl:choose>
224 <!--xsl:when test="$leader7='a'">analytic_mcp</xsl:when-->
225 <!--xsl:when test="$leader7='b'">analytic_scp</xsl:when-->
226 <xsl:when test="$leader7='c'">analytic_collection</xsl:when>
227 <xsl:when test="$leader7='d'">analytic_subunit</xsl:when>
228 <xsl:when test="$leader7='i'">analytic_ires</xsl:when>
229 <xsl:when test="$leader7='m'">analytic_monograph</xsl:when>
230 <xsl:when test="$leader7='s'">analytic_serial</xsl:when>
231 <xsl:otherwise>analytic_undefined</xsl:otherwise>
232 </xsl:choose>
233 </xsl:variable>
235 <xsl:variable name="show_analytics_link" select="marc:variables/marc:variable[@name='show_analytics_link']" />
236 <xsl:if test="$show_analytics_link='1'">
237 <xsl:element name="span">
238 <xsl:attribute name="class">results_summary analytics <xsl:value-of select="$leader7_class"/></xsl:attribute>
239 <span class="label">Analytics: </span>
241 <xsl:choose>
242 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
243 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+AND+(bib-level:a+OR+bib-level:b)</xsl:attribute>
244 </xsl:when>
245 <xsl:otherwise>
246 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
247 </xsl:otherwise>
248 </xsl:choose>
249 <xsl:text>Show analytics</xsl:text>
250 </a>
251 </xsl:element>
252 </xsl:if>
254 <!-- Volumes of sets and traced series -->
255 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
256 <span class="results_summary volumes"><span class="label">Volumes: </span>
258 <xsl:choose>
259 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
260 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+NOT+(bib-level:a+OR+bib-level:b)</xsl:attribute>
261 </xsl:when>
262 <xsl:otherwise>
263 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
264 </xsl:otherwise>
265 </xsl:choose>
266 <xsl:text>Show volumes</xsl:text>
267 </a>
268 </span>
269 </xsl:if>
271 <!-- Set -->
272 <xsl:if test="$leader19='c'">
273 <span class="results_summary set"><span class="label">Set: </span>
274 <xsl:for-each select="marc:datafield[@tag=773]">
276 <xsl:choose>
277 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
278 <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>
279 </xsl:when>
280 <xsl:otherwise>
281 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
282 </xsl:otherwise>
283 </xsl:choose>
284 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
285 </a>
286 <xsl:choose>
287 <xsl:when test="position()=last()"></xsl:when>
288 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
289 </xsl:choose>
290 </xsl:for-each>
291 </span>
292 </xsl:if>
294 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
295 <xsl:if test="$display880">
296 <xsl:call-template name="m880Select">
297 <xsl:with-param name="basetags">260</xsl:with-param>
298 <xsl:with-param name="codes">abcg</xsl:with-param>
299 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
300 <xsl:with-param name="label">Publication details: </xsl:with-param>
301 </xsl:call-template>
302 </xsl:if>
304 <!-- Publisher info and RDA related info from tags 260, 264 -->
305 <xsl:choose>
306 <xsl:when test="marc:datafield[@tag=264]">
307 <xsl:call-template name="showRDAtag264">
308 <xsl:with-param name="show_url">1</xsl:with-param>
309 </xsl:call-template>
310 </xsl:when>
311 <xsl:when test="marc:datafield[@tag=260]">
312 <span class="results_summary publisher"><span class="label">Publication details: </span>
313 <xsl:for-each select="marc:datafield[@tag=260]">
314 <span property="publisher" typeof="Organization">
315 <xsl:if test="marc:subfield[@code='a']">
316 <span class="publisher_place" property="location">
317 <xsl:call-template name="subfieldSelect">
318 <xsl:with-param name="codes">a</xsl:with-param>
319 </xsl:call-template>
320 </span>
321 </xsl:if>
322 <xsl:text> </xsl:text>
323 <xsl:if test="marc:subfield[@code='b']">
324 <span property="name" class="publisher_name">
325 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Provider:<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/></xsl:attribute>
326 <xsl:call-template name="subfieldSelect">
327 <xsl:with-param name="codes">b</xsl:with-param>
328 </xsl:call-template>
329 </a>
330 </span>
331 </xsl:if>
332 </span>
333 <xsl:text> </xsl:text>
334 <xsl:if test="marc:subfield[@code='c' or @code='g']">
335 <span property="datePublished" class="publisher_date">
336 <xsl:call-template name="chopPunctuation">
337 <xsl:with-param name="chopString">
338 <xsl:call-template name="subfieldSelect">
339 <xsl:with-param name="codes">cg</xsl:with-param>
340 </xsl:call-template>
341 </xsl:with-param>
342 </xsl:call-template>
343 </span>
344 </xsl:if>
345 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
346 </xsl:for-each>
347 </span>
348 </xsl:when>
349 </xsl:choose>
351 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
352 <xsl:if test="$display880">
353 <xsl:call-template name="m880Select">
354 <xsl:with-param name="basetags">250</xsl:with-param>
355 <xsl:with-param name="codes">ab</xsl:with-param>
356 <xsl:with-param name="class">results_summary edition</xsl:with-param>
357 <xsl:with-param name="label">Edition: </xsl:with-param>
358 </xsl:call-template>
359 </xsl:if>
361 <xsl:if test="marc:datafield[@tag=250]">
362 <span class="results_summary edition"><span class="label">Edition: </span>
363 <xsl:for-each select="marc:datafield[@tag=250]">
364 <span property="bookEdition">
365 <xsl:call-template name="chopPunctuation">
366 <xsl:with-param name="chopString">
367 <xsl:call-template name="subfieldSelect">
368 <xsl:with-param name="codes">ab</xsl:with-param>
369 </xsl:call-template>
370 </xsl:with-param>
371 </xsl:call-template>
372 </span>
373 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
374 </xsl:for-each>
375 </span>
376 </xsl:if>
378 <!-- Description: Alternate Graphic Representation (MARC 880) -->
379 <xsl:if test="$display880">
380 <xsl:call-template name="m880Select">
381 <xsl:with-param name="basetags">300</xsl:with-param>
382 <xsl:with-param name="codes">abceg</xsl:with-param>
383 <xsl:with-param name="class">results_summary description</xsl:with-param>
384 <xsl:with-param name="label">Description: </xsl:with-param>
385 </xsl:call-template>
386 </xsl:if>
388 <xsl:if test="marc:datafield[@tag=300]">
389 <span class="results_summary description"><span class="label">Description: </span>
390 <xsl:for-each select="marc:datafield[@tag=300]">
391 <span property="description">
392 <xsl:call-template name="chopPunctuation">
393 <xsl:with-param name="chopString">
394 <xsl:call-template name="subfieldSelect">
395 <xsl:with-param name="codes">abcefg</xsl:with-param>
396 </xsl:call-template>
397 </xsl:with-param>
398 </xsl:call-template>
399 </span>
400 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
401 </xsl:for-each>
402 </span>
403 </xsl:if>
406 <!-- Content Type -->
407 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
408 <span class="results_summary" id="content_type">
409 <xsl:if test="marc:datafield[@tag=336]">
410 <span class="label">Content type: </span>
411 <xsl:for-each select="marc:datafield[@tag=336]">
412 <xsl:call-template name="subfieldSelect">
413 <xsl:with-param name="codes">a</xsl:with-param>
414 <xsl:with-param name="delimeter">, </xsl:with-param>
415 </xsl:call-template>
416 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
417 </xsl:for-each>
418 </xsl:if>
419 <xsl:text> </xsl:text>
420 <!-- Media Type -->
421 <xsl:if test="marc:datafield[@tag=337]">
422 <span class="label">Media type: </span>
423 <xsl:for-each select="marc:datafield[@tag=337]">
424 <xsl:call-template name="subfieldSelect">
425 <xsl:with-param name="codes">a</xsl:with-param>
426 <xsl:with-param name="delimeter">, </xsl:with-param>
427 </xsl:call-template>
428 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
429 </xsl:for-each>
430 </xsl:if>
431 <xsl:text> </xsl:text>
432 <!-- Media Type -->
433 <xsl:if test="marc:datafield[@tag=338]">
434 <span class="label">Carrier type: </span>
435 <xsl:for-each select="marc:datafield[@tag=338]">
436 <xsl:call-template name="subfieldSelect">
437 <xsl:with-param name="codes">a</xsl:with-param>
438 <xsl:with-param name="delimeter">, </xsl:with-param>
439 </xsl:call-template>
440 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
441 </xsl:for-each>
442 </xsl:if>
443 </span>
444 </xsl:if>
446 <!-- 385 - Audience -->
447 <xsl:if test="marc:datafield[@tag=385]">
448 <span class="results_summary audience">
449 <span class="label">Audience: </span>
450 <xsl:for-each select="marc:datafield[@tag=385]">
451 <xsl:if test="marc:subfield[@code='m']">
452 <xsl:call-template name="chopPunctuation">
453 <xsl:with-param name="chopString">
454 <xsl:call-template name="subfieldSelect">
455 <xsl:with-param name="codes">m</xsl:with-param>
456 </xsl:call-template>
457 </xsl:with-param>
458 </xsl:call-template>
459 <xsl:text>: </xsl:text>
460 </xsl:if>
461 <xsl:call-template name="chopPunctuation">
462 <xsl:with-param name="chopString">
463 <xsl:call-template name="subfieldSelect">
464 <xsl:with-param name="codes">a</xsl:with-param>
465 <xsl:with-param name="delimeter">, </xsl:with-param>
466 </xsl:call-template>
467 </xsl:with-param>
468 </xsl:call-template>
469 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise></xsl:choose>
470 </xsl:for-each>
471 </span>
472 </xsl:if>
474 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
475 <span class="results_summary isbn"><span class="label">ISBN: </span>
476 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
477 <span property="isbn">
478 <xsl:value-of select="."/>
479 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
480 </span>
481 </xsl:for-each>
482 </span>
483 </xsl:if>
485 <!-- Build ISSN -->
486 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
487 <span class="results_summary issn"><span class="label">ISSN: </span>
488 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
489 <span property="issn">
490 <xsl:value-of select="."/>
491 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
492 </span>
493 </xsl:for-each>
494 </span>
495 </xsl:if>
497 <xsl:if test="marc:datafield[@tag=013]">
498 <span class="results_summary patent_info">
499 <span class="label">Patent information: </span>
500 <xsl:for-each select="marc:datafield[@tag=013]">
501 <xsl:call-template name="subfieldSelect">
502 <xsl:with-param name="codes">acdef</xsl:with-param>
503 <xsl:with-param name="delimeter">, </xsl:with-param>
504 </xsl:call-template>
505 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
506 </xsl:for-each>
507 </span>
508 </xsl:if>
510 <xsl:if test="marc:datafield[@tag=088]">
511 <span class="results_summary report_number">
512 <span class="label">Report number: </span>
513 <xsl:for-each select="marc:datafield[@tag=088]">
514 <xsl:call-template name="subfieldSelect">
515 <xsl:with-param name="codes">a</xsl:with-param>
516 </xsl:call-template>
517 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
518 </xsl:for-each>
519 </span>
520 </xsl:if>
522 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
523 <xsl:if test="$display880">
524 <xsl:call-template name="m880Select">
525 <xsl:with-param name="basetags">246</xsl:with-param>
526 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
527 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
528 <xsl:with-param name="label">Other title: </xsl:with-param>
529 </xsl:call-template>
530 </xsl:if>
532 <xsl:if test="marc:datafield[@tag=246]">
533 <span class="results_summary other_title"><span class="label">Other title: </span>
534 <xsl:for-each select="marc:datafield[@tag=246]">
535 <span property="alternateName">
536 <xsl:call-template name="chopPunctuation">
537 <xsl:with-param name="chopString">
538 <xsl:if test="marc:subfield[@code='i']">
539 <xsl:call-template name="subfieldSelect">
540 <xsl:with-param name="codes">i</xsl:with-param>
541 </xsl:call-template>
542 </xsl:if>
543 <xsl:text> </xsl:text>
544 <xsl:call-template name="subfieldSelect">
545 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
546 </xsl:call-template>
547 </xsl:with-param>
548 </xsl:call-template>
549 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
550 <xsl:choose>
551 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
552 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
553 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
554 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
555 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
556 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
557 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
558 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
559 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
560 </xsl:choose>
561 </xsl:if>
562 </span>
563 <!-- #13386 added separator | -->
564 <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>
565 </xsl:for-each>
566 </span>
567 </xsl:if>
570 <xsl:if test="marc:datafield[@tag=242]">
571 <span class="results_summary translated_title"><span class="label">Title translated: </span>
572 <xsl:for-each select="marc:datafield[@tag=242]">
573 <span property="alternateName">
574 <xsl:call-template name="chopPunctuation">
575 <xsl:with-param name="chopString">
576 <xsl:call-template name="subfieldSelect">
577 <xsl:with-param name="codes">abchnp</xsl:with-param>
578 </xsl:call-template>
579 </xsl:with-param>
580 </xsl:call-template>
581 </span>
582 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
583 </xsl:for-each>
584 </span>
585 </xsl:if>
587 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
588 <xsl:if test="$display880">
589 <span property="alternateName">
590 <xsl:call-template name="m880Select">
591 <xsl:with-param name="basetags">130,240</xsl:with-param>
592 <xsl:with-param name="codes">adfklmor</xsl:with-param>
593 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
594 <xsl:with-param name="label">Uniform titles: </xsl:with-param>
595 </xsl:call-template>
596 </span>
597 </xsl:if>
599 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
600 <span class="results_summary uniform_titles"><span class="label">Uniform titles: </span>
601 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
602 <span property="alternateName">
603 <xsl:if test="marc:subfield[@code='i']">
604 <xsl:call-template name="subfieldSelect">
605 <xsl:with-param name="codes">i</xsl:with-param>
606 </xsl:call-template>
607 </xsl:if>
608 <xsl:text> </xsl:text>
609 <xsl:for-each select="marc:subfield">
610 <xsl:if test="contains('adfghklmnoprst',@code)">
611 <xsl:value-of select="text()"/>
612 <xsl:text> </xsl:text>
613 </xsl:if>
614 </xsl:for-each>
615 </span>
616 <xsl:if test="position() != last()">
617 <span class="separator"><xsl:text> | </xsl:text></span>
618 </xsl:if>
619 </xsl:for-each>
620 </span>
621 </xsl:if>
624 <!-- #13382 Added Related works 700$i -->
625 <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']]">
626 <span class="results_summary related_works"><span class="label">Related works: </span>
627 <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']]">
628 <xsl:variable name="str">
629 <xsl:call-template name="subfieldSelect">
630 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
631 </xsl:call-template>
632 </xsl:variable>
633 <xsl:call-template name="chopPunctuation">
634 <xsl:with-param name="chopString">
635 <xsl:value-of select="$str"/>
636 </xsl:with-param>
637 </xsl:call-template>
638 <!-- add relator code too between brackets-->
639 <xsl:if test="marc:subfield[@code='4' or @code='e']">
640 <span class="relatorcode">
641 <xsl:text> [</xsl:text>
642 <xsl:choose>
643 <xsl:when test="marc:subfield[@code='e']">
644 <xsl:for-each select="marc:subfield[@code='e']">
645 <xsl:value-of select="."/>
646 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
647 </xsl:for-each>
648 </xsl:when>
649 <xsl:otherwise>
650 <xsl:for-each select="marc:subfield[@code='4']">
651 <xsl:value-of select="."/>
652 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
653 </xsl:for-each>
654 </xsl:otherwise>
655 </xsl:choose>
656 <xsl:text>]</xsl:text>
657 </span>
658 </xsl:if>
659 <xsl:choose>
660 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
661 </xsl:choose>
662 </xsl:for-each>
663 </span>
664 </xsl:if>
666 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
667 <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'])]">
668 <span class="results_summary contained_works"><span class="label">Contained works: </span>
669 <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'])]">
670 <xsl:variable name="str">
671 <xsl:call-template name="subfieldSelect">
672 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
673 </xsl:call-template>
674 </xsl:variable>
675 <xsl:call-template name="chopPunctuation">
676 <xsl:with-param name="chopString">
677 <xsl:value-of select="$str"/>
678 </xsl:with-param>
679 </xsl:call-template>
680 <!-- add relator code too between brackets-->
681 <xsl:if test="marc:subfield[@code='4' or @code='e']">
682 <span class="relatorcode">
683 <xsl:text> [</xsl:text>
684 <xsl:choose>
685 <xsl:when test="marc:subfield[@code='e']">
686 <xsl:for-each select="marc:subfield[@code='e']">
687 <xsl:value-of select="."/>
688 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
689 </xsl:for-each>
690 </xsl:when>
691 <xsl:otherwise>
692 <xsl:for-each select="marc:subfield[@code='4']">
693 <xsl:value-of select="."/>
694 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
695 </xsl:for-each>
696 </xsl:otherwise>
697 </xsl:choose>
698 <xsl:text>]</xsl:text>
699 </span>
700 </xsl:if>
701 <xsl:choose>
702 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
703 </xsl:choose>
704 </xsl:for-each>
705 </span>
706 </xsl:if>
708 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
709 <span class="results_summary subjects"><span class="label">Subject(s): </span>
710 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
711 <span property="keywords">
713 <xsl:attribute name="class">subject</xsl:attribute>
714 <xsl:choose>
715 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
716 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
717 </xsl:when>
718 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
719 <xsl:when test="$TraceSubjectSubdivisions='1'">
720 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
721 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
722 <xsl:with-param name="delimeter"> AND </xsl:with-param>
723 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
724 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
725 <xsl:with-param name="urlencode">1</xsl:with-param>
726 </xsl:call-template>
727 </xsl:attribute>
728 </xsl:when>
729 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
730 <xsl:otherwise>
731 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'],'()',''), true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
732 </xsl:otherwise>
733 </xsl:choose>
734 <xsl:call-template name="chopPunctuation">
735 <xsl:with-param name="chopString">
736 <xsl:call-template name="subfieldSelect">
737 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
738 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
739 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
740 </xsl:call-template>
741 </xsl:with-param>
742 </xsl:call-template>
743 </a>
744 </span>
745 <xsl:if test="marc:subfield[@code=9]">
746 <a class='authlink'>
747 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
748 <xsl:element name="i">
749 <xsl:attribute name="class">fa fa-search</xsl:attribute>
750 </xsl:element>
751 </a>
752 </xsl:if>
753 <xsl:choose>
754 <xsl:when test="position()=last()"></xsl:when>
755 <xsl:otherwise> | </xsl:otherwise>
756 </xsl:choose>
758 </xsl:for-each>
759 </span>
760 </xsl:if>
762 <!-- Genre/Form -->
763 <xsl:if test="marc:datafield[@tag=655]">
764 <span class="results_summary genre"><span class="label">Genre/Form: </span>
765 <xsl:for-each select="marc:datafield[@tag=655]">
767 <xsl:choose>
768 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
769 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
770 </xsl:when>
771 <xsl:when test="$TraceSubjectSubdivisions='1'">
772 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelectSubject">
773 <xsl:with-param name="codes">avxyz</xsl:with-param>
774 <xsl:with-param name="delimeter"> AND </xsl:with-param>
775 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
776 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
777 <xsl:with-param name="urlencode">1</xsl:with-param>
778 </xsl:call-template>
779 </xsl:attribute>
780 </xsl:when>
781 <xsl:otherwise>
782 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
783 </xsl:otherwise>
784 </xsl:choose>
785 <xsl:call-template name="subfieldSelect">
786 <xsl:with-param name="codes">avxyz</xsl:with-param>
787 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
788 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
789 </xsl:call-template>
790 </a>
791 <xsl:if test="marc:subfield[@code=9]">
792 <xsl:text> </xsl:text>
793 <a class='authlink'>
794 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
795 <xsl:element name="i">
796 <xsl:attribute name="class">fa fa-search</xsl:attribute>
797 </xsl:element>
798 </a>
799 </xsl:if>
800 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
801 </xsl:for-each>
802 </span>
803 </xsl:if>
805 <!-- MARC21 776 Additional Physical Form Entry -->
806 <xsl:if test="marc:datafield[@tag=776]">
807 <span class="results_summary add_physical_form">
808 <span class="label">Additional physical formats: </span>
809 <xsl:for-each select="marc:datafield[@tag=776]">
810 <xsl:variable name="linktext">
811 <xsl:choose>
812 <xsl:when test="marc:subfield[@code='t']">
813 <xsl:value-of select="marc:subfield[@code='t']"/>
814 </xsl:when>
815 <xsl:when test="marc:subfield[@code='a']">
816 <xsl:value-of select="marc:subfield[@code='a']"/>
817 </xsl:when>
818 <xsl:otherwise>
819 <xsl:text>No title</xsl:text>
820 </xsl:otherwise>
821 </xsl:choose>
822 </xsl:variable>
823 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
824 <xsl:call-template name="subfieldSelect">
825 <xsl:with-param name="codes">i</xsl:with-param>
826 </xsl:call-template>
827 <xsl:text>: </xsl:text>
828 </xsl:if>
829 <xsl:choose>
830 <xsl:when test="marc:subfield[@code='w']">
832 <xsl:attribute name="href">
833 <xsl:text>/cgi-bin/koha/opac-search.pl?q=control-number:</xsl:text>
834 <xsl:call-template name="extractControlNumber">
835 <xsl:with-param name="subfieldW">
836 <xsl:value-of select="marc:subfield[@code='w']"/>
837 </xsl:with-param>
838 </xsl:call-template>
839 </xsl:attribute>
840 <xsl:value-of select="$linktext"/>
841 </a>
842 </xsl:when>
843 <xsl:otherwise>
844 <xsl:value-of select="$linktext"/>
845 </xsl:otherwise>
846 </xsl:choose>
847 <xsl:if test="position() != last()">
848 <xsl:text>; </xsl:text>
849 </xsl:if>
850 </xsl:for-each>
851 </span>
852 </xsl:if>
854 <!-- MARC21 777 - Issued With Entry -->
855 <xsl:if test="marc:datafield[@tag=777]">
856 <xsl:for-each select="marc:datafield[@tag=777]">
857 <xsl:if test="@ind1 != 1">
858 <span class="results_summary issued_with">
859 <span class="label">
860 <xsl:choose>
861 <xsl:when test="@ind2=8 and marc:subfield[@code='i']">
862 <xsl:value-of select="marc:subfield[@code='i']"/>
863 </xsl:when>
864 <xsl:otherwise>
865 <xsl:text>Issued with:</xsl:text>
866 </xsl:otherwise>
867 </xsl:choose>
868 <xsl:text> </xsl:text>
869 </span>
870 <xsl:variable name="f777">
871 <xsl:call-template name="chopPunctuation">
872 <xsl:with-param name="chopString">
873 <xsl:call-template name="subfieldSelect">
874 <xsl:with-param name="codes">a_t</xsl:with-param>
875 </xsl:call-template>
876 </xsl:with-param>
877 </xsl:call-template>
878 </xsl:variable>
879 <xsl:choose>
880 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
881 <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>
882 <xsl:value-of select="translate($f777, '()', '')"/>
883 </a>
884 </xsl:when>
885 <xsl:otherwise>
886 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/></xsl:attribute>
887 <xsl:value-of select="$f777"/>
888 </a>
889 </xsl:otherwise>
890 </xsl:choose>
891 <xsl:if test="marc:subfield[@code='g']">
892 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
893 </xsl:if>
894 </span>
895 <xsl:if test="marc:subfield[@code='n']">
896 <xsl:text> </xsl:text><span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
897 </xsl:if>
898 </xsl:if>
899 </xsl:for-each>
900 </xsl:if>
902 <!-- DDC classification -->
903 <xsl:if test="marc:datafield[@tag=082]">
904 <span class="results_summary ddc">
905 <span class="label">DDC classification: </span>
906 <xsl:for-each select="marc:datafield[@tag=082]">
907 <xsl:call-template name="subfieldSelect">
908 <xsl:with-param name="codes">a</xsl:with-param>
909 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
910 </xsl:call-template>
911 <xsl:choose>
912 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
913 <xsl:otherwise> | </xsl:otherwise>
914 </xsl:choose>
915 </xsl:for-each>
916 </span>
917 </xsl:if>
919 <!-- LOC classification -->
920 <xsl:if test="marc:datafield[@tag=050]">
921 <span class="results_summary loc">
922 <span class="label">LOC classification: </span>
923 <xsl:for-each select="marc:datafield[@tag=050]">
924 <xsl:call-template name="subfieldSelect">
925 <xsl:with-param name="codes">ab</xsl:with-param>
926 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
927 </xsl:call-template>
928 </xsl:for-each>
929 </span>
930 </xsl:if>
932 <!-- NLM classification -->
933 <xsl:if test="marc:datafield[@tag=060]">
934 <span class="results_summary nlm">
935 <span class="label">NLM classification: </span>
936 <xsl:for-each select="marc:datafield[@tag=060]">
937 <xsl:call-template name="subfieldSelect">
938 <xsl:with-param name="codes">a</xsl:with-param>
939 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
940 </xsl:call-template>
941 <xsl:if test="not(position()=last())"><xsl:text> | </xsl:text></xsl:if>
942 </xsl:for-each>
943 </span>
944 </xsl:if>
946 <!-- Other classification -->
947 <xsl:if test="marc:datafield[@tag=084]">
948 <span class="results_summary oc">
949 <span class="label">Other classification: </span>
950 <xsl:for-each select="marc:datafield[@tag=084]">
951 <xsl:call-template name="subfieldSelect">
952 <xsl:with-param name="codes">a</xsl:with-param>
953 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
954 </xsl:call-template>
955 <xsl:choose>
956 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
957 <xsl:otherwise> | </xsl:otherwise>
958 </xsl:choose>
959 </xsl:for-each>
960 </span>
961 </xsl:if>
964 <!-- Image processing code added here, takes precedence over text links including y3z text -->
965 <xsl:if test="marc:datafield[@tag=856]">
966 <span class="results_summary online_resources"><span class="label">Online resources: </span>
967 <xsl:for-each select="marc:datafield[@tag=856]">
968 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
969 <a property="url">
970 <xsl:choose>
971 <xsl:when test="$OPACTrackClicks='track'">
972 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&amp;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
973 </xsl:when>
974 <xsl:when test="$OPACTrackClicks='anonymous'">
975 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&amp;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
976 </xsl:when>
977 <xsl:otherwise>
978 <xsl:attribute name="href">
979 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
980 <xsl:choose>
981 <xsl:when test="@ind1=7">
982 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
983 </xsl:when>
984 <xsl:when test="@ind1=1">
985 <xsl:text>ftp://</xsl:text>
986 </xsl:when>
987 <xsl:otherwise>
988 <xsl:text>http://</xsl:text>
989 </xsl:otherwise>
990 </xsl:choose>
991 </xsl:if>
992 <xsl:value-of select="marc:subfield[@code='u']"/>
993 </xsl:attribute>
994 </xsl:otherwise>
995 </xsl:choose>
996 <xsl:if test="$OPACURLOpenInNewWindow='1'">
997 <xsl:attribute name="target">_blank</xsl:attribute>
998 </xsl:if>
999 <xsl:choose>
1000 <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')">
1001 <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>
1002 </xsl:when>
1003 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1004 <xsl:call-template name="subfieldSelect">
1005 <xsl:with-param name="codes">y3z</xsl:with-param>
1006 </xsl:call-template>
1007 </xsl:when>
1008 <xsl:when test="$URLLinkText!=''">
1009 <xsl:value-of select="$URLLinkText"/>
1010 </xsl:when>
1011 <xsl:otherwise>
1012 <xsl:text>Click here to access online</xsl:text>
1013 </xsl:otherwise>
1014 </xsl:choose>
1015 </a>
1016 <xsl:choose>
1017 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1018 <xsl:otherwise> | </xsl:otherwise>
1019 </xsl:choose>
1020 </xsl:for-each>
1021 </span>
1022 </xsl:if>
1024 <!-- 530 -->
1025 <xsl:if test="marc:datafield[@tag=530]">
1026 <xsl:for-each select="marc:datafield[@tag=530]">
1027 <span class="results_summary additionalforms">
1028 <xsl:call-template name="subfieldSelect">
1029 <xsl:with-param name="codes">abcd</xsl:with-param>
1030 </xsl:call-template>
1031 <xsl:for-each select="marc:subfield[@code='u']">
1032 <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
1033 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1034 <xsl:attribute name="target">_blank</xsl:attribute>
1035 </xsl:if>
1036 <xsl:value-of select="text()"/>
1037 </a>
1038 </xsl:for-each>
1039 </span>
1040 </xsl:for-each>
1041 </xsl:if>
1043 <!-- 505 - Formatted contents note -->
1044 <xsl:if test="marc:datafield[@tag=505]">
1045 <div class="results_summary contents">
1046 <xsl:for-each select="marc:datafield[@tag=505]">
1047 <xsl:if test="position()=1">
1048 <xsl:choose>
1049 <xsl:when test="@ind1=1">
1050 <span class="label">Incomplete contents:</span>
1051 </xsl:when>
1052 <xsl:when test="@ind1=2">
1053 <span class="label">Partial contents:</span>
1054 </xsl:when>
1055 <xsl:otherwise>
1056 <span class="label">Contents:</span>
1057 </xsl:otherwise>
1058 </xsl:choose>
1059 </xsl:if>
1060 <div class='contentblock' property='description'>
1061 <xsl:choose>
1062 <xsl:when test="@ind2=0">
1063 <xsl:call-template name="subfieldSelectSpan">
1064 <xsl:with-param name="newline">1</xsl:with-param>
1065 <xsl:with-param name="codes">trug</xsl:with-param>
1066 </xsl:call-template>
1067 </xsl:when>
1068 <xsl:otherwise>
1069 <xsl:call-template name="subfieldSelectSpan">
1070 <xsl:with-param name="newline">1</xsl:with-param>
1071 <xsl:with-param name="codes">atrug</xsl:with-param>
1072 </xsl:call-template>
1073 </xsl:otherwise>
1074 </xsl:choose>
1075 </div>
1076 </xsl:for-each>
1077 </div>
1078 </xsl:if>
1080 <!-- 583 -->
1081 <xsl:if test="marc:datafield[@tag=583 and not(@ind1=0)]">
1082 <span class="results_summary actionnote">
1083 <span class="label">Action note: </span>
1084 <xsl:for-each select="marc:datafield[@tag=583 and not(@ind1=0)]">
1085 <xsl:choose>
1086 <xsl:when test="marc:subfield[@code='z']">
1087 <xsl:value-of select="marc:subfield[@code='z']"/><xsl:text> </xsl:text>
1088 </xsl:when>
1089 <xsl:otherwise>
1090 <xsl:call-template name="subfieldSelect">
1091 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1092 </xsl:call-template>
1093 </xsl:otherwise>
1094 </xsl:choose>
1095 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1096 </xsl:for-each>
1097 </span>
1098 </xsl:if>
1100 <!-- 508 -->
1101 <xsl:if test="marc:datafield[@tag=508]">
1102 <span class="results_summary prod_credits">
1103 <span class="label">Production credits: </span>
1104 <xsl:for-each select="marc:datafield[@tag=508]">
1105 <xsl:call-template name="subfieldSelectSpan">
1106 <xsl:with-param name="codes">a</xsl:with-param>
1107 </xsl:call-template>
1108 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1109 </xsl:for-each>
1110 </span>
1111 </xsl:if>
1113 <!-- 586 -->
1114 <xsl:if test="marc:datafield[@tag=586]">
1115 <span class="results_summary awardsnote">
1116 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
1117 <span class="label">Awards: </span>
1118 </xsl:if>
1119 <xsl:for-each select="marc:datafield[@tag=586]">
1120 <xsl:value-of select="marc:subfield[@code='a']"/>
1121 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1122 </xsl:for-each>
1123 </span>
1124 </xsl:if>
1126 <!-- 773 -->
1127 <xsl:if test="marc:datafield[@tag=773]">
1128 <xsl:for-each select="marc:datafield[@tag=773]">
1129 <xsl:if test="@ind1 !=1">
1130 <span class="results_summary in"><span class="label">
1131 <xsl:choose>
1132 <xsl:when test="@ind2=' '">
1134 </xsl:when>
1135 <xsl:when test="@ind2=8">
1136 <xsl:if test="marc:subfield[@code='i']">
1137 <xsl:value-of select="marc:subfield[@code='i']"/>
1138 </xsl:if>
1139 </xsl:when>
1140 </xsl:choose>
1141 </span>
1142 <xsl:variable name="f773">
1143 <xsl:call-template name="chopPunctuation">
1144 <xsl:with-param name="chopString">
1145 <xsl:call-template name="subfieldSelect">
1146 <xsl:with-param name="codes">a_t</xsl:with-param>
1147 </xsl:call-template>
1148 </xsl:with-param>
1149 </xsl:call-template>
1150 </xsl:variable>
1151 <xsl:choose>
1152 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1153 <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>
1154 <xsl:value-of select="translate($f773, '()', '')"/>
1155 </a>
1156 </xsl:when>
1157 <xsl:when test="marc:subfield[@code='0']">
1158 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:subfield[@code='0'], true())"/></xsl:attribute>
1159 <xsl:value-of select="$f773"/>
1160 </a>
1161 </xsl:when>
1162 <xsl:otherwise>
1163 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
1164 <xsl:value-of select="$f773"/>
1165 </a>
1166 </xsl:otherwise>
1167 </xsl:choose>
1168 <xsl:if test="marc:subfield[@code='g']">
1169 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1170 </xsl:if>
1171 </span>
1173 <xsl:if test="marc:subfield[@code='n']">
1174 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1175 </xsl:if>
1177 </xsl:if>
1178 </xsl:for-each>
1179 </xsl:if>
1181 <xsl:for-each select="marc:datafield[@tag=511]">
1182 <span class="results_summary perf_note">
1183 <span class="label">
1184 <xsl:if test="@ind1=1"><xsl:text>Cast: </xsl:text></xsl:if>
1185 </span>
1186 <xsl:call-template name="subfieldSelect">
1187 <xsl:with-param name="codes">a</xsl:with-param>
1188 </xsl:call-template>
1189 </span>
1190 </xsl:for-each>
1192 <xsl:if test="marc:datafield[@tag=502]">
1193 <span class="results_summary diss_note">
1194 <span class="label">Dissertation note: </span>
1195 <xsl:for-each select="marc:datafield[@tag=502]">
1196 <xsl:call-template name="subfieldSelect">
1197 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1198 </xsl:call-template>
1199 </xsl:for-each>
1200 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1201 </span>
1202 </xsl:if>
1204 <xsl:for-each select="marc:datafield[@tag=520]">
1205 <span class="results_summary summary"><span class="label">
1206 <xsl:choose>
1207 <xsl:when test="@ind1=0"><xsl:text>Subject: </xsl:text></xsl:when>
1208 <xsl:when test="@ind1=1"><xsl:text>Review: </xsl:text></xsl:when>
1209 <xsl:when test="@ind1=2"><xsl:text>Scope and content: </xsl:text></xsl:when>
1210 <xsl:when test="@ind1=3"><xsl:text>Abstract: </xsl:text></xsl:when>
1211 <xsl:when test="@ind1=4"><xsl:text>Content advice: </xsl:text></xsl:when>
1212 <xsl:otherwise><xsl:text>Summary: </xsl:text></xsl:otherwise>
1213 </xsl:choose>
1214 </span>
1215 <xsl:call-template name="subfieldSelect">
1216 <xsl:with-param name="codes">abcu</xsl:with-param>
1217 </xsl:call-template>
1218 </span>
1219 </xsl:for-each>
1221 <!-- 866 textual holdings -->
1222 <xsl:if test="marc:datafield[@tag=866]">
1223 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1224 <xsl:for-each select="marc:datafield[@tag=866]">
1225 <span class="holdings_note_data">
1226 <xsl:call-template name="subfieldSelect">
1227 <xsl:with-param name="codes">az</xsl:with-param>
1228 </xsl:call-template>
1229 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1230 </span>
1231 </xsl:for-each>
1232 </span>
1233 </xsl:if>
1235 <!-- 867 textual holdings -->
1236 <xsl:if test="marc:datafield[@tag=867]">
1237 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1238 <xsl:for-each select="marc:datafield[@tag=867]">
1239 <span class="holdings_note_data">
1240 <xsl:call-template name="subfieldSelect">
1241 <xsl:with-param name="codes">az</xsl:with-param>
1242 </xsl:call-template>
1243 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1244 </span>
1245 </xsl:for-each>
1246 </span>
1247 </xsl:if>
1249 <!-- 868 textual holdings -->
1250 <xsl:if test="marc:datafield[@tag=868]">
1251 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1252 <xsl:for-each select="marc:datafield[@tag=868]">
1253 <span class="holdings_note_data">
1254 <xsl:call-template name="subfieldSelect">
1255 <xsl:with-param name="codes">az</xsl:with-param>
1256 </xsl:call-template>
1257 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1258 </span>
1259 </xsl:for-each>
1260 </span>
1261 </xsl:if>
1263 <!-- 775 Other Edition -->
1264 <xsl:if test="marc:datafield[@tag=775]">
1265 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1266 <xsl:for-each select="marc:datafield[@tag=775]">
1267 <xsl:variable name="f775">
1268 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1269 <xsl:with-param name="codes">a_t</xsl:with-param>
1270 </xsl:call-template></xsl:with-param></xsl:call-template>
1271 </xsl:variable>
1272 <xsl:if test="marc:subfield[@code='i']">
1273 <xsl:call-template name="subfieldSelect">
1274 <xsl:with-param name="codes">i</xsl:with-param>
1275 </xsl:call-template>
1276 <xsl:text>: </xsl:text>
1277 </xsl:if>
1279 <xsl:choose>
1280 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1281 <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>
1282 </xsl:when>
1283 <xsl:otherwise>
1284 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f775, '()', ''), true())"/></xsl:attribute>
1285 </xsl:otherwise>
1286 </xsl:choose>
1287 <xsl:call-template name="subfieldSelect">
1288 <xsl:with-param name="codes">a_t</xsl:with-param>
1289 </xsl:call-template>
1290 </a>
1291 <xsl:choose>
1292 <xsl:when test="position()=last()"></xsl:when>
1293 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1294 </xsl:choose>
1295 </xsl:for-each>
1296 </span>
1297 </xsl:if>
1299 <!-- 780 -->
1300 <xsl:if test="marc:datafield[@tag=780]">
1301 <xsl:for-each select="marc:datafield[@tag=780]">
1302 <xsl:if test="@ind1=0">
1303 <span class="results_summary preceeding_entry">
1304 <xsl:choose>
1305 <xsl:when test="@ind2=0">
1306 <span class="label">Continues:</span>
1307 </xsl:when>
1308 <xsl:when test="@ind2=1">
1309 <span class="label">Continues in part:</span>
1310 </xsl:when>
1311 <xsl:when test="@ind2=2">
1312 <span class="label">Supersedes:</span>
1313 </xsl:when>
1314 <xsl:when test="@ind2=3">
1315 <span class="label">Supersedes in part:</span>
1316 </xsl:when>
1317 <xsl:when test="@ind2=4">
1318 <span class="label">Formed by the union: ... and: ...</span>
1319 </xsl:when>
1320 <xsl:when test="@ind2=5">
1321 <span class="label">Absorbed:</span>
1322 </xsl:when>
1323 <xsl:when test="@ind2=6">
1324 <span class="label">Absorbed in part:</span>
1325 </xsl:when>
1326 <xsl:when test="@ind2=7">
1327 <span class="label">Separated from:</span>
1328 </xsl:when>
1329 </xsl:choose>
1330 <xsl:text> </xsl:text>
1332 <xsl:if test="marc:subfield[@code='i']">
1333 <span class="780_rel_info">
1334 <xsl:value-of select="marc:subfield[@code='i']"/>
1335 <xsl:text> </xsl:text>
1336 </span>
1337 </xsl:if>
1339 <xsl:variable name="f780">
1340 <xsl:call-template name="subfieldSelect">
1341 <xsl:with-param name="codes">a_t</xsl:with-param>
1342 </xsl:call-template>
1343 </xsl:variable>
1345 <xsl:choose>
1346 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1347 <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>
1348 <xsl:value-of select="$f780"/>
1349 </a>
1350 </xsl:when>
1351 <xsl:otherwise>
1352 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
1353 <xsl:value-of select="$f780"/>
1354 </a>
1355 </xsl:otherwise>
1356 </xsl:choose>
1357 </span>
1359 <xsl:if test="marc:subfield[@code='n']">
1360 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1361 </xsl:if>
1363 </xsl:if>
1364 </xsl:for-each>
1365 </xsl:if>
1367 <!-- 785 -->
1368 <xsl:if test="marc:datafield[@tag=785]">
1369 <xsl:for-each select="marc:datafield[@tag=785]">
1370 <xsl:if test="@ind1=0">
1371 <span class="results_summary succeeding_entry">
1372 <xsl:choose>
1373 <xsl:when test="@ind2=0">
1374 <span class="label">Continued by:</span>
1375 </xsl:when>
1376 <xsl:when test="@ind2=1">
1377 <span class="label">Continued in part by:</span>
1378 </xsl:when>
1379 <xsl:when test="@ind2=2">
1380 <span class="label">Superseded by:</span>
1381 </xsl:when>
1382 <xsl:when test="@ind2=3">
1383 <span class="label">Superseded in part by:</span>
1384 </xsl:when>
1385 <xsl:when test="@ind2=4">
1386 <span class="label">Absorbed by:</span>
1387 </xsl:when>
1388 <xsl:when test="@ind2=5">
1389 <span class="label">Absorbed in part by:</span>
1390 </xsl:when>
1391 <xsl:when test="@ind2=6">
1392 <span class="label">Split into .. and ...:</span>
1393 </xsl:when>
1394 <xsl:when test="@ind2=7">
1395 <span class="label">Merged with ... to form ...</span>
1396 </xsl:when>
1397 <xsl:when test="@ind2=8">
1398 <span class="label">Changed back to:</span>
1399 </xsl:when>
1400 </xsl:choose>
1401 <xsl:text> </xsl:text>
1403 <xsl:if test="marc:subfield[@code='i']">
1404 <span class="785_rel_info">
1405 <xsl:value-of select="marc:subfield[@code='i']"/>
1406 <xsl:text> </xsl:text>
1407 </span>
1408 </xsl:if>
1410 <xsl:variable name="f785">
1411 <xsl:call-template name="subfieldSelect">
1412 <xsl:with-param name="codes">a_t</xsl:with-param>
1413 </xsl:call-template>
1414 </xsl:variable>
1416 <xsl:choose>
1417 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1418 <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>
1419 <xsl:value-of select="$f785"/>
1420 </a>
1421 </xsl:when>
1422 <xsl:otherwise>
1423 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
1424 <xsl:value-of select="$f785"/>
1425 </a>
1426 </xsl:otherwise>
1427 </xsl:choose>
1428 </span>
1430 <xsl:if test="marc:subfield[@code='n']">
1431 <span class="results_summary succeeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1432 </xsl:if>
1434 </xsl:if>
1435 </xsl:for-each>
1436 </xsl:if>
1438 <!-- OpenURL -->
1439 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
1440 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
1441 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
1442 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
1444 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
1445 <xsl:variable name="openurltext">
1446 <xsl:choose>
1447 <xsl:when test="$OpenURLText != ''">
1448 <xsl:value-of select="$OpenURLText" />
1449 </xsl:when>
1450 <xsl:otherwise>
1451 <xsl:text>OpenURL</xsl:text>
1452 </xsl:otherwise>
1453 </xsl:choose>
1454 </xsl:variable>
1456 <span class="results_summary"><a>
1457 <xsl:attribute name="href">
1458 <xsl:value-of select="$OpenURLResolverURL" />
1459 </xsl:attribute>
1460 <xsl:attribute name="title">
1461 <xsl:value-of select="$openurltext" />
1462 </xsl:attribute>
1463 <xsl:attribute name="class">
1464 <xsl:text>OpenURL</xsl:text>
1465 </xsl:attribute>
1466 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1467 <xsl:attribute name="target">
1468 <xsl:text>_blank</xsl:text>
1469 </xsl:attribute>
1470 </xsl:if>
1471 <xsl:choose>
1472 <xsl:when test="$OpenURLImageLocation != ''">
1473 <img>
1474 <xsl:attribute name="src">
1475 <xsl:value-of select="$OpenURLImageLocation" />
1476 </xsl:attribute>
1477 </img>
1478 </xsl:when>
1479 <xsl:otherwise>
1480 <xsl:value-of select="$openurltext" />
1481 </xsl:otherwise>
1482 </xsl:choose>
1483 </a></span>
1484 </xsl:if>
1485 <!-- End of OpenURL -->
1487 <xsl:variable name="OPACShowMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACShowMusicalInscripts']" />
1488 <xsl:variable name="OPACPlayMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACPlayMusicalInscripts']" />
1490 <xsl:if test="$OPACShowMusicalInscripts = 1 and marc:datafield[@tag=031]">
1491 <xsl:for-each select="marc:datafield[@tag=031]">
1493 <span class="results_summary musical_inscripts">
1494 <xsl:if test="marc:subfield[@code='u']">
1495 <span class="uri">
1497 <xsl:attribute name="href">
1498 <xsl:value-of select="marc:subfield[@code='u']"/>
1499 </xsl:attribute>
1500 <xsl:text>Audio file</xsl:text>
1501 </a>
1502 </span>
1503 </xsl:if>
1504 <xsl:if test="marc:subfield[@code='2'] and marc:subfield[@code='2']/text() = 'pe' and marc:subfield[@code='g'] and marc:subfield[@code='n'] and marc:subfield[@code='o'] and marc:subfield[@code='p']">
1505 <div class="inscript" data-system="pae">
1506 <xsl:attribute name="data-clef">
1507 <xsl:value-of select="marc:subfield[@code='g']"/>
1508 </xsl:attribute>
1509 <xsl:attribute name="data-keysig">
1510 <xsl:value-of select="marc:subfield[@code='n']"/>
1511 </xsl:attribute>
1512 <xsl:attribute name="data-timesig">
1513 <xsl:value-of select="marc:subfield[@code='o']"/>
1514 </xsl:attribute>
1515 <xsl:attribute name="data-notation">
1516 <xsl:value-of select="marc:subfield[@code='p']"/>
1517 </xsl:attribute>
1518 </div>
1519 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1520 <div class="audio_controls hide">
1521 <button class="btn play_btn">
1522 <i id="carticon" class="fa fa-play"></i>
1523 <xsl:text> Play this sample</xsl:text>
1524 </button>
1525 </div>
1526 </xsl:if>
1527 </xsl:if>
1528 </span>
1529 </xsl:for-each>
1530 <xsl:if test="$OPACPlayMusicalInscripts = 1">
1531 <div class="results_summary">
1532 <span class="inscript_audio hide"></span>
1533 </div>
1534 </xsl:if>
1535 </xsl:if>
1537 </xsl:element>
1538 </xsl:template>
1540 <xsl:template name="showAuthor">
1541 <xsl:param name="authorfield" />
1542 <xsl:param name="UseAuthoritiesForTracings" />
1543 <xsl:param name="materialTypeLabel" />
1544 <xsl:param name="theme" />
1545 <xsl:if test="count($authorfield)&gt;0">
1546 <span class="results_summary author h3">
1547 <xsl:for-each select="$authorfield">
1548 <xsl:choose>
1549 <xsl:when test="position()&gt;1"/>
1550 <!-- #13383 -->
1551 <xsl:when test="@tag&lt;700"><span class="byAuthor">By: </span></xsl:when>
1552 <!--#13382 Changed Additional author to contributor -->
1553 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1554 </xsl:choose>
1555 <xsl:choose>
1556 <xsl:when test="not(@tag=111) or @tag=700 or @tag=710 or @tag=711"/>
1557 <xsl:when test="marc:subfield[@code='n']">
1558 <xsl:text> </xsl:text>
1559 <xsl:call-template name="subfieldSelect">
1560 <xsl:with-param name="codes">n</xsl:with-param>
1561 </xsl:call-template>
1562 <xsl:text> </xsl:text>
1563 </xsl:when>
1564 </xsl:choose>
1566 <xsl:choose>
1567 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1568 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/>"</xsl:attribute>
1569 </xsl:when>
1570 <xsl:otherwise>
1571 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
1572 </xsl:otherwise>
1573 </xsl:choose>
1574 <xsl:attribute name="class">contributors</xsl:attribute>
1575 <span resource="#record"><span>
1576 <xsl:choose>
1577 <xsl:when test="substring(@tag, 1, 1)='1'">
1578 <xsl:choose>
1579 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="property">byArtist</xsl:attribute></xsl:when>
1580 <xsl:otherwise><xsl:attribute name="property">author</xsl:attribute></xsl:otherwise>
1581 </xsl:choose>
1582 </xsl:when>
1583 <xsl:otherwise><xsl:attribute name="property">contributor</xsl:attribute></xsl:otherwise>
1584 </xsl:choose>
1585 <xsl:choose>
1586 <xsl:when test="substring(@tag, 2, 1)='0'">
1587 <xsl:choose>
1588 <xsl:when test="$materialTypeLabel='Music'"><xsl:attribute name="typeof">MusicGroup</xsl:attribute></xsl:when>
1589 <xsl:otherwise><xsl:attribute name="typeof">Person</xsl:attribute></xsl:otherwise>
1590 </xsl:choose>
1591 </xsl:when>
1592 <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise>
1593 </xsl:choose>
1594 <span property="name">
1595 <xsl:choose>
1596 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1597 <!-- #13383 -->
1598 <xsl:call-template name="chopPunctuation">
1599 <xsl:with-param name="chopString">
1600 <xsl:call-template name="subfieldSelect">
1601 <xsl:with-param name="codes">
1602 <xsl:choose>
1603 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1604 <xsl:when test="@tag=111">aeq</xsl:when>
1605 <xsl:when test="@tag=110">ab</xsl:when>
1606 <xsl:otherwise>abcjq</xsl:otherwise>
1607 </xsl:choose>
1608 </xsl:with-param>
1609 </xsl:call-template>
1610 </xsl:with-param>
1611 <xsl:with-param name="punctuation">
1612 <xsl:text>:,;/ </xsl:text>
1613 </xsl:with-param>
1614 </xsl:call-template>
1615 <!-- Display only name and title portion in 110 field -->
1616 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1617 <span class="titleportion">
1618 <xsl:choose>
1619 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1620 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1621 </xsl:choose>
1622 <xsl:call-template name="chopPunctuation">
1623 <xsl:with-param name="chopString">
1624 <xsl:call-template name="subfieldSelect">
1625 <xsl:with-param name="codes">cdnt</xsl:with-param>
1626 </xsl:call-template>
1627 </xsl:with-param>
1628 </xsl:call-template>
1629 </span>
1630 </xsl:if>
1631 <!-- Display only name and title portion in 111 field -->
1632 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1633 <span class="titleportion">
1634 <xsl:choose>
1635 <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>
1636 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1637 </xsl:choose>
1639 <xsl:call-template name="chopPunctuation">
1640 <xsl:with-param name="chopString">
1641 <xsl:call-template name="subfieldSelect">
1642 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1643 </xsl:call-template>
1644 </xsl:with-param>
1645 </xsl:call-template>
1646 </span>
1647 </xsl:if>
1648 <!-- Display only dates in 100 field -->
1649 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1650 <span class="authordates">
1651 <xsl:text>, </xsl:text>
1652 <xsl:call-template name="chopPunctuation">
1653 <xsl:with-param name="chopString">
1654 <xsl:call-template name="subfieldSelect">
1655 <xsl:with-param name="codes">d</xsl:with-param>
1656 </xsl:call-template>
1657 </xsl:with-param>
1658 </xsl:call-template>
1659 </span>
1660 </xsl:if>
1661 </xsl:when>
1662 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1663 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1664 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1665 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1666 <xsl:if test="@tag=710 or @tag=711">
1667 <xsl:call-template name="chopPunctuation">
1668 <xsl:with-param name="chopString">
1669 <xsl:call-template name="subfieldSelect">
1670 <xsl:with-param name="codes">
1671 <xsl:choose>
1672 <xsl:when test="@tag=711">aeq</xsl:when>
1673 <xsl:otherwise>ab</xsl:otherwise>
1674 </xsl:choose>
1675 </xsl:with-param>
1676 </xsl:call-template>
1677 </xsl:with-param>
1678 <xsl:with-param name="punctuation">
1679 <xsl:text>:,;/ </xsl:text>
1680 </xsl:with-param>
1681 </xsl:call-template>
1682 <!-- Display only name and title portion in 711 field -->
1683 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1684 <span class="titleportion">
1685 <xsl:choose>
1686 <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>
1687 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1688 </xsl:choose>
1690 <xsl:call-template name="chopPunctuation">
1691 <xsl:with-param name="chopString">
1692 <xsl:call-template name="subfieldSelect">
1693 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1694 </xsl:call-template>
1695 </xsl:with-param>
1696 </xsl:call-template>
1697 </span>
1698 </xsl:if>
1699 <!-- Display only name and title portion in 710 field -->
1700 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1701 <span class="titleportion">
1702 <xsl:choose>
1703 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1704 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1705 </xsl:choose>
1706 <xsl:call-template name="chopPunctuation">
1707 <xsl:with-param name="chopString">
1708 <xsl:call-template name="subfieldSelect">
1709 <xsl:with-param name="codes">cdnt</xsl:with-param>
1710 </xsl:call-template>
1711 </xsl:with-param>
1712 </xsl:call-template>
1713 </span>
1714 </xsl:if>
1716 </xsl:if>
1717 <!-- Display only name portion in 700 field -->
1718 <xsl:if test="@tag=700">
1719 <xsl:call-template name="chopPunctuation">
1720 <xsl:with-param name="chopString">
1721 <xsl:call-template name="subfieldSelect">
1722 <xsl:with-param name="codes">abcq</xsl:with-param>
1723 </xsl:call-template>
1724 </xsl:with-param>
1725 </xsl:call-template>
1726 </xsl:if>
1727 <!-- Display class "authordates" in 700 field -->
1728 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1729 <span class="authordates">
1730 <xsl:text>, </xsl:text>
1731 <xsl:call-template name="chopPunctuation">
1732 <xsl:with-param name="chopString">
1733 <xsl:call-template name="subfieldSelect">
1734 <xsl:with-param name="codes">d</xsl:with-param>
1735 </xsl:call-template>
1736 </xsl:with-param>
1737 </xsl:call-template>
1738 </span>
1739 </xsl:if>
1740 <!-- Display class "titleportion" in 700 field -->
1741 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1742 <xsl:if test="@tag=700 and $titleportionfields">
1743 <span class="titleportion">
1744 <xsl:text>. </xsl:text>
1745 <xsl:call-template name="chopPunctuation">
1746 <xsl:with-param name="chopString">
1747 <xsl:call-template name="subfieldSelect">
1748 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1749 </xsl:call-template>
1750 </xsl:with-param>
1751 </xsl:call-template>
1752 </span>
1753 </xsl:if>
1755 </xsl:when>
1756 </xsl:choose>
1757 </span></span></span>
1759 <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' -->
1760 <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'])">
1762 <span class="relatorcode">
1763 <xsl:text> [</xsl:text>
1764 <xsl:choose>
1765 <xsl:when test="@tag=111 or @tag=711">
1766 <xsl:choose>
1767 <!-- Prefer j over 4 for 111 and 711 -->
1768 <xsl:when test="marc:subfield[@code='j']">
1769 <xsl:for-each select="marc:subfield[@code='j']">
1770 <xsl:value-of select="."/>
1771 <xsl:if test="position() != last()">, </xsl:if>
1772 </xsl:for-each>
1773 </xsl:when>
1774 <xsl:otherwise>
1775 <xsl:for-each select="marc:subfield[@code=4]">
1776 <xsl:value-of select="."/>
1777 <xsl:if test="position() != last()">, </xsl:if>
1778 </xsl:for-each>
1779 </xsl:otherwise>
1780 </xsl:choose>
1781 </xsl:when>
1782 <!-- Prefer e over 4 on 100 and 110-->
1783 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1784 <xsl:for-each select="marc:subfield[@code='e']">
1785 <xsl:value-of select="."/>
1786 <xsl:if test="position() != last()">, </xsl:if>
1787 </xsl:for-each>
1788 </xsl:when>
1789 <xsl:otherwise>
1790 <xsl:for-each select="marc:subfield[@code=4]">
1791 <xsl:value-of select="."/>
1792 <xsl:if test="position() != last()">, </xsl:if>
1793 </xsl:for-each>
1794 </xsl:otherwise>
1795 </xsl:choose>
1796 <xsl:text>]</xsl:text>
1797 </span>
1798 </xsl:if>
1799 </a>
1800 <xsl:if test="marc:subfield[@code=9]">
1801 <a class='authlink'>
1802 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
1803 <xsl:element name="i">
1804 <xsl:attribute name="class">fa fa-search</xsl:attribute>
1805 </xsl:element>
1806 </a>
1807 </xsl:if>
1808 <xsl:choose>
1809 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1810 </xsl:choose>
1811 </xsl:for-each>
1812 </span>
1813 </xsl:if>
1814 </xsl:template>
1816 <xsl:template name="nameABCQ">
1817 <xsl:call-template name="chopPunctuation">
1818 <xsl:with-param name="chopString">
1819 <xsl:call-template name="subfieldSelect">
1820 <xsl:with-param name="codes">abcq</xsl:with-param>
1821 </xsl:call-template>
1822 </xsl:with-param>
1823 <xsl:with-param name="punctuation">
1824 <xsl:text>:,;/ </xsl:text>
1825 </xsl:with-param>
1826 </xsl:call-template>
1827 </xsl:template>
1829 <xsl:template name="nameABCDN">
1830 <xsl:call-template name="chopPunctuation">
1831 <xsl:with-param name="chopString">
1832 <xsl:call-template name="subfieldSelect">
1833 <xsl:with-param name="codes">abcdn</xsl:with-param>
1834 </xsl:call-template>
1835 </xsl:with-param>
1836 <xsl:with-param name="punctuation">
1837 <xsl:text>:,;/ </xsl:text>
1838 </xsl:with-param>
1839 </xsl:call-template>
1840 </xsl:template>
1842 <xsl:template name="nameACDEQ">
1843 <xsl:call-template name="subfieldSelect">
1844 <xsl:with-param name="codes">acdeq</xsl:with-param>
1845 </xsl:call-template>
1846 </xsl:template>
1848 <xsl:template name="specialSubfieldSelect">
1849 <xsl:param name="anyCodes"/>
1850 <xsl:param name="axis"/>
1851 <xsl:param name="beforeCodes"/>
1852 <xsl:param name="afterCodes"/>
1853 <xsl:variable name="str">
1854 <xsl:for-each select="marc:subfield">
1855 <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])">
1856 <xsl:value-of select="text()"/>
1857 <xsl:text> </xsl:text>
1858 </xsl:if>
1859 </xsl:for-each>
1860 </xsl:variable>
1861 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1862 </xsl:template>
1864 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1865 <xsl:template name="subfieldSelectSubject">
1866 <xsl:param name="codes"/>
1867 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1868 <xsl:param name="subdivCodes"/>
1869 <xsl:param name="subdivDelimiter"/>
1870 <xsl:param name="prefix"/>
1871 <xsl:param name="suffix"/>
1872 <xsl:param name="urlencode"/>
1873 <xsl:variable name="str">
1874 <xsl:for-each select="marc:subfield">
1875 <xsl:if test="contains($codes, @code)">
1876 <xsl:if test="contains($subdivCodes, @code)">
1877 <xsl:value-of select="$subdivDelimiter"/>
1878 </xsl:if>
1879 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1880 </xsl:if>
1881 </xsl:for-each>
1882 </xsl:variable>
1883 <xsl:choose>
1884 <xsl:when test="$urlencode=1">
1885 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1886 </xsl:when>
1887 <xsl:otherwise>
1888 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1889 </xsl:otherwise>
1890 </xsl:choose>
1891 </xsl:template>
1892 </xsl:stylesheet>