Bug 14915: (follow-up) [FA 4.4] (QA followup) Replace fa-hold with fa-sticky-note-o
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / xslt / MARC21slim2intranetDetail.xsl
bloba2f7a0c6597631ebcc4264153949b49ec8745fff
1 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>
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:items="http://www.koha-community.org/items"
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 exclude-result-prefixes="marc items">
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/>
16 </xsl:template>
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="TracingQuotesLeft">
31 <xsl:choose>
32 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
33 <xsl:otherwise>"</xsl:otherwise>
34 </xsl:choose>
35 </xsl:variable>
36 <xsl:variable name="TracingQuotesRight">
37 <xsl:choose>
38 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
39 <xsl:otherwise>"</xsl:otherwise>
40 </xsl:choose>
41 </xsl:variable>
42 <xsl:variable name="leader" select="marc:leader"/>
43 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
44 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
45 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
46 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
47 <xsl:variable name="materialTypeCode">
48 <xsl:choose>
49 <xsl:when test="$leader19='a'">ST</xsl:when>
50 <xsl:when test="$leader6='a'">
51 <xsl:choose>
52 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
53 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
54 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
55 </xsl:choose>
56 </xsl:when>
57 <xsl:when test="$leader6='t'">BK</xsl:when>
58 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
59 <xsl:when test="$leader6='m'">CF</xsl:when>
60 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
61 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
62 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
63 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
64 </xsl:choose>
65 </xsl:variable>
66 <xsl:variable name="materialTypeLabel">
67 <xsl:choose>
68 <xsl:when test="$leader19='a'">Set</xsl:when>
69 <xsl:when test="$leader6='a'">
70 <xsl:choose>
71 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
72 <xsl:when test="$leader7='i' or $leader7='s'">
73 <xsl:choose>
74 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
75 <xsl:otherwise>Series</xsl:otherwise>
76 </xsl:choose>
77 </xsl:when>
78 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
79 </xsl:choose>
80 </xsl:when>
81 <xsl:when test="$leader6='t'">Book</xsl:when>
82 <xsl:when test="$leader6='o'">Kit</xsl:when>
83 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
84 <xsl:when test="$leader6='m'">Computer file</xsl:when>
85 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
86 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual material</xsl:when>
87 <xsl:when test="$leader6='j'">Music</xsl:when>
88 <xsl:when test="$leader6='i'">Sound</xsl:when>
89 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
90 </xsl:choose>
91 </xsl:variable>
93 <!-- Title Statement -->
94 <!-- Alternate Graphic Representation (MARC 880) -->
95 <xsl:if test="$display880">
96 <h1 class="title">
97 <xsl:call-template name="m880Select">
98 <xsl:with-param name="basetags">245</xsl:with-param>
99 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
100 </xsl:call-template>
101 </h1>
102 </xsl:if>
104 <!--Bug 13381 -->
105 <xsl:if test="marc:datafield[@tag=245]">
106 <h1 class="title" property="name">
107 <xsl:for-each select="marc:datafield[@tag=245]">
108 <xsl:call-template name="subfieldSelect">
109 <xsl:with-param name="codes">a</xsl:with-param>
110 </xsl:call-template>
111 <xsl:text> </xsl:text>
112 <!-- 13381 add additional subfields-->
113 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
114 <xsl:choose>
115 <xsl:when test="@code='h'">
116 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
117 <span class="title_medium"><xsl:apply-templates/> </span>
118 </xsl:when>
119 <xsl:when test="@code='c'">
120 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
121 <span class="title_resp_stmt"><xsl:apply-templates/> </span>
122 </xsl:when>
123 <xsl:otherwise>
124 <xsl:apply-templates/>
125 <xsl:text> </xsl:text>
126 </xsl:otherwise>
127 </xsl:choose>
128 </xsl:for-each>
129 </xsl:for-each>
130 </h1>
131 </xsl:if>
133 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
134 <xsl:if test="$display880">
135 <h5 class="author">
136 <xsl:call-template name="m880Select">
137 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
138 <xsl:with-param name="codes">abc</xsl:with-param>
139 <xsl:with-param name="index">au</xsl:with-param>
140 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
141 <!-- do not use label 'by ' here, it would be repeated for every occurence of 100,110,111,700,710,711 -->
142 </xsl:call-template>
143 </h5>
144 </xsl:if>
146 <!-- Author Statement -->
147 <xsl:call-template name="showAuthor">
148 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
149 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
150 </xsl:call-template>
152 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
153 <xsl:call-template name="showAuthor">
154 <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'])]"/>
155 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
156 </xsl:call-template>
158 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
159 <span class="results_summary type"><span class="label">Material type: </span>
160 <xsl:element name="img"><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>
161 <xsl:text> </xsl:text>
162 <xsl:value-of select="$materialTypeLabel"/>
163 </span>
164 </xsl:if>
167 <!--Series: Alternate Graphic Representation (MARC 880) -->
168 <xsl:if test="$display880">
169 <xsl:call-template name="m880Select">
170 <xsl:with-param name="basetags">440,490</xsl:with-param>
171 <xsl:with-param name="codes">av</xsl:with-param>
172 <xsl:with-param name="class">results_summary series</xsl:with-param>
173 <xsl:with-param name="label">Series: </xsl:with-param>
174 <xsl:with-param name="index">se</xsl:with-param>
175 </xsl:call-template>
176 </xsl:if>
178 <!-- Series -->
179 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
180 <span class="results_summary series"><span class="label">Series: </span>
181 <!-- 440 -->
182 <xsl:for-each select="marc:datafield[@tag=440]">
183 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
184 <xsl:call-template name="chopPunctuation">
185 <xsl:with-param name="chopString">
186 <xsl:call-template name="subfieldSelect">
187 <xsl:with-param name="codes">av</xsl:with-param>
188 </xsl:call-template>
189 </xsl:with-param>
190 </xsl:call-template>
191 </a>
192 <xsl:call-template name="part"/>
193 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
194 </xsl:for-each>
196 <!-- 490 Series not traced, Ind1 = 0 -->
197 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
198 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
199 <xsl:call-template name="chopPunctuation">
200 <xsl:with-param name="chopString">
201 <xsl:call-template name="subfieldSelect">
202 <xsl:with-param name="codes">av</xsl:with-param>
203 </xsl:call-template>
204 </xsl:with-param>
205 </xsl:call-template>
206 </a>
207 <xsl:call-template name="part"/>
208 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
209 </xsl:for-each>
210 <!-- 490 Series traced, Ind1 = 1 -->
211 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
212 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
213 <xsl:choose>
214 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
215 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
216 <xsl:call-template name="chopPunctuation">
217 <xsl:with-param name="chopString">
218 <xsl:call-template name="subfieldSelect">
219 <xsl:with-param name="codes">a_t</xsl:with-param>
220 </xsl:call-template>
221 </xsl:with-param>
222 </xsl:call-template>
223 </a>
224 </xsl:when>
225 <xsl:otherwise>
226 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
227 <xsl:call-template name="chopPunctuation">
228 <xsl:with-param name="chopString">
229 <xsl:call-template name="subfieldSelect">
230 <xsl:with-param name="codes">a_t</xsl:with-param>
231 </xsl:call-template>
232 </xsl:with-param>
233 </xsl:call-template>
234 </a>
235 <xsl:call-template name="part"/>
236 </xsl:otherwise>
237 </xsl:choose>
238 <xsl:text>: </xsl:text>
239 <xsl:value-of select="marc:subfield[@code='v']" />
240 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
241 </xsl:for-each>
242 </xsl:if>
244 </span>
245 </xsl:if>
247 <!-- Analytics -->
248 <xsl:if test="$leader7='s'">
249 <span class="results_summary analytics"><span class="label">Analytics: </span>
251 <xsl:choose>
252 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
253 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
254 </xsl:when>
255 <xsl:otherwise>
256 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
257 </xsl:otherwise>
258 </xsl:choose>
259 <xsl:text>Show analytics</xsl:text>
260 </a>
261 </span>
262 </xsl:if>
264 <!-- Volumes of sets and traced series -->
265 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
266 <span class="results_summary volumes"><span class="label">Volumes: </span>
268 <xsl:choose>
269 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
270 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
271 </xsl:when>
272 <xsl:otherwise>
273 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
274 </xsl:otherwise>
275 </xsl:choose>
276 <xsl:text>Show volumes</xsl:text>
277 </a>
278 </span>
279 </xsl:if>
281 <!-- Set -->
282 <xsl:if test="$leader19='c'">
283 <span class="results_summary set"><span class="label">Set: </span>
284 <xsl:for-each select="marc:datafield[@tag=773]">
286 <xsl:choose>
287 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
288 <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>
289 </xsl:when>
290 <xsl:otherwise>
291 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
292 </xsl:otherwise>
293 </xsl:choose>
294 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
295 </a>
296 <xsl:choose>
297 <xsl:when test="position()=last()"></xsl:when>
298 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
299 </xsl:choose>
300 </xsl:for-each>
301 </span>
302 </xsl:if>
304 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
305 <xsl:if test="$display880">
306 <xsl:call-template name="m880Select">
307 <xsl:with-param name="basetags">260</xsl:with-param>
308 <xsl:with-param name="codes">abcg</xsl:with-param>
309 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
310 <xsl:with-param name="label">Publisher: </xsl:with-param>
311 </xsl:call-template>
312 </xsl:if>
314 <!-- Publisher info and RDA related info from tags 260, 264 -->
315 <xsl:choose>
316 <xsl:when test="marc:datafield[@tag=264]">
317 <xsl:call-template name="showRDAtag264"/>
318 </xsl:when>
319 <xsl:when test="marc:datafield[@tag=260]">
320 <span class="results_summary publisher"><span class="label">Publisher: </span>
321 <xsl:for-each select="marc:datafield[@tag=260]">
322 <xsl:if test="marc:subfield[@code='a']">
323 <xsl:call-template name="subfieldSelect">
324 <xsl:with-param name="codes">a</xsl:with-param>
325 </xsl:call-template>
326 </xsl:if>
327 <xsl:text> </xsl:text>
328 <xsl:if test="marc:subfield[@code='b']">
329 <a href="/cgi-bin/koha/catalogue/search.pl?q=pb:{marc:subfield[@code='b']}">
330 <xsl:call-template name="subfieldSelect">
331 <xsl:with-param name="codes">b</xsl:with-param>
332 </xsl:call-template>
333 </a>
334 </xsl:if>
335 <xsl:text> </xsl:text>
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 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
344 </xsl:for-each>
345 </span>
346 </xsl:when>
347 </xsl:choose>
349 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
350 <xsl:if test="$display880">
351 <xsl:call-template name="m880Select">
352 <xsl:with-param name="basetags">250</xsl:with-param>
353 <xsl:with-param name="codes">ab</xsl:with-param>
354 <xsl:with-param name="class">results_summary edition</xsl:with-param>
355 <xsl:with-param name="label">Edition: </xsl:with-param>
356 </xsl:call-template>
357 </xsl:if>
359 <xsl:if test="marc:datafield[@tag=250]">
360 <span class="results_summary edition"><span class="label">Edition: </span>
361 <xsl:for-each select="marc:datafield[@tag=250]">
362 <xsl:call-template name="chopPunctuation">
363 <xsl:with-param name="chopString">
364 <xsl:call-template name="subfieldSelect">
365 <xsl:with-param name="codes">ab</xsl:with-param>
366 </xsl:call-template>
367 </xsl:with-param>
368 </xsl:call-template>
369 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
370 </xsl:for-each>
371 </span>
372 </xsl:if>
374 <!-- Description: Alternate Graphic Representation (MARC 880) -->
375 <xsl:if test="$display880">
376 <xsl:call-template name="m880Select">
377 <xsl:with-param name="basetags">300</xsl:with-param>
378 <xsl:with-param name="codes">abceg</xsl:with-param>
379 <xsl:with-param name="class">results_summary description</xsl:with-param>
380 <xsl:with-param name="label">Description: </xsl:with-param>
381 </xsl:call-template>
382 </xsl:if>
384 <xsl:if test="marc:datafield[@tag=300]">
385 <span class="results_summary description"><span class="label">Description: </span>
386 <xsl:for-each select="marc:datafield[@tag=300]">
387 <xsl:call-template name="chopPunctuation">
388 <xsl:with-param name="chopString">
389 <xsl:call-template name="subfieldSelect">
390 <xsl:with-param name="codes">abceg</xsl:with-param>
391 </xsl:call-template>
392 </xsl:with-param>
393 </xsl:call-template>
394 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
395 </xsl:for-each>
396 </span>
397 </xsl:if>
399 <!-- Content Type -->
400 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
401 <span class="results_summary" id="content_type">
402 <xsl:if test="marc:datafield[@tag=336]">
403 <span class="label">Content type: </span>
404 <xsl:for-each select="marc:datafield[@tag=336]">
405 <xsl:call-template name="subfieldSelect">
406 <xsl:with-param name="codes">a</xsl:with-param>
407 <xsl:with-param name="delimeter">, </xsl:with-param>
408 </xsl:call-template>
409 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
410 </xsl:for-each>
411 </xsl:if>
412 <xsl:text> </xsl:text>
413 <!-- Media Type -->
414 <xsl:if test="marc:datafield[@tag=337]">
415 <span class="label">Media type: </span>
416 <xsl:for-each select="marc:datafield[@tag=337]">
417 <xsl:call-template name="subfieldSelect">
418 <xsl:with-param name="codes">a</xsl:with-param>
419 <xsl:with-param name="delimeter">, </xsl:with-param>
420 </xsl:call-template>
421 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
422 </xsl:for-each>
423 </xsl:if>
424 <xsl:text> </xsl:text>
425 <!-- Media Type -->
426 <xsl:if test="marc:datafield[@tag=338]">
427 <span class="label">Carrier type: </span>
428 <xsl:for-each select="marc:datafield[@tag=338]">
429 <xsl:call-template name="subfieldSelect">
430 <xsl:with-param name="codes">a</xsl:with-param>
431 <xsl:with-param name="delimeter">, </xsl:with-param>
432 </xsl:call-template>
433 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
434 </xsl:for-each>
435 </xsl:if>
436 </span>
437 </xsl:if>
440 <!-- Build ISBN -->
441 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
442 <span class="results_summary isbn"><span class="label">ISBN: </span>
443 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
444 <span property="isbn">
445 <xsl:value-of select="."/>
446 <xsl:choose>
447 <xsl:when test="position()=last()">
448 <xsl:text>.</xsl:text>
449 </xsl:when>
450 <xsl:otherwise>
451 <xsl:text>; </xsl:text>
452 </xsl:otherwise>
453 </xsl:choose>
454 </span>
455 </xsl:for-each>
456 </span>
457 </xsl:if>
459 <!-- Build ISSN -->
460 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
461 <span class="results_summary issn"><span class="label">ISSN: </span>
462 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
463 <span property="issn">
464 <xsl:value-of select="."/>
465 <xsl:choose>
466 <xsl:when test="position()=last()">
467 <xsl:text>.</xsl:text>
468 </xsl:when>
469 <xsl:otherwise>
470 <xsl:text>; </xsl:text>
471 </xsl:otherwise>
472 </xsl:choose>
473 </span>
474 </xsl:for-each>
475 </span>
476 </xsl:if>
478 <xsl:if test="marc:datafield[@tag=013]">
479 <span class="results_summary patent_info">
480 <span class="label">Patent information: </span>
481 <xsl:for-each select="marc:datafield[@tag=013]">
482 <xsl:call-template name="subfieldSelect">
483 <xsl:with-param name="codes">acdef</xsl:with-param>
484 <xsl:with-param name="delimeter">, </xsl:with-param>
485 </xsl:call-template>
486 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
487 </xsl:for-each>
488 </span>
489 </xsl:if>
491 <xsl:if test="marc:datafield[@tag=088]">
492 <span class="results_summary report_number">
493 <span class="label">Report number: </span>
494 <xsl:for-each select="marc:datafield[@tag=088]">
495 <xsl:call-template name="subfieldSelect">
496 <xsl:with-param name="codes">a</xsl:with-param>
497 </xsl:call-template>
498 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
499 </xsl:for-each>
500 </span>
501 </xsl:if>
503 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
504 <xsl:if test="$display880">
505 <xsl:call-template name="m880Select">
506 <xsl:with-param name="basetags">246</xsl:with-param>
507 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
508 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
509 <xsl:with-param name="label">Other title: </xsl:with-param>
510 </xsl:call-template>
511 </xsl:if>
513 <xsl:if test="marc:datafield[@tag=246]">
514 <span class="results_summary other_title"><span class="label">Other title: </span>
515 <xsl:for-each select="marc:datafield[@tag=246]">
516 <xsl:call-template name="chopPunctuation">
517 <xsl:with-param name="chopString">
518 <xsl:call-template name="subfieldSelect">
519 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
520 </xsl:call-template>
521 </xsl:with-param>
522 </xsl:call-template>
523 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
524 <xsl:choose>
525 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
526 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
527 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
528 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
529 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
530 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
531 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
532 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
533 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
534 </xsl:choose>
535 </xsl:if>
536 <xsl:if test="marc:subfield[@code='i']">
537 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
538 </xsl:if>
539 <!-- #13386 added separator | -->
540 <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>
541 </xsl:for-each>
542 </span>
543 </xsl:if>
545 <xsl:if test="marc:datafield[@tag=242]">
546 <span class="results_summary translated_title"><span class="label">Title translated: </span>
547 <xsl:for-each select="marc:datafield[@tag=242]">
548 <xsl:call-template name="chopPunctuation">
549 <xsl:with-param name="chopString">
550 <xsl:call-template name="subfieldSelect">
551 <xsl:with-param name="codes">abchnp</xsl:with-param>
552 </xsl:call-template>
553 </xsl:with-param>
554 </xsl:call-template>
555 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
556 </xsl:for-each>
557 </span>
558 </xsl:if>
560 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
561 <xsl:if test="$display880">
562 <xsl:call-template name="m880Select">
563 <xsl:with-param name="basetags">130,240</xsl:with-param>
564 <xsl:with-param name="codes">adfklmor</xsl:with-param>
565 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
566 <xsl:with-param name="label">Uniform title: </xsl:with-param>
567 </xsl:call-template>
568 </xsl:if>
570 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
571 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
572 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
573 <xsl:for-each select="marc:subfield">
574 <xsl:if test="contains('adfghklmnoprst',@code)">
575 <xsl:value-of select="text()"/>
576 <xsl:text> </xsl:text>
577 </xsl:if>
578 </xsl:for-each>
579 <xsl:if test="position() != last()">
580 <span class="separator"><xsl:text> | </xsl:text></span>
581 </xsl:if>
582 </xsl:for-each>
583 </span>
584 </xsl:if>
586 <!-- #13382 Added Related works 700$i -->
587 <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']]">
588 <span class="results_summary related_works"><span class="label">Related works: </span>
589 <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']]">
590 <xsl:variable name="str">
591 <xsl:call-template name="subfieldSelect">
592 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
593 </xsl:call-template>
594 </xsl:variable>
595 <xsl:call-template name="chopPunctuation">
596 <xsl:with-param name="chopString">
597 <xsl:value-of select="$str"/>
598 </xsl:with-param>
599 </xsl:call-template>
600 <!-- add relator code too between brackets-->
601 <xsl:if test="marc:subfield[@code='4' or @code='e']">
602 <span class="relatorcode">
603 <xsl:text> [</xsl:text>
604 <xsl:choose>
605 <xsl:when test="marc:subfield[@code='e']">
606 <xsl:for-each select="marc:subfield[@code='e']">
607 <xsl:value-of select="."/>
608 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
609 </xsl:for-each>
610 </xsl:when>
611 <xsl:otherwise>
612 <xsl:for-each select="marc:subfield[@code='4']">
613 <xsl:value-of select="."/>
614 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
615 </xsl:for-each>
616 </xsl:otherwise>
617 </xsl:choose>
618 <xsl:text>]</xsl:text>
619 </span>
620 </xsl:if>
621 <xsl:choose>
622 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
623 </xsl:choose>
624 </xsl:for-each>
625 </span>
626 </xsl:if>
628 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
629 <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'])]">
630 <span class="results_summary contained_works"><span class="label">Contained works: </span>
631 <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'])]">
632 <xsl:variable name="str">
633 <xsl:call-template name="subfieldSelect">
634 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
635 </xsl:call-template>
636 </xsl:variable>
637 <xsl:call-template name="chopPunctuation">
638 <xsl:with-param name="chopString">
639 <xsl:value-of select="$str"/>
640 </xsl:with-param>
641 </xsl:call-template>
642 <!-- add relator code too between brackets-->
643 <xsl:if test="marc:subfield[@code='4' or @code='e']">
644 <span class="relatorcode">
645 <xsl:text> [</xsl:text>
646 <xsl:choose>
647 <xsl:when test="marc:subfield[@code='e']">
648 <xsl:for-each select="marc:subfield[@code='e']">
649 <xsl:value-of select="."/>
650 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
651 </xsl:for-each>
652 </xsl:when>
653 <xsl:otherwise>
654 <xsl:for-each select="marc:subfield[@code='4']">
655 <xsl:value-of select="."/>
656 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
657 </xsl:for-each>
658 </xsl:otherwise>
659 </xsl:choose>
660 <xsl:text>]</xsl:text>
661 </span>
662 </xsl:if>
663 <xsl:choose>
664 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
665 </xsl:choose>
666 </xsl:for-each>
667 </span>
668 </xsl:if>
671 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6' and not(@tag=655)]">
672 <span class="results_summary subjects"><span class="label">Subject(s): </span>
673 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6'][not(@tag=655)]">
675 <xsl:choose>
676 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
677 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
678 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
679 </xsl:when>
680 <xsl:when test="$TraceSubjectSubdivisions='1'">
681 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
682 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
683 <xsl:with-param name="delimeter"> AND </xsl:with-param>
684 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
685 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
686 </xsl:call-template>
687 </xsl:attribute>
688 </xsl:when>
689 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
690 <xsl:otherwise>
691 <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="translate(marc:subfield[@code='a'],'()','')"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
692 </xsl:otherwise>
693 </xsl:choose>
694 <xsl:call-template name="chopPunctuation">
695 <xsl:with-param name="chopString">
696 <xsl:call-template name="subfieldSelect">
697 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
698 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
699 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
700 </xsl:call-template>
701 </xsl:with-param>
702 </xsl:call-template>
703 </a>
704 <xsl:choose>
705 <xsl:when test="position()=last()"></xsl:when>
706 <xsl:otherwise> | </xsl:otherwise>
707 </xsl:choose>
709 </xsl:for-each>
710 </span>
711 </xsl:if>
713 <!-- Genre/Form -->
714 <xsl:if test="marc:datafield[@tag=655]">
715 <span class="results_summary genre"><span class="label">Genre/Form: </span>
716 <xsl:for-each select="marc:datafield[@tag=655]">
718 <xsl:choose>
719 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
720 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
721 </xsl:when>
722 <xsl:when test="$TraceSubjectSubdivisions='1'">
723 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
724 <xsl:with-param name="codes">avxyz</xsl:with-param>
725 <xsl:with-param name="delimeter"> AND </xsl:with-param>
726 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
727 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
728 </xsl:call-template>
729 </xsl:attribute>
730 </xsl:when>
731 <xsl:otherwise>
732 <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>
733 </xsl:otherwise>
734 </xsl:choose>
735 <xsl:call-template name="subfieldSelect">
736 <xsl:with-param name="codes">avxyz</xsl:with-param>
737 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
738 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
739 </xsl:call-template>
740 </a>
741 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
742 </xsl:for-each>
743 </span>
744 </xsl:if>
746 <!-- DDC classification -->
747 <xsl:if test="marc:datafield[@tag=082]">
748 <span class="results_summary ddc">
749 <span class="label">DDC classification: </span>
750 <xsl:for-each select="marc:datafield[@tag=082]">
751 <xsl:call-template name="subfieldSelect">
752 <xsl:with-param name="codes">a</xsl:with-param>
753 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
754 </xsl:call-template>
755 <xsl:choose>
756 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
757 <xsl:otherwise> | </xsl:otherwise>
758 </xsl:choose>
759 </xsl:for-each>
760 </span>
761 </xsl:if>
763 <xsl:if test="marc:datafield[@tag=856]">
764 <span class="results_summary online_resources"><span class="label">Online resources: </span>
765 <xsl:for-each select="marc:datafield[@tag=856]">
766 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
767 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
768 <xsl:choose>
769 <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')">
770 <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>
771 </xsl:when>
772 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
773 <xsl:call-template name="subfieldSelect">
774 <xsl:with-param name="codes">y3z</xsl:with-param>
775 </xsl:call-template>
776 </xsl:when>
777 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
778 <xsl:choose>
779 <xsl:when test="$URLLinkText!=''">
780 <xsl:value-of select="$URLLinkText"/>
781 </xsl:when>
782 <xsl:otherwise>
783 <xsl:text>Click here to access online</xsl:text>
784 </xsl:otherwise>
785 </xsl:choose>
786 </xsl:when>
787 </xsl:choose>
788 </a>
789 <xsl:choose>
790 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
791 <xsl:otherwise> | </xsl:otherwise>
792 </xsl:choose>
794 </xsl:for-each>
795 </span>
796 </xsl:if>
797 <xsl:if test="marc:datafield[@tag=505]">
798 <div class="results_summary contents">
799 <xsl:choose>
800 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
801 <span class="label">Contents:</span>
802 </xsl:when>
803 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
804 <span class="label">Incomplete contents:</span>
805 </xsl:when>
806 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
807 <span class="label">Partial contents:</span>
808 </xsl:when>
809 </xsl:choose>
810 <xsl:for-each select="marc:datafield[@tag=505]">
811 <div class='contentblock'>
812 <xsl:choose>
813 <xsl:when test="@ind2=0">
814 <xsl:call-template name="subfieldSelectSpan">
815 <xsl:with-param name="codes">tru</xsl:with-param>
816 </xsl:call-template>
817 </xsl:when>
818 <xsl:otherwise>
819 <xsl:call-template name="subfieldSelectSpan">
820 <xsl:with-param name="codes">atru</xsl:with-param>
821 </xsl:call-template>
822 </xsl:otherwise>
823 </xsl:choose>
824 </div>
825 </xsl:for-each>
826 </div>
827 </xsl:if>
829 <!-- 586 -->
830 <xsl:if test="marc:datafield[@tag=586]">
831 <span class="results_summary awardsnote">
832 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
833 <span class="label">Awards: </span>
834 </xsl:if>
835 <xsl:for-each select="marc:datafield[@tag=586]">
836 <xsl:value-of select="marc:subfield[@code='a']"/>
837 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
838 </xsl:for-each>
839 </span>
840 </xsl:if>
842 <!-- 508 -->
843 <xsl:if test="marc:datafield[@tag=508]">
844 <div class="results_summary prod_credits">
845 <span class="label">Production credits: </span>
846 <xsl:for-each select="marc:datafield[@tag=508]">
847 <xsl:call-template name="subfieldSelectSpan">
848 <xsl:with-param name="codes">a</xsl:with-param>
849 </xsl:call-template>
850 </xsl:for-each>
851 </div>
852 </xsl:if>
854 <!-- 773 -->
855 <xsl:if test="marc:datafield[@tag=773]">
856 <xsl:for-each select="marc:datafield[@tag=773]">
857 <xsl:if test="@ind1 !=1">
858 <span class="results_summary in"><span class="label">
859 <xsl:choose>
860 <xsl:when test="@ind2=' '">
862 </xsl:when>
863 <xsl:when test="@ind2=8">
864 <xsl:if test="marc:subfield[@code='i']">
865 <xsl:value-of select="marc:subfield[@code='i']"/>
866 </xsl:if>
867 </xsl:when>
868 </xsl:choose>
869 </span>
870 <xsl:variable name="f773">
871 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
872 <xsl:with-param name="codes">a_t</xsl:with-param>
873 </xsl:call-template></xsl:with-param></xsl:call-template>
874 </xsl:variable>
875 <xsl:choose>
876 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
877 <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>
878 <xsl:value-of select="translate($f773, '()', '')"/>
879 </a>
880 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
881 </xsl:when>
882 <xsl:when test="marc:subfield[@code='0']">
883 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
884 <xsl:value-of select="$f773"/>
885 </a>
886 </xsl:when>
887 <xsl:otherwise>
888 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
889 <xsl:value-of select="$f773"/>
890 </a>
891 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
892 </xsl:otherwise>
893 </xsl:choose>
894 </span>
896 <xsl:if test="marc:subfield[@code='n']">
897 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
898 </xsl:if>
900 </xsl:if>
901 </xsl:for-each>
902 </xsl:if>
904 <xsl:if test="marc:datafield[@tag=502]">
905 <span class="results_summary diss_note">
906 <span class="label">Dissertation note: </span>
907 <xsl:for-each select="marc:datafield[@tag=502]">
908 <xsl:call-template name="subfieldSelect">
909 <xsl:with-param name="codes">abcdgo</xsl:with-param>
910 </xsl:call-template>
911 </xsl:for-each>
912 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
913 </span>
914 </xsl:if>
916 <!-- 866 textual holdings -->
917 <xsl:if test="marc:datafield[@tag=866]">
918 <span class="results_summary holdings_note"><span class="label">Holdings note: </span>
919 <xsl:for-each select="marc:datafield[@tag=866]">
920 <xsl:call-template name="subfieldSelect">
921 <xsl:with-param name="codes">axz</xsl:with-param>
922 </xsl:call-template>
923 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
924 </xsl:for-each>
925 </span>
926 </xsl:if>
928 <!-- 775 Other Edition -->
929 <xsl:if test="marc:datafield[@tag=775]">
930 <span class="results_summary other_editions"><span class="label">Other editions: </span>
931 <xsl:for-each select="marc:datafield[@tag=775]">
932 <xsl:variable name="f775">
933 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
934 <xsl:with-param name="codes">a_t</xsl:with-param>
935 </xsl:call-template></xsl:with-param></xsl:call-template>
936 </xsl:variable>
937 <xsl:if test="marc:subfield[@code='i']">
938 <xsl:call-template name="subfieldSelect">
939 <xsl:with-param name="codes">i</xsl:with-param>
940 </xsl:call-template>
941 <xsl:text>: </xsl:text>
942 </xsl:if>
944 <xsl:choose>
945 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
946 <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>
947 </xsl:when>
948 <xsl:otherwise>
949 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f775, '()', '')"/></xsl:attribute>
950 </xsl:otherwise>
951 </xsl:choose>
952 <xsl:call-template name="subfieldSelect">
953 <xsl:with-param name="codes">a_t</xsl:with-param>
954 </xsl:call-template>
955 </a>
956 <xsl:choose>
957 <xsl:when test="position()=last()"></xsl:when>
958 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
959 </xsl:choose>
960 </xsl:for-each>
961 </span>
962 </xsl:if>
964 <!-- 780 -->
965 <xsl:if test="marc:datafield[@tag=780]">
966 <xsl:for-each select="marc:datafield[@tag=780]">
967 <xsl:if test="@ind1=0">
968 <span class="results_summary preceeding_entry">
969 <xsl:choose>
970 <xsl:when test="@ind2=0">
971 <span class="label">Continues:</span>
972 </xsl:when>
973 <xsl:when test="@ind2=1">
974 <span class="label">Continues in part:</span>
975 </xsl:when>
976 <xsl:when test="@ind2=2">
977 <span class="label">Supersedes:</span>
978 </xsl:when>
979 <xsl:when test="@ind2=3">
980 <span class="label">Supersedes in part:</span>
981 </xsl:when>
982 <xsl:when test="@ind2=4">
983 <span class="label">Formed by the union: ... and: ...</span>
984 </xsl:when>
985 <xsl:when test="@ind2=5">
986 <span class="label">Absorbed:</span>
987 </xsl:when>
988 <xsl:when test="@ind2=6">
989 <span class="label">Absorbed in part:</span>
990 </xsl:when>
991 <xsl:when test="@ind2=7">
992 <span class="label">Separated from:</span>
993 </xsl:when>
994 </xsl:choose>
995 <xsl:text> </xsl:text>
996 <xsl:variable name="f780">
997 <xsl:call-template name="subfieldSelect">
998 <xsl:with-param name="codes">a_t</xsl:with-param>
999 </xsl:call-template>
1000 </xsl:variable>
1001 <xsl:choose>
1002 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1003 <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>
1004 <xsl:value-of select="translate($f780, '()', '')"/>
1005 </a>
1006 </xsl:when>
1007 <xsl:otherwise>
1008 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
1009 <xsl:value-of select="translate($f780, '()', '')"/>
1010 </a>
1011 </xsl:otherwise>
1012 </xsl:choose>
1013 </span>
1015 <xsl:if test="marc:subfield[@code='n']">
1016 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1017 </xsl:if>
1019 </xsl:if>
1020 </xsl:for-each>
1021 </xsl:if>
1023 <!-- 785 -->
1024 <xsl:if test="marc:datafield[@tag=785]">
1025 <xsl:for-each select="marc:datafield[@tag=785]">
1026 <span class="results_summary succeeding_entry">
1027 <xsl:choose>
1028 <xsl:when test="@ind2=0">
1029 <span class="label">Continued by:</span>
1030 </xsl:when>
1031 <xsl:when test="@ind2=1">
1032 <span class="label">Continued in part by:</span>
1033 </xsl:when>
1034 <xsl:when test="@ind2=2">
1035 <span class="label">Superseded by:</span>
1036 </xsl:when>
1037 <xsl:when test="@ind2=3">
1038 <span class="label">Superseded in part by:</span>
1039 </xsl:when>
1040 <xsl:when test="@ind2=4">
1041 <span class="label">Absorbed by:</span>
1042 </xsl:when>
1043 <xsl:when test="@ind2=5">
1044 <span class="label">Absorbed in part by:</span>
1045 </xsl:when>
1046 <xsl:when test="@ind2=6">
1047 <span class="label">Split into .. and ...:</span>
1048 </xsl:when>
1049 <xsl:when test="@ind2=7">
1050 <span class="label">Merged with ... to form ...</span>
1051 </xsl:when>
1052 <xsl:when test="@ind2=8">
1053 <span class="label">Changed back to:</span>
1054 </xsl:when>
1055 </xsl:choose>
1056 <xsl:text> </xsl:text>
1057 <xsl:variable name="f785">
1058 <xsl:call-template name="subfieldSelect">
1059 <xsl:with-param name="codes">a_t</xsl:with-param>
1060 </xsl:call-template>
1061 </xsl:variable>
1063 <xsl:choose>
1064 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1065 <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>
1066 <xsl:value-of select="translate($f785, '()', '')"/>
1067 </a>
1068 </xsl:when>
1069 <xsl:otherwise>
1070 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
1071 <xsl:value-of select="translate($f785, '()', '')"/>
1072 </a>
1073 </xsl:otherwise>
1074 </xsl:choose>
1076 </span>
1077 </xsl:for-each>
1078 </xsl:if>
1080 <xsl:if test="$OPACBaseURL!=''">
1081 <span class="results_summary"><span class="label">OPAC view: </span>
1082 <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>.
1083 </span>
1084 </xsl:if>
1086 </xsl:template>
1088 <xsl:template name="nameABCQ">
1089 <xsl:call-template name="chopPunctuation">
1090 <xsl:with-param name="chopString">
1091 <xsl:call-template name="subfieldSelect">
1092 <xsl:with-param name="codes">abcq</xsl:with-param>
1093 </xsl:call-template>
1094 </xsl:with-param>
1095 <xsl:with-param name="punctuation">
1096 <xsl:text>:,;/ </xsl:text>
1097 </xsl:with-param>
1098 </xsl:call-template>
1099 </xsl:template>
1101 <xsl:template name="nameABCDN">
1102 <xsl:call-template name="chopPunctuation">
1103 <xsl:with-param name="chopString">
1104 <xsl:call-template name="subfieldSelect">
1105 <xsl:with-param name="codes">abcdn</xsl:with-param>
1106 </xsl:call-template>
1107 </xsl:with-param>
1108 <xsl:with-param name="punctuation">
1109 <xsl:text>:,;/ </xsl:text>
1110 </xsl:with-param>
1111 </xsl:call-template>
1112 </xsl:template>
1114 <xsl:template name="nameACDEQ">
1115 <xsl:call-template name="subfieldSelect">
1116 <xsl:with-param name="codes">acdeq</xsl:with-param>
1117 </xsl:call-template>
1118 </xsl:template>
1120 <xsl:template name="part">
1121 <xsl:variable name="partNumber">
1122 <xsl:call-template name="specialSubfieldSelect">
1123 <xsl:with-param name="axis">n</xsl:with-param>
1124 <xsl:with-param name="anyCodes">n</xsl:with-param>
1125 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1126 </xsl:call-template>
1127 </xsl:variable>
1128 <xsl:variable name="partName">
1129 <xsl:call-template name="specialSubfieldSelect">
1130 <xsl:with-param name="axis">p</xsl:with-param>
1131 <xsl:with-param name="anyCodes">p</xsl:with-param>
1132 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1133 </xsl:call-template>
1134 </xsl:variable>
1135 <xsl:if test="string-length(normalize-space($partNumber))">
1136 <xsl:call-template name="chopPunctuation">
1137 <xsl:with-param name="chopString" select="$partNumber"/>
1138 </xsl:call-template>
1139 </xsl:if>
1140 <xsl:if test="string-length(normalize-space($partName))">
1141 <xsl:call-template name="chopPunctuation">
1142 <xsl:with-param name="chopString" select="$partName"/>
1143 </xsl:call-template>
1144 </xsl:if>
1145 </xsl:template>
1147 <xsl:template name="specialSubfieldSelect">
1148 <xsl:param name="anyCodes"/>
1149 <xsl:param name="axis"/>
1150 <xsl:param name="beforeCodes"/>
1151 <xsl:param name="afterCodes"/>
1152 <xsl:variable name="str">
1153 <xsl:for-each select="marc:subfield">
1154 <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])">
1155 <xsl:value-of select="text()"/>
1156 <xsl:text> </xsl:text>
1157 </xsl:if>
1158 </xsl:for-each>
1159 </xsl:variable>
1160 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1161 </xsl:template>
1163 <xsl:template name="showAuthor">
1164 <xsl:param name="authorfield"/>
1165 <xsl:param name="UseAuthoritiesForTracings"/>
1166 <xsl:if test="count($authorfield)&gt;0">
1167 <h5 class="author">
1168 <xsl:for-each select="$authorfield">
1169 <xsl:choose>
1170 <xsl:when test="position()&gt;1"/>
1171 <!-- #13383 -->
1172 <xsl:when test="@tag&lt;700">By: </xsl:when>
1173 <!--#13382 Changed Additional author to contributor -->
1174 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1175 </xsl:choose>
1177 <xsl:choose>
1178 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1179 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
1180 </xsl:when>
1181 <xsl:otherwise>
1182 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
1183 </xsl:otherwise>
1184 </xsl:choose>
1185 <xsl:choose>
1186 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1187 <!-- #13383 -->
1188 <xsl:call-template name="chopPunctuation">
1189 <xsl:with-param name="chopString">
1190 <xsl:call-template name="subfieldSelect">
1191 <xsl:with-param name="codes">
1192 <xsl:choose>
1193 <!-- #13383 include subfield e for field 111 -->
1194 <xsl:when test="@tag=111">abcdeqt</xsl:when>
1195 <xsl:otherwise>abcdjqt</xsl:otherwise>
1196 </xsl:choose>
1197 </xsl:with-param>
1198 </xsl:call-template>
1199 </xsl:with-param>
1200 <xsl:with-param name="punctuation">
1201 <xsl:text>:,;/ </xsl:text>
1202 </xsl:with-param>
1203 </xsl:call-template>
1204 </xsl:when>
1205 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1206 <!--#13382 Added all relevant subfields 4, e, are handled separately -->
1207 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1208 <xsl:variable name="str">
1209 <xsl:call-template name="subfieldSelect">
1210 <xsl:with-param name="codes">abcdfghiklmnoprstux</xsl:with-param>
1211 </xsl:call-template>
1212 </xsl:variable>
1213 <xsl:call-template name="chopPunctuation">
1214 <xsl:with-param name="chopString">
1215 <xsl:value-of select="$str"/>
1216 </xsl:with-param>
1217 <xsl:with-param name="punctuation">
1218 <xsl:text>:,;/. </xsl:text>
1219 </xsl:with-param>
1220 </xsl:call-template>
1221 </xsl:when>
1222 </xsl:choose>
1224 <!-- add relator code too between brackets-->
1225 <!-- #13383 include relator code j for field 111 -->
1226 <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])">
1227 <span class="relatorcode">
1228 <xsl:text> [</xsl:text>
1229 <xsl:choose>
1230 <xsl:when test="@tag=111">
1231 <xsl:choose>
1232 <!-- Prefer j over 4 -->
1233 <xsl:when test="marc:subfield[@code='j']">
1234 <xsl:for-each select="marc:subfield[@code='j']">
1235 <xsl:value-of select="."/>
1236 <xsl:if test="position() != last()">, </xsl:if>
1237 </xsl:for-each>
1238 </xsl:when>
1239 <xsl:otherwise>
1240 <xsl:for-each select="marc:subfield[@code=4]">
1241 <xsl:value-of select="."/>
1242 <xsl:if test="position() != last()">, </xsl:if>
1243 </xsl:for-each>
1244 </xsl:otherwise>
1245 </xsl:choose>
1246 </xsl:when>
1247 <!-- Prefer e over 4 -->
1248 <xsl:when test="marc:subfield[@code='e']">
1249 <xsl:for-each select="marc:subfield[@code='e']">
1250 <xsl:value-of select="."/>
1251 <xsl:if test="position() != last()">, </xsl:if>
1252 </xsl:for-each>
1253 </xsl:when>
1254 <xsl:otherwise>
1255 <xsl:for-each select="marc:subfield[@code=4]">
1256 <xsl:value-of select="."/>
1257 <xsl:if test="position() != last()">, </xsl:if>
1258 </xsl:for-each>
1259 </xsl:otherwise>
1260 </xsl:choose>
1261 <xsl:text>]</xsl:text>
1262 </span>
1263 </xsl:if>
1264 </a>
1265 <xsl:choose>
1266 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1267 </xsl:choose>
1268 </xsl:for-each>
1269 </h5>
1271 </xsl:if>
1272 </xsl:template>
1274 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1275 <xsl:template name="subfieldSelectSubject">
1276 <xsl:param name="codes"/>
1277 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1278 <xsl:param name="subdivCodes"/>
1279 <xsl:param name="subdivDelimiter"/>
1280 <xsl:param name="prefix"/>
1281 <xsl:param name="suffix"/>
1282 <xsl:variable name="str">
1283 <xsl:for-each select="marc:subfield">
1284 <xsl:if test="contains($codes, @code)">
1285 <xsl:if test="contains($subdivCodes, @code)">
1286 <xsl:value-of select="$subdivDelimiter"/>
1287 </xsl:if>
1288 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1289 </xsl:if>
1290 </xsl:for-each>
1291 </xsl:variable>
1292 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1293 </xsl:template>
1295 </xsl:stylesheet>