Bug 22884: Remove field ending . from XSLT templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / xslt / MARC21slim2intranetDetail.xsl
blob80e8edf0973fcf64a6331eb683402f6ec3253bc1
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 xmlns:str="http://exslt.org/strings"
12 exclude-result-prefixes="marc items str">
13 <xsl:import href="MARC21slimUtils.xsl"/>
14 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
15 <xsl:template match="/">
16 <xsl:apply-templates/>
17 </xsl:template>
19 <xsl:template match="marc:record">
21 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
22 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
23 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
24 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
25 <xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/>
26 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
27 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
28 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
29 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
30 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
31 <xsl:variable name="OpacSuppression" select="marc:sysprefs/marc:syspref[@name='OpacSuppression']"/>
32 <xsl:variable name="TracingQuotesLeft">
33 <xsl:choose>
34 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
35 <xsl:otherwise>"</xsl:otherwise>
36 </xsl:choose>
37 </xsl:variable>
38 <xsl:variable name="TracingQuotesRight">
39 <xsl:choose>
40 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
41 <xsl:otherwise>"</xsl:otherwise>
42 </xsl:choose>
43 </xsl:variable>
45 <xsl:variable name="leader" select="marc:leader"/>
46 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
47 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
48 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
49 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
50 <xsl:variable name="materialTypeCode">
51 <xsl:choose>
52 <xsl:when test="$leader19='a'">ST</xsl:when>
53 <xsl:when test="$leader6='a'">
54 <xsl:choose>
55 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
56 <xsl:when test="$leader7='i' or $leader7='s'">SE</xsl:when>
57 <xsl:when test="$leader7='a' or $leader7='b'">AR</xsl:when>
58 </xsl:choose>
59 </xsl:when>
60 <xsl:when test="$leader6='t'">BK</xsl:when>
61 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
62 <xsl:when test="$leader6='m'">CF</xsl:when>
63 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
64 <xsl:when test="$leader6='g'">VM</xsl:when>
65 <xsl:when test="$leader6='k'">PK</xsl:when>
66 <xsl:when test="$leader6='r'">OB</xsl:when>
67 <xsl:when test="$leader6='i'">SO</xsl:when>
68 <xsl:when test="$leader6='j'">MU</xsl:when>
69 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
70 </xsl:choose>
71 </xsl:variable>
72 <xsl:variable name="materialTypeLabel">
73 <xsl:choose>
74 <xsl:when test="$leader19='a'">Set</xsl:when>
75 <xsl:when test="$leader6='a'">
76 <xsl:choose>
77 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
78 <xsl:when test="$leader7='i' or $leader7='s'">
79 <xsl:choose>
80 <xsl:when test="substring($controlField008,22,1)!='m'">Continuing resource</xsl:when>
81 <xsl:otherwise>Series</xsl:otherwise>
82 </xsl:choose>
83 </xsl:when>
84 <xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
85 </xsl:choose>
86 </xsl:when>
87 <xsl:when test="$leader6='t'">Book</xsl:when>
88 <xsl:when test="$leader6='o'">Kit</xsl:when>
89 <xsl:when test="$leader6='p'">Mixed materials</xsl:when>
90 <xsl:when test="$leader6='m'">Computer file</xsl:when>
91 <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
92 <xsl:when test="$leader6='g'">Film</xsl:when>
93 <xsl:when test="$leader6='k'">Picture</xsl:when>
94 <xsl:when test="$leader6='r'">Object</xsl:when>
95 <xsl:when test="$leader6='j'">Music</xsl:when>
96 <xsl:when test="$leader6='i'">Sound</xsl:when>
97 <xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
98 </xsl:choose>
99 </xsl:variable>
101 <!-- Indicate if record is suppressed in OPAC -->
102 <xsl:if test="$OpacSuppression = 1">
103 <xsl:if test="marc:datafield[@tag=942][marc:subfield[@code='n'] = '1']">
104 <span class="results_summary suppressed_opac">Suppressed in OPAC</span>
105 </xsl:if>
106 </xsl:if>
108 <!-- Title Statement -->
109 <!-- Alternate Graphic Representation (MARC 880) -->
110 <xsl:if test="$display880">
111 <h1 class="title">
112 <xsl:call-template name="m880Select">
113 <xsl:with-param name="basetags">245</xsl:with-param>
114 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
115 </xsl:call-template>
116 </h1>
117 </xsl:if>
119 <!--Bug 13381 -->
120 <xsl:if test="marc:datafield[@tag=245]">
121 <h1 class="title" property="name">
122 <xsl:for-each select="marc:datafield[@tag=245]">
123 <xsl:call-template name="subfieldSelect">
124 <xsl:with-param name="codes">a</xsl:with-param>
125 </xsl:call-template>
126 <xsl:text> </xsl:text>
127 <!-- 13381 add additional subfields-->
128 <!-- bz 17625 adding subfields f and g -->
129 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
130 <xsl:choose>
131 <xsl:when test="@code='h'">
132 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
133 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
134 </xsl:when>
135 <xsl:when test="@code='c'">
136 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
137 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
138 </xsl:when>
139 <xsl:otherwise>
140 <xsl:apply-templates/>
141 <xsl:text> </xsl:text>
142 </xsl:otherwise>
143 </xsl:choose>
144 </xsl:for-each>
145 </xsl:for-each>
146 </h1>
147 </xsl:if>
149 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
150 <xsl:if test="$display880">
151 <h5 class="author">
152 <xsl:call-template name="m880Select">
153 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
154 <xsl:with-param name="codes">abc</xsl:with-param>
155 <xsl:with-param name="index">au</xsl:with-param>
156 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
157 <!-- do not use label 'by ' here, it would be repeated for every occurrence of 100,110,111,700,710,711 -->
158 </xsl:call-template>
159 </h5>
160 </xsl:if>
162 <!-- Author Statement -->
163 <xsl:call-template name="showAuthor">
164 <xsl:with-param name="authorfield" select="marc:datafield[@tag=100 or @tag=110 or @tag=111]"/>
165 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
166 </xsl:call-template>
168 <!-- #13382 Suppress 700$i and 7xx/@ind2=2 -->
169 <xsl:call-template name="showAuthor">
170 <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'])]"/>
171 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
172 </xsl:call-template>
174 <xsl:if test="$DisplayIconsXSLT!='0' and $materialTypeCode!=''">
175 <span class="results_summary type"><span class="label">Material type: </span>
176 <xsl:element name="img"><xsl:attribute name="class">materialtype mt_icon_<xsl:value-of select="$materialTypeCode"/></xsl:attribute><xsl:attribute name="src">/intranet-tmpl/prog/img/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
177 <xsl:text> </xsl:text>
178 <xsl:value-of select="$materialTypeLabel"/>
179 </span>
180 </xsl:if>
182 <xsl:call-template name="show-lang-041"/>
184 <!--Series: Alternate Graphic Representation (MARC 880) -->
185 <xsl:if test="$display880">
186 <xsl:call-template name="m880Select">
187 <xsl:with-param name="basetags">440,490</xsl:with-param>
188 <xsl:with-param name="codes">av</xsl:with-param>
189 <xsl:with-param name="class">results_summary series</xsl:with-param>
190 <xsl:with-param name="label">Series: </xsl:with-param>
191 <xsl:with-param name="index">se</xsl:with-param>
192 </xsl:call-template>
193 </xsl:if>
195 <!-- Series -->
196 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
197 <span class="results_summary series"><span class="label">Series: </span>
198 <!-- 440 -->
199 <xsl:for-each select="marc:datafield[@tag=440]">
200 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
201 <xsl:call-template name="chopPunctuation">
202 <xsl:with-param name="chopString">
203 <xsl:call-template name="subfieldSelect">
204 <xsl:with-param name="codes">av</xsl:with-param>
205 </xsl:call-template>
206 </xsl:with-param>
207 </xsl:call-template>
208 </a>
209 <xsl:call-template name="part"/>
210 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose>
211 </xsl:for-each>
213 <!-- 490 Series not traced, Ind1 = 0 -->
214 <xsl:for-each select="marc:datafield[@tag=490][@ind1!=1]">
215 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
216 <xsl:call-template name="chopPunctuation">
217 <xsl:with-param name="chopString">
218 <xsl:call-template name="subfieldSelect">
219 <xsl:with-param name="codes">av</xsl:with-param>
220 </xsl:call-template>
221 </xsl:with-param>
222 </xsl:call-template>
223 </a>
224 <xsl:call-template name="part"/>
225 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
226 </xsl:for-each>
227 <!-- 490 Series traced, Ind1 = 1 -->
228 <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
229 <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811]">
230 <xsl:choose>
231 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
232 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:subfield[@code='w'], true())"/></xsl:attribute>
233 <xsl:call-template name="chopPunctuation">
234 <xsl:with-param name="chopString">
235 <xsl:call-template name="subfieldSelect">
236 <xsl:with-param name="codes">a_t</xsl:with-param>
237 </xsl:call-template>
238 </xsl:with-param>
239 </xsl:call-template>
240 </a>
241 </xsl:when>
242 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
243 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
244 <xsl:call-template name="chopPunctuation">
245 <xsl:with-param name="chopString">
246 <xsl:call-template name="subfieldSelect">
247 <xsl:with-param name="codes">a_t</xsl:with-param>
248 </xsl:call-template>
249 </xsl:with-param>
250 </xsl:call-template>
251 </a>
252 </xsl:when>
253 <xsl:otherwise>
254 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='t'], true())"/>"&amp;q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
255 <xsl:call-template name="chopPunctuation">
256 <xsl:with-param name="chopString">
257 <xsl:call-template name="subfieldSelect">
258 <xsl:with-param name="codes">a_t</xsl:with-param>
259 </xsl:call-template>
260 </xsl:with-param>
261 </xsl:call-template>
262 </a>
263 <xsl:call-template name="part"/>
264 </xsl:otherwise>
265 </xsl:choose>
266 <xsl:text>: </xsl:text>
267 <xsl:value-of select="marc:subfield[@code='v']" />
268 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
269 </xsl:for-each>
271 <xsl:for-each select="marc:datafield[@tag=830]">
272 <xsl:choose>
273 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
274 <a href="/cgi-bin/koha/catalogue/search.pl?q=rcn:{marc:subfield[@code='w']}">
275 <xsl:call-template name="chopPunctuation">
276 <xsl:with-param name="chopString">
277 <xsl:call-template name="subfieldSelect">
278 <xsl:with-param name="codes">a_t</xsl:with-param>
279 </xsl:call-template>
280 </xsl:with-param>
281 </xsl:call-template>
282 </a>
283 </xsl:when>
284 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
285 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
286 <xsl:call-template name="chopPunctuation">
287 <xsl:with-param name="chopString">
288 <xsl:call-template name="subfieldSelect">
289 <xsl:with-param name="codes">a_t</xsl:with-param>
290 </xsl:call-template>
291 </xsl:with-param>
292 </xsl:call-template>
293 </a>
294 </xsl:when>
295 <xsl:otherwise>
296 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
297 <xsl:call-template name="chopPunctuation">
298 <xsl:with-param name="chopString">
299 <xsl:call-template name="subfieldSelect">
300 <xsl:with-param name="codes">a_t</xsl:with-param>
301 </xsl:call-template>
302 </xsl:with-param>
303 </xsl:call-template>
304 </a>
305 <xsl:call-template name="part"/>
306 </xsl:otherwise>
307 </xsl:choose>
308 <xsl:text>: </xsl:text>
309 <xsl:value-of select="marc:subfield[@code='v']" />
310 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
311 </xsl:for-each>
312 </xsl:if>
314 </span>
315 </xsl:if>
317 <!-- Analytics -->
318 <xsl:if test="$leader7='s'">
319 <span class="results_summary analytics"><span class="label">Analytics: </span>
321 <xsl:choose>
322 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
323 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
324 </xsl:when>
325 <xsl:otherwise>
326 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Host-item:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
327 </xsl:otherwise>
328 </xsl:choose>
329 <xsl:text>Show analytics</xsl:text>
330 </a>
331 </span>
332 </xsl:if>
334 <!-- Volumes of sets and traced series -->
335 <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
336 <span class="results_summary volumes"><span class="label">Volumes: </span>
338 <xsl:choose>
339 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
340 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="str:encode-uri(marc:controlfield[@tag=001], true())"/>+not+(bib-level:a+or+bib-level:b)</xsl:attribute>
341 </xsl:when>
342 <xsl:otherwise>
343 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', ''), true())"/></xsl:attribute>
344 </xsl:otherwise>
345 </xsl:choose>
346 <xsl:text>Show volumes</xsl:text>
347 </a>
348 </span>
349 </xsl:if>
351 <!-- Set -->
352 <xsl:if test="$leader19='c'">
353 <span class="results_summary set"><span class="label">Set: </span>
354 <xsl:for-each select="marc:datafield[@tag=773]">
356 <xsl:choose>
357 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
358 <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>
359 </xsl:when>
360 <xsl:otherwise>
361 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', ''), true())"/></xsl:attribute>
362 </xsl:otherwise>
363 </xsl:choose>
364 <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
365 </a>
366 <xsl:choose>
367 <xsl:when test="position()=last()"></xsl:when>
368 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
369 </xsl:choose>
370 </xsl:for-each>
371 </span>
372 </xsl:if>
374 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
375 <xsl:if test="$display880">
376 <xsl:call-template name="m880Select">
377 <xsl:with-param name="basetags">260</xsl:with-param>
378 <xsl:with-param name="codes">abcg</xsl:with-param>
379 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
380 <xsl:with-param name="label">Publisher: </xsl:with-param>
381 </xsl:call-template>
382 </xsl:if>
384 <!-- Publisher info and RDA related info from tags 260, 264 -->
385 <xsl:choose>
386 <xsl:when test="marc:datafield[@tag=264]">
387 <xsl:call-template name="showRDAtag264">
388 <xsl:with-param name="show_url">1</xsl:with-param>
389 </xsl:call-template>
390 </xsl:when>
391 <xsl:when test="marc:datafield[@tag=260]">
392 <span class="results_summary publisher"><span class="label">Publisher: </span>
393 <xsl:for-each select="marc:datafield[@tag=260]">
394 <xsl:if test="marc:subfield[@code='a']">
395 <xsl:call-template name="subfieldSelect">
396 <xsl:with-param name="codes">a</xsl:with-param>
397 </xsl:call-template>
398 </xsl:if>
399 <xsl:text> </xsl:text>
400 <xsl:if test="marc:subfield[@code='b']">
402 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Provider:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='b'], true())"/>"</xsl:attribute>
403 <xsl:call-template name="subfieldSelect">
404 <xsl:with-param name="codes">b</xsl:with-param>
405 </xsl:call-template>
406 </a>
407 </xsl:if>
408 <xsl:text> </xsl:text>
409 <xsl:call-template name="chopPunctuation">
410 <xsl:with-param name="chopString">
411 <xsl:call-template name="subfieldSelect">
412 <xsl:with-param name="codes">cg</xsl:with-param>
413 </xsl:call-template>
414 </xsl:with-param>
415 </xsl:call-template>
416 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
417 </xsl:for-each>
418 </span>
419 </xsl:when>
420 </xsl:choose>
422 <!-- Edition Statement: Alternate Graphic Representation (MARC 880) -->
423 <xsl:if test="$display880">
424 <xsl:call-template name="m880Select">
425 <xsl:with-param name="basetags">250</xsl:with-param>
426 <xsl:with-param name="codes">ab</xsl:with-param>
427 <xsl:with-param name="class">results_summary edition</xsl:with-param>
428 <xsl:with-param name="label">Edition: </xsl:with-param>
429 </xsl:call-template>
430 </xsl:if>
432 <xsl:if test="marc:datafield[@tag=250]">
433 <span class="results_summary edition"><span class="label">Edition: </span>
434 <xsl:for-each select="marc:datafield[@tag=250]">
435 <xsl:call-template name="chopPunctuation">
436 <xsl:with-param name="chopString">
437 <xsl:call-template name="subfieldSelect">
438 <xsl:with-param name="codes">ab</xsl:with-param>
439 </xsl:call-template>
440 </xsl:with-param>
441 </xsl:call-template>
442 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
443 </xsl:for-each>
444 </span>
445 </xsl:if>
447 <!-- Description: Alternate Graphic Representation (MARC 880) -->
448 <xsl:if test="$display880">
449 <xsl:call-template name="m880Select">
450 <xsl:with-param name="basetags">300</xsl:with-param>
451 <xsl:with-param name="codes">abceg</xsl:with-param>
452 <xsl:with-param name="class">results_summary description</xsl:with-param>
453 <xsl:with-param name="label">Description: </xsl:with-param>
454 </xsl:call-template>
455 </xsl:if>
457 <xsl:if test="marc:datafield[@tag=300]">
458 <span class="results_summary description"><span class="label">Description: </span>
459 <xsl:for-each select="marc:datafield[@tag=300]">
460 <xsl:call-template name="chopPunctuation">
461 <xsl:with-param name="chopString">
462 <xsl:call-template name="subfieldSelect">
463 <xsl:with-param name="codes">abcefg</xsl:with-param>
464 </xsl:call-template>
465 </xsl:with-param>
466 </xsl:call-template>
467 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
468 </xsl:for-each>
469 </span>
470 </xsl:if>
472 <!-- Content Type -->
473 <xsl:if test="marc:datafield[@tag=336] or marc:datafield[@tag=337] or marc:datafield[@tag=338]">
474 <span class="results_summary" id="content_type">
475 <xsl:if test="marc:datafield[@tag=336]">
476 <span class="label">Content type: </span>
477 <xsl:for-each select="marc:datafield[@tag=336]">
478 <xsl:call-template name="subfieldSelect">
479 <xsl:with-param name="codes">a</xsl:with-param>
480 <xsl:with-param name="delimeter">, </xsl:with-param>
481 </xsl:call-template>
482 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
483 </xsl:for-each>
484 </xsl:if>
485 <xsl:text> </xsl:text>
486 <!-- Media Type -->
487 <xsl:if test="marc:datafield[@tag=337]">
488 <span class="label">Media type: </span>
489 <xsl:for-each select="marc:datafield[@tag=337]">
490 <xsl:call-template name="subfieldSelect">
491 <xsl:with-param name="codes">a</xsl:with-param>
492 <xsl:with-param name="delimeter">, </xsl:with-param>
493 </xsl:call-template>
494 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
495 </xsl:for-each>
496 </xsl:if>
497 <xsl:text> </xsl:text>
498 <!-- Media Type -->
499 <xsl:if test="marc:datafield[@tag=338]">
500 <span class="label">Carrier type: </span>
501 <xsl:for-each select="marc:datafield[@tag=338]">
502 <xsl:call-template name="subfieldSelect">
503 <xsl:with-param name="codes">a</xsl:with-param>
504 <xsl:with-param name="delimeter">, </xsl:with-param>
505 </xsl:call-template>
506 <xsl:if test="position() != last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
507 </xsl:for-each>
508 </xsl:if>
509 </span>
510 </xsl:if>
513 <xsl:call-template name="showISBNISSN"/>
515 <xsl:if test="marc:datafield[@tag=013]">
516 <span class="results_summary patent_info">
517 <span class="label">Patent information: </span>
518 <xsl:for-each select="marc:datafield[@tag=013]">
519 <xsl:call-template name="subfieldSelect">
520 <xsl:with-param name="codes">acdef</xsl:with-param>
521 <xsl:with-param name="delimeter">, </xsl:with-param>
522 </xsl:call-template>
523 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
524 </xsl:for-each>
525 </span>
526 </xsl:if>
528 <xsl:if test="marc:datafield[@tag=088]">
529 <span class="results_summary report_number">
530 <span class="label">Report number: </span>
531 <xsl:for-each select="marc:datafield[@tag=088]">
532 <xsl:call-template name="subfieldSelect">
533 <xsl:with-param name="codes">a</xsl:with-param>
534 </xsl:call-template>
535 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
536 </xsl:for-each>
537 </span>
538 </xsl:if>
540 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
541 <xsl:if test="$display880">
542 <xsl:call-template name="m880Select">
543 <xsl:with-param name="basetags">246</xsl:with-param>
544 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
545 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
546 <xsl:with-param name="label">Other title: </xsl:with-param>
547 </xsl:call-template>
548 </xsl:if>
550 <xsl:if test="marc:datafield[@tag=246]">
551 <span class="results_summary other_title"><span class="label">Other title: </span>
552 <xsl:for-each select="marc:datafield[@tag=246]">
553 <xsl:call-template name="chopPunctuation">
554 <xsl:with-param name="chopString">
555 <xsl:call-template name="subfieldSelect">
556 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
557 </xsl:call-template>
558 </xsl:with-param>
559 </xsl:call-template>
560 <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])">
561 <xsl:choose>
562 <xsl:when test="@ind2=0"> [Portion of title]</xsl:when>
563 <xsl:when test="@ind2=1"> [Parallel title]</xsl:when>
564 <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when>
565 <xsl:when test="@ind2=3"> [Other title]</xsl:when>
566 <xsl:when test="@ind2=4"> [Cover title]</xsl:when>
567 <xsl:when test="@ind2=5"> [Added title page title]</xsl:when>
568 <xsl:when test="@ind2=6"> [Caption title]</xsl:when>
569 <xsl:when test="@ind2=7"> [Running title]</xsl:when>
570 <xsl:when test="@ind2=8"> [Spine title]</xsl:when>
571 </xsl:choose>
572 </xsl:if>
573 <xsl:if test="marc:subfield[@code='i']">
574 <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/>
575 </xsl:if>
576 <!-- #13386 added separator | -->
577 <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>
578 </xsl:for-each>
579 </span>
580 </xsl:if>
582 <xsl:if test="marc:datafield[@tag=242]">
583 <span class="results_summary translated_title"><span class="label">Title translated: </span>
584 <xsl:for-each select="marc:datafield[@tag=242]">
585 <xsl:call-template name="chopPunctuation">
586 <xsl:with-param name="chopString">
587 <xsl:call-template name="subfieldSelect">
588 <xsl:with-param name="codes">abchnp</xsl:with-param>
589 </xsl:call-template>
590 </xsl:with-param>
591 </xsl:call-template>
592 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
593 </xsl:for-each>
594 </span>
595 </xsl:if>
597 <!-- Uniform Title Statement: Alternate Graphic Representation (MARC 880) -->
598 <xsl:if test="$display880">
599 <xsl:call-template name="m880Select">
600 <xsl:with-param name="basetags">130,240</xsl:with-param>
601 <xsl:with-param name="codes">adfklmor</xsl:with-param>
602 <xsl:with-param name="class">results_summary uniform_title</xsl:with-param>
603 <xsl:with-param name="label">Uniform title: </xsl:with-param>
604 </xsl:call-template>
605 </xsl:if>
607 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
608 <span class="results_summary uniform_title"><span class="label">Uniform titles: </span>
609 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
610 <xsl:for-each select="marc:subfield">
611 <xsl:if test="contains('adfghklmnoprst',@code)">
612 <xsl:value-of select="text()"/>
613 <xsl:text> </xsl:text>
614 </xsl:if>
615 </xsl:for-each>
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>
623 <!-- #13382 Added Related works 700$i -->
624 <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']]">
625 <span class="results_summary related_works"><span class="label">Related works: </span>
626 <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']]">
627 <xsl:variable name="str">
628 <xsl:call-template name="subfieldSelect">
629 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
630 </xsl:call-template>
631 </xsl:variable>
632 <xsl:call-template name="chopPunctuation">
633 <xsl:with-param name="chopString">
634 <xsl:value-of select="$str"/>
635 </xsl:with-param>
636 </xsl:call-template>
637 <!-- add relator code too between brackets-->
638 <xsl:if test="marc:subfield[@code='4' or @code='e']">
639 <span class="relatorcode">
640 <xsl:text> [</xsl:text>
641 <xsl:choose>
642 <xsl:when test="marc:subfield[@code='e']">
643 <xsl:for-each select="marc:subfield[@code='e']">
644 <xsl:value-of select="."/>
645 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
646 </xsl:for-each>
647 </xsl:when>
648 <xsl:otherwise>
649 <xsl:for-each select="marc:subfield[@code='4']">
650 <xsl:value-of select="."/>
651 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
652 </xsl:for-each>
653 </xsl:otherwise>
654 </xsl:choose>
655 <xsl:text>]</xsl:text>
656 </span>
657 </xsl:if>
658 <xsl:choose>
659 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
660 </xsl:choose>
661 </xsl:for-each>
662 </span>
663 </xsl:if>
665 <!-- #13382 Added Contained Works 7xx@ind2=2 -->
666 <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'])]">
667 <span class="results_summary contained_works"><span class="label">Contained works: </span>
668 <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'])]">
669 <xsl:variable name="str">
670 <xsl:call-template name="subfieldSelect">
671 <xsl:with-param name="codes">abcdfghiklmnporstux</xsl:with-param>
672 </xsl:call-template>
673 </xsl:variable>
674 <xsl:call-template name="chopPunctuation">
675 <xsl:with-param name="chopString">
676 <xsl:value-of select="$str"/>
677 </xsl:with-param>
678 </xsl:call-template>
679 <!-- add relator code too between brackets-->
680 <xsl:if test="marc:subfield[@code='4' or @code='e']">
681 <span class="relatorcode">
682 <xsl:text> [</xsl:text>
683 <xsl:choose>
684 <xsl:when test="marc:subfield[@code='e']">
685 <xsl:for-each select="marc:subfield[@code='e']">
686 <xsl:value-of select="."/>
687 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
688 </xsl:for-each>
689 </xsl:when>
690 <xsl:otherwise>
691 <xsl:for-each select="marc:subfield[@code='4']">
692 <xsl:value-of select="."/>
693 <xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
694 </xsl:for-each>
695 </xsl:otherwise>
696 </xsl:choose>
697 <xsl:text>]</xsl:text>
698 </span>
699 </xsl:if>
700 <xsl:choose>
701 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
702 </xsl:choose>
703 </xsl:for-each>
704 </span>
705 </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)]">
712 <xsl:choose>
713 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
714 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
715 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
716 </xsl:when>
717 <xsl:when test="$TraceSubjectSubdivisions='1'">
718 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelectSubject">
719 <xsl:with-param name="codes">abcdfgklmnopqrstvxyz</xsl:with-param>
720 <xsl:with-param name="delimeter"> AND </xsl:with-param>
721 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
722 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
723 <xsl:with-param name="urlencode">1</xsl:with-param>
724 </xsl:call-template>
725 </xsl:attribute>
726 </xsl:when>
728 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
729 <xsl:otherwise>
730 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="str:encode-uri(translate(marc:subfield[@code='a'],'()',''), true())"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
731 </xsl:otherwise>
732 </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>
745 <xsl:if test="marc:subfield[@code=9]">
746 <xsl:text> </xsl:text>
747 <a class='authlink'>
748 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
749 <xsl:element name="img">
750 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
751 <xsl:attribute name="alt"></xsl:attribute>
752 <xsl:attribute name="height">15</xsl:attribute>
753 <xsl:attribute name="width">15</xsl:attribute>
754 </xsl:element>
755 </a>
756 </xsl:if>
758 <xsl:choose>
759 <xsl:when test="position()=last()"></xsl:when>
760 <xsl:otherwise> | </xsl:otherwise>
761 </xsl:choose>
763 </xsl:for-each>
764 </span>
765 </xsl:if>
767 <!-- Genre/Form -->
768 <xsl:if test="marc:datafield[@tag=655]">
769 <span class="results_summary genre"><span class="label">Genre/Form: </span>
770 <xsl:for-each select="marc:datafield[@tag=655]">
772 <xsl:choose>
773 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
774 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
775 </xsl:when>
776 <xsl:when test="$TraceSubjectSubdivisions='1'">
777 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:call-template name="subfieldSelect">
778 <xsl:with-param name="codes">avxyz</xsl:with-param>
779 <xsl:with-param name="delimeter"> AND </xsl:with-param>
780 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
781 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
782 <xsl:with-param name="urlencode">1</xsl:with-param>
783 </xsl:call-template>
784 </xsl:attribute>
785 </xsl:when>
786 <xsl:otherwise>
787 <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>
788 </xsl:otherwise>
789 </xsl:choose>
790 <xsl:call-template name="subfieldSelect">
791 <xsl:with-param name="codes">avxyz</xsl:with-param>
792 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
793 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
794 </xsl:call-template>
795 </a>
797 <xsl:if test="marc:subfield[@code=9]">
798 <xsl:text> </xsl:text>
799 <a class='authlink'>
800 <xsl:attribute name="href">/cgi-bin/koha/authorities/detail.pl?authid=<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
801 <xsl:element name="img">
802 <xsl:attribute name="src">/intranet-tmpl/prog/img/filefind.png</xsl:attribute>
803 <xsl:attribute name="alt"></xsl:attribute>
804 <xsl:attribute name="height">15</xsl:attribute>
805 <xsl:attribute name="width">15</xsl:attribute>
806 </xsl:element>
807 </a>
808 </xsl:if>
809 <xsl:if test="position()!=last()"><span class="separator"> | </span></xsl:if>
810 </xsl:for-each>
811 </span>
812 </xsl:if>
814 <!-- MARC21 776 Additional Physical Form Entry -->
815 <xsl:if test="marc:datafield[@tag=776]">
816 <span class="results_summary add_physical_form">
817 <span class="label">Additional physical formats: </span>
818 <xsl:for-each select="marc:datafield[@tag=776]">
819 <xsl:variable name="linktext">
820 <xsl:choose>
821 <xsl:when test="marc:subfield[@code='t']">
822 <xsl:value-of select="marc:subfield[@code='t']"/>
823 </xsl:when>
824 <xsl:when test="marc:subfield[@code='a']">
825 <xsl:value-of select="marc:subfield[@code='a']"/>
826 </xsl:when>
827 <xsl:otherwise>
828 <xsl:text>No title</xsl:text>
829 </xsl:otherwise>
830 </xsl:choose>
831 </xsl:variable>
832 <xsl:if test="@ind2=8 and marc:subfield[@code='i']">
833 <xsl:call-template name="subfieldSelect">
834 <xsl:with-param name="codes">i</xsl:with-param>
835 </xsl:call-template>
836 <xsl:text>: </xsl:text>
837 </xsl:if>
838 <xsl:choose>
839 <xsl:when test="marc:subfield[@code='w']">
841 <xsl:attribute name="href">
842 <xsl:text>/cgi-bin/koha/catalogue/search.pl?q=control-number:</xsl:text>
843 <xsl:call-template name="extractControlNumber">
844 <xsl:with-param name="subfieldW">
845 <xsl:value-of select="marc:subfield[@code='w']"/>
846 </xsl:with-param>
847 </xsl:call-template>
848 </xsl:attribute>
849 <xsl:value-of select="$linktext"/>
850 </a>
851 </xsl:when>
852 <xsl:otherwise>
853 <xsl:value-of select="$linktext"/>
854 </xsl:otherwise>
855 </xsl:choose>
856 <xsl:if test="position() != last()">
857 <xsl:text>; </xsl:text>
858 </xsl:if>
859 </xsl:for-each>
860 </span>
861 </xsl:if>
863 <!-- DDC classification -->
864 <xsl:if test="marc:datafield[@tag=082]">
865 <span class="results_summary ddc">
866 <span class="label">DDC classification: </span>
867 <xsl:for-each select="marc:datafield[@tag=082]">
868 <xsl:call-template name="subfieldSelect">
869 <xsl:with-param name="codes">a</xsl:with-param>
870 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
871 </xsl:call-template>
872 <xsl:choose>
873 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
874 <xsl:otherwise> | </xsl:otherwise>
875 </xsl:choose>
876 </xsl:for-each>
877 </span>
878 </xsl:if>
880 <!-- Other classification -->
881 <xsl:if test="marc:datafield[@tag=084]">
882 <span class="results_summary oc">
883 <span class="label">Other classification: </span>
884 <xsl:for-each select="marc:datafield[@tag=084]">
885 <xsl:call-template name="subfieldSelect">
886 <xsl:with-param name="codes">a</xsl:with-param>
887 <xsl:with-param name="delimeter"><xsl:text> | </xsl:text></xsl:with-param>
888 </xsl:call-template>
889 <xsl:choose>
890 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
891 <xsl:otherwise> | </xsl:otherwise>
892 </xsl:choose>
893 </xsl:for-each>
894 </span>
895 </xsl:if>
897 <xsl:if test="marc:datafield[@tag=856]">
898 <span class="results_summary online_resources"><span class="label">Online resources: </span>
899 <xsl:for-each select="marc:datafield[@tag=856]">
900 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
902 <xsl:attribute name="href">
903 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
904 <xsl:choose>
905 <xsl:when test="@ind1=7">
906 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
907 </xsl:when>
908 <xsl:when test="@ind1=1">
909 <xsl:text>ftp://</xsl:text>
910 </xsl:when>
911 <xsl:otherwise>
912 <xsl:text>http://</xsl:text>
913 </xsl:otherwise>
914 </xsl:choose>
915 </xsl:if>
916 <xsl:value-of select="marc:subfield[@code='u']"/>
917 </xsl:attribute>
918 <xsl:choose>
919 <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')">
920 <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>
921 </xsl:when>
922 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
923 <xsl:call-template name="subfieldSelect">
924 <xsl:with-param name="codes">y3z</xsl:with-param>
925 </xsl:call-template>
926 </xsl:when>
927 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
928 <xsl:choose>
929 <xsl:when test="$URLLinkText!=''">
930 <xsl:value-of select="$URLLinkText"/>
931 </xsl:when>
932 <xsl:otherwise>
933 <xsl:text>Click here to access online</xsl:text>
934 </xsl:otherwise>
935 </xsl:choose>
936 </xsl:when>
937 </xsl:choose>
938 </a>
939 <xsl:choose>
940 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
941 <xsl:otherwise> | </xsl:otherwise>
942 </xsl:choose>
944 </xsl:for-each>
945 </span>
946 </xsl:if>
948 <xsl:if test="marc:datafield[@tag=505]">
949 <div class="results_summary contents">
950 <xsl:choose>
951 <xsl:when test="marc:datafield[@tag=505]/@ind1=0">
952 <span class="label">Contents:</span>
953 </xsl:when>
954 <xsl:when test="marc:datafield[@tag=505]/@ind1=1">
955 <span class="label">Incomplete contents:</span>
956 </xsl:when>
957 <xsl:when test="marc:datafield[@tag=505]/@ind1=2">
958 <span class="label">Partial contents:</span>
959 </xsl:when>
960 </xsl:choose>
961 <xsl:for-each select="marc:datafield[@tag=505]">
962 <div class='contentblock'>
963 <xsl:choose>
964 <xsl:when test="@ind2=0">
965 <xsl:call-template name="subfieldSelectSpan">
966 <xsl:with-param name="codes">tru</xsl:with-param>
967 </xsl:call-template>
968 </xsl:when>
969 <xsl:otherwise>
970 <xsl:call-template name="subfieldSelectSpan">
971 <xsl:with-param name="codes">atru</xsl:with-param>
972 </xsl:call-template>
973 </xsl:otherwise>
974 </xsl:choose>
975 </div>
976 </xsl:for-each>
977 </div>
978 </xsl:if>
980 <!-- 586 -->
981 <xsl:if test="marc:datafield[@tag=586]">
982 <span class="results_summary awardsnote">
983 <xsl:if test="marc:datafield[@tag=586]/@ind1=' '">
984 <span class="label">Awards: </span>
985 </xsl:if>
986 <xsl:for-each select="marc:datafield[@tag=586]">
987 <xsl:value-of select="marc:subfield[@code='a']"/>
988 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
989 </xsl:for-each>
990 </span>
991 </xsl:if>
993 <!-- 583 -->
994 <xsl:if test="marc:datafield[@tag=583]">
995 <xsl:for-each select="marc:datafield[@tag=583]">
996 <xsl:if test="@ind1=1 or @ind1=' '">
997 <span class="results_summary actionnote">
998 <span class="label">Action note: </span>
999 <xsl:choose>
1000 <xsl:when test="marc:subfield[@code='z']">
1001 <xsl:value-of select="marc:subfield[@code='z']"/>
1002 </xsl:when>
1003 <xsl:otherwise>
1004 <xsl:call-template name="subfieldSelect">
1005 <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
1006 </xsl:call-template>
1007 </xsl:otherwise>
1008 </xsl:choose>
1009 </span>
1010 </xsl:if>
1011 </xsl:for-each>
1012 </xsl:if>
1014 <!-- 508 -->
1015 <xsl:if test="marc:datafield[@tag=508]">
1016 <div class="results_summary prod_credits">
1017 <span class="label">Production credits: </span>
1018 <xsl:for-each select="marc:datafield[@tag=508]">
1019 <xsl:call-template name="subfieldSelectSpan">
1020 <xsl:with-param name="codes">a</xsl:with-param>
1021 </xsl:call-template>
1022 <xsl:if test="position()!=last()"><span class="separator"><xsl:text> | </xsl:text></span></xsl:if>
1023 </xsl:for-each>
1024 </div>
1025 </xsl:if>
1027 <!-- 773 -->
1028 <xsl:if test="marc:datafield[@tag=773]">
1029 <xsl:for-each select="marc:datafield[@tag=773]">
1030 <xsl:if test="@ind1 !=1">
1031 <span class="results_summary in"><span class="label">
1032 <xsl:choose>
1033 <xsl:when test="@ind2=' '">
1035 </xsl:when>
1036 <xsl:when test="@ind2=8">
1037 <xsl:if test="marc:subfield[@code='i']">
1038 <xsl:value-of select="marc:subfield[@code='i']"/>
1039 </xsl:if>
1040 </xsl:when>
1041 </xsl:choose>
1042 </span>
1043 <xsl:variable name="f773">
1044 <xsl:call-template name="chopPunctuation">
1045 <xsl:with-param name="chopString">
1046 <xsl:call-template name="subfieldSelect">
1047 <xsl:with-param name="codes">a_t</xsl:with-param>
1048 </xsl:call-template>
1049 </xsl:with-param>
1050 </xsl:call-template>
1051 </xsl:variable>
1052 <xsl:choose>
1053 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1054 <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>
1055 <xsl:value-of select="translate($f773, '()', '')"/>
1056 </a>
1057 </xsl:when>
1058 <xsl:when test="marc:subfield[@code='0']">
1059 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:subfield[@code='0'], true())"/></xsl:attribute>
1060 <xsl:value-of select="$f773"/>
1061 </a>
1062 </xsl:when>
1063 <xsl:otherwise>
1064 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f773, '()', ''), true())"/></xsl:attribute>
1065 <xsl:value-of select="$f773"/>
1066 </a>
1067 </xsl:otherwise>
1068 </xsl:choose>
1069 <xsl:if test="marc:subfield[@code='g']">
1070 <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/>
1071 </xsl:if>
1072 </span>
1074 <xsl:if test="marc:subfield[@code='n']">
1075 <span class="results_summary in_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1076 </xsl:if>
1078 </xsl:if>
1079 </xsl:for-each>
1080 </xsl:if>
1082 <xsl:if test="marc:datafield[@tag=502]">
1083 <span class="results_summary diss_note">
1084 <span class="label">Dissertation note: </span>
1085 <xsl:for-each select="marc:datafield[@tag=502]">
1086 <xsl:call-template name="subfieldSelect">
1087 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1088 </xsl:call-template>
1089 </xsl:for-each>
1090 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1091 </span>
1092 </xsl:if>
1094 <!-- 866 textual holdings -->
1095 <xsl:if test="marc:datafield[@tag=866]">
1096 <span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
1097 <xsl:for-each select="marc:datafield[@tag=866]">
1098 <span class="holdings_note_data">
1099 <xsl:call-template name="subfieldSelect">
1100 <xsl:with-param name="codes">axz</xsl:with-param>
1101 </xsl:call-template>
1102 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1103 </span>
1104 </xsl:for-each>
1105 </span>
1106 </xsl:if>
1108 <!-- 867 textual holdings -->
1109 <xsl:if test="marc:datafield[@tag=867]">
1110 <span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
1111 <xsl:for-each select="marc:datafield[@tag=867]">
1112 <span class="holdings_note_data">
1113 <xsl:call-template name="subfieldSelect">
1114 <xsl:with-param name="codes">axz</xsl:with-param>
1115 </xsl:call-template>
1116 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1117 </span>
1118 </xsl:for-each>
1119 </span>
1120 </xsl:if>
1122 <!-- 868 textual holdings -->
1123 <xsl:if test="marc:datafield[@tag=868]">
1124 <span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
1125 <xsl:for-each select="marc:datafield[@tag=868]">
1126 <span class="holdings_note_data">
1127 <xsl:call-template name="subfieldSelect">
1128 <xsl:with-param name="codes">axz</xsl:with-param>
1129 </xsl:call-template>
1130 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
1131 </span>
1132 </xsl:for-each>
1133 </span>
1134 </xsl:if>
1137 <!-- 775 Other Edition -->
1138 <xsl:if test="marc:datafield[@tag=775]">
1139 <span class="results_summary other_editions"><span class="label">Other editions: </span>
1140 <xsl:for-each select="marc:datafield[@tag=775]">
1141 <xsl:variable name="f775">
1142 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
1143 <xsl:with-param name="codes">a_t</xsl:with-param>
1144 </xsl:call-template></xsl:with-param></xsl:call-template>
1145 </xsl:variable>
1146 <xsl:if test="marc:subfield[@code='i']">
1147 <xsl:call-template name="subfieldSelect">
1148 <xsl:with-param name="codes">i</xsl:with-param>
1149 </xsl:call-template>
1150 <xsl:text>: </xsl:text>
1151 </xsl:if>
1153 <xsl:choose>
1154 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1155 <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>
1156 </xsl:when>
1157 <xsl:otherwise>
1158 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f775, '()', ''), true())"/></xsl:attribute>
1159 </xsl:otherwise>
1160 </xsl:choose>
1161 <xsl:call-template name="subfieldSelect">
1162 <xsl:with-param name="codes">a_t</xsl:with-param>
1163 </xsl:call-template>
1164 </a>
1165 <xsl:choose>
1166 <xsl:when test="position()=last()"></xsl:when>
1167 <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
1168 </xsl:choose>
1169 </xsl:for-each>
1170 </span>
1171 </xsl:if>
1173 <!-- 780 -->
1174 <xsl:if test="marc:datafield[@tag=780]">
1175 <xsl:for-each select="marc:datafield[@tag=780]">
1176 <xsl:if test="@ind1=0">
1177 <span class="results_summary preceeding_entry">
1178 <xsl:choose>
1179 <xsl:when test="@ind2=0">
1180 <span class="label">Continues:</span>
1181 </xsl:when>
1182 <xsl:when test="@ind2=1">
1183 <span class="label">Continues in part:</span>
1184 </xsl:when>
1185 <xsl:when test="@ind2=2">
1186 <span class="label">Supersedes:</span>
1187 </xsl:when>
1188 <xsl:when test="@ind2=3">
1189 <span class="label">Supersedes in part:</span>
1190 </xsl:when>
1191 <xsl:when test="@ind2=4">
1192 <span class="label">Formed by the union: ... and: ...</span>
1193 </xsl:when>
1194 <xsl:when test="@ind2=5">
1195 <span class="label">Absorbed:</span>
1196 </xsl:when>
1197 <xsl:when test="@ind2=6">
1198 <span class="label">Absorbed in part:</span>
1199 </xsl:when>
1200 <xsl:when test="@ind2=7">
1201 <span class="label">Separated from:</span>
1202 </xsl:when>
1203 </xsl:choose>
1204 <xsl:text> </xsl:text>
1205 <xsl:variable name="f780">
1206 <xsl:call-template name="subfieldSelect">
1207 <xsl:with-param name="codes">a_t</xsl:with-param>
1208 </xsl:call-template>
1209 </xsl:variable>
1210 <xsl:choose>
1211 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1212 <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>
1213 <xsl:value-of select="translate($f780, '()', '')"/>
1214 </a>
1215 </xsl:when>
1216 <xsl:otherwise>
1217 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f780, '()', ''), true())"/></xsl:attribute>
1218 <xsl:value-of select="translate($f780, '()', '')"/>
1219 </a>
1220 </xsl:otherwise>
1221 </xsl:choose>
1222 </span>
1224 <xsl:if test="marc:subfield[@code='n']">
1225 <span class="results_summary preceeding_entry_note"><xsl:value-of select="marc:subfield[@code='n']"/></span>
1226 </xsl:if>
1228 </xsl:if>
1229 </xsl:for-each>
1230 </xsl:if>
1232 <!-- 785 -->
1233 <xsl:if test="marc:datafield[@tag=785]">
1234 <xsl:for-each select="marc:datafield[@tag=785]">
1235 <span class="results_summary succeeding_entry">
1236 <xsl:choose>
1237 <xsl:when test="@ind2=0">
1238 <span class="label">Continued by:</span>
1239 </xsl:when>
1240 <xsl:when test="@ind2=1">
1241 <span class="label">Continued in part by:</span>
1242 </xsl:when>
1243 <xsl:when test="@ind2=2">
1244 <span class="label">Superseded by:</span>
1245 </xsl:when>
1246 <xsl:when test="@ind2=3">
1247 <span class="label">Superseded in part by:</span>
1248 </xsl:when>
1249 <xsl:when test="@ind2=4">
1250 <span class="label">Absorbed by:</span>
1251 </xsl:when>
1252 <xsl:when test="@ind2=5">
1253 <span class="label">Absorbed in part by:</span>
1254 </xsl:when>
1255 <xsl:when test="@ind2=6">
1256 <span class="label">Split into .. and ...:</span>
1257 </xsl:when>
1258 <xsl:when test="@ind2=7">
1259 <span class="label">Merged with ... to form ...</span>
1260 </xsl:when>
1261 <xsl:when test="@ind2=8">
1262 <span class="label">Changed back to:</span>
1263 </xsl:when>
1264 </xsl:choose>
1265 <xsl:text> </xsl:text>
1266 <xsl:variable name="f785">
1267 <xsl:call-template name="subfieldSelect">
1268 <xsl:with-param name="codes">a_t</xsl:with-param>
1269 </xsl:call-template>
1270 </xsl:variable>
1272 <xsl:choose>
1273 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
1274 <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>
1275 <xsl:value-of select="translate($f785, '()', '')"/>
1276 </a>
1277 </xsl:when>
1278 <xsl:otherwise>
1279 <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="str:encode-uri(translate($f785, '()', ''), true())"/></xsl:attribute>
1280 <xsl:value-of select="translate($f785, '()', '')"/>
1281 </a>
1282 </xsl:otherwise>
1283 </xsl:choose>
1285 </span>
1286 </xsl:for-each>
1287 </xsl:if>
1289 <xsl:if test="$OPACBaseURL!=''">
1290 <span class="results_summary succeeding_entry_note"><span class="label">OPAC view: </span>
1291 <a><xsl:attribute name="href"><xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="str:encode-uri(marc:datafield[@tag=999]/marc:subfield[@code='c'], true())"/></xsl:attribute><xsl:attribute name="target">_blank</xsl:attribute>Open in new window</a>.
1292 </span>
1293 </xsl:if>
1295 </xsl:template>
1297 <xsl:template name="nameABCQ">
1298 <xsl:call-template name="chopPunctuation">
1299 <xsl:with-param name="chopString">
1300 <xsl:call-template name="subfieldSelect">
1301 <xsl:with-param name="codes">abcq</xsl:with-param>
1302 </xsl:call-template>
1303 </xsl:with-param>
1304 <xsl:with-param name="punctuation">
1305 <xsl:text>:,;/ </xsl:text>
1306 </xsl:with-param>
1307 </xsl:call-template>
1308 </xsl:template>
1310 <xsl:template name="nameABCDN">
1311 <xsl:call-template name="chopPunctuation">
1312 <xsl:with-param name="chopString">
1313 <xsl:call-template name="subfieldSelect">
1314 <xsl:with-param name="codes">abcdn</xsl:with-param>
1315 </xsl:call-template>
1316 </xsl:with-param>
1317 <xsl:with-param name="punctuation">
1318 <xsl:text>:,;/ </xsl:text>
1319 </xsl:with-param>
1320 </xsl:call-template>
1321 </xsl:template>
1323 <xsl:template name="nameACDEQ">
1324 <xsl:call-template name="subfieldSelect">
1325 <xsl:with-param name="codes">acdeq</xsl:with-param>
1326 </xsl:call-template>
1327 </xsl:template>
1329 <xsl:template name="part">
1330 <xsl:variable name="partNumber">
1331 <xsl:call-template name="specialSubfieldSelect">
1332 <xsl:with-param name="axis">n</xsl:with-param>
1333 <xsl:with-param name="anyCodes">n</xsl:with-param>
1334 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1335 </xsl:call-template>
1336 </xsl:variable>
1337 <xsl:variable name="partName">
1338 <xsl:call-template name="specialSubfieldSelect">
1339 <xsl:with-param name="axis">p</xsl:with-param>
1340 <xsl:with-param name="anyCodes">p</xsl:with-param>
1341 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
1342 </xsl:call-template>
1343 </xsl:variable>
1344 <xsl:if test="string-length(normalize-space($partNumber))">
1345 <xsl:call-template name="chopPunctuation">
1346 <xsl:with-param name="chopString" select="$partNumber"/>
1347 </xsl:call-template>
1348 </xsl:if>
1349 <xsl:if test="string-length(normalize-space($partName))">
1350 <xsl:call-template name="chopPunctuation">
1351 <xsl:with-param name="chopString" select="$partName"/>
1352 </xsl:call-template>
1353 </xsl:if>
1354 </xsl:template>
1356 <xsl:template name="specialSubfieldSelect">
1357 <xsl:param name="anyCodes"/>
1358 <xsl:param name="axis"/>
1359 <xsl:param name="beforeCodes"/>
1360 <xsl:param name="afterCodes"/>
1361 <xsl:variable name="str">
1362 <xsl:for-each select="marc:subfield">
1363 <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])">
1364 <xsl:value-of select="text()"/>
1365 <xsl:text> </xsl:text>
1366 </xsl:if>
1367 </xsl:for-each>
1368 </xsl:variable>
1369 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1370 </xsl:template>
1372 <xsl:template name="showAuthor">
1373 <xsl:param name="authorfield"/>
1374 <xsl:param name="UseAuthoritiesForTracings"/>
1375 <xsl:if test="count($authorfield)&gt;0">
1376 <h5 class="author">
1377 <xsl:for-each select="$authorfield">
1378 <xsl:choose>
1379 <xsl:when test="position()&gt;1"/>
1380 <!-- #13383 -->
1381 <xsl:when test="@tag&lt;700">By: </xsl:when>
1382 <!--#13382 Changed Additional author to contributor -->
1383 <xsl:otherwise>Contributor(s): </xsl:otherwise>
1384 </xsl:choose>
1386 <xsl:choose>
1387 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
1388 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute>
1389 </xsl:when>
1390 <xsl:otherwise>
1391 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
1392 </xsl:otherwise>
1393 </xsl:choose>
1394 <xsl:choose>
1395 <xsl:when test="@tag=100 or @tag=110 or @tag=111">
1396 <!-- #13383 -->
1397 <xsl:call-template name="chopPunctuation">
1398 <xsl:with-param name="chopString">
1399 <xsl:call-template name="subfieldSelect">
1400 <xsl:with-param name="codes">
1401 <xsl:choose>
1402 <!-- #13383 include subfield e for field 111, Display only name portion in 1XX -->
1403 <xsl:when test="@tag=111">aeq</xsl:when>
1404 <xsl:when test="@tag=110">ab</xsl:when>
1405 <xsl:otherwise>abcjq</xsl:otherwise>
1406 </xsl:choose>
1407 </xsl:with-param>
1408 </xsl:call-template>
1409 </xsl:with-param>
1410 <xsl:with-param name="punctuation">
1411 <xsl:text>:,;/ </xsl:text>
1412 </xsl:with-param>
1413 </xsl:call-template>
1414 <!-- Display only name and title portion in 110 field -->
1415 <xsl:if test="@tag=110 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1416 <span class="titleportion">
1417 <xsl:choose>
1418 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1419 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1420 </xsl:choose>
1421 <xsl:call-template name="chopPunctuation">
1422 <xsl:with-param name="chopString">
1423 <xsl:call-template name="subfieldSelect">
1424 <xsl:with-param name="codes">cdnt</xsl:with-param>
1425 </xsl:call-template>
1426 </xsl:with-param>
1427 </xsl:call-template>
1428 </span>
1429 </xsl:if>
1430 <!-- Display only name and title portion in 111 field -->
1431 <xsl:if test="@tag=111 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1432 <span class="titleportion">
1433 <xsl:choose>
1434 <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>
1435 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1436 </xsl:choose>
1438 <xsl:call-template name="chopPunctuation">
1439 <xsl:with-param name="chopString">
1440 <xsl:call-template name="subfieldSelect">
1441 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1442 </xsl:call-template>
1443 </xsl:with-param>
1444 </xsl:call-template>
1445 </span>
1446 </xsl:if>
1447 <!-- Display only dates in 100 field -->
1448 <xsl:if test="@tag=100 and marc:subfield[@code='d']">
1449 <span class="authordates">
1450 <xsl:text>, </xsl:text>
1451 <xsl:call-template name="chopPunctuation">
1452 <xsl:with-param name="chopString">
1453 <xsl:call-template name="subfieldSelect">
1454 <xsl:with-param name="codes">d</xsl:with-param>
1455 </xsl:call-template>
1456 </xsl:with-param>
1457 </xsl:call-template>
1458 </span>
1459 </xsl:if>
1461 </xsl:when>
1462 <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works -->
1463 <!--#13382 Added all relevant subfields 4, e, and d are handled separately -->
1464 <xsl:when test="@tag=700 or @tag=710 or @tag=711">
1465 <!-- Includes major changes for 7XX fields; display name portion in 710 and 711 fields -->
1466 <xsl:if test="@tag=710 or @tag=711">
1467 <xsl:call-template name="chopPunctuation">
1468 <xsl:with-param name="chopString">
1469 <xsl:call-template name="subfieldSelect">
1470 <xsl:with-param name="codes">
1471 <xsl:choose>
1472 <xsl:when test="@tag=711">aeq</xsl:when>
1473 <xsl:otherwise>ab</xsl:otherwise>
1474 </xsl:choose>
1475 </xsl:with-param>
1476 </xsl:call-template>
1477 </xsl:with-param>
1478 <xsl:with-param name="punctuation">
1479 <xsl:text>:,;/ </xsl:text>
1480 </xsl:with-param>
1481 </xsl:call-template>
1482 <!-- Display only name and title portion in 711 field -->
1483 <xsl:if test="@tag=711 and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
1484 <span class="titleportion">
1485 <xsl:choose>
1486 <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>
1487 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1488 </xsl:choose>
1490 <xsl:call-template name="chopPunctuation">
1491 <xsl:with-param name="chopString">
1492 <xsl:call-template name="subfieldSelect">
1493 <xsl:with-param name="codes">cdgnt</xsl:with-param>
1494 </xsl:call-template>
1495 </xsl:with-param>
1496 </xsl:call-template>
1497 </span>
1498 </xsl:if>
1499 <!-- Display only name and title portion in 710 field -->
1500 <xsl:if test="@tag=710 and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
1501 <span class="titleportion">
1502 <xsl:choose>
1503 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
1504 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
1505 </xsl:choose>
1506 <xsl:call-template name="chopPunctuation">
1507 <xsl:with-param name="chopString">
1508 <xsl:call-template name="subfieldSelect">
1509 <xsl:with-param name="codes">cdnt</xsl:with-param>
1510 </xsl:call-template>
1511 </xsl:with-param>
1512 </xsl:call-template>
1513 </span>
1514 </xsl:if>
1516 </xsl:if>
1517 <!-- Display only name portion in 700 field -->
1518 <xsl:if test="@tag=700">
1519 <xsl:call-template name="chopPunctuation">
1520 <xsl:with-param name="chopString">
1521 <xsl:call-template name="subfieldSelect">
1522 <xsl:with-param name="codes">abcq</xsl:with-param>
1523 </xsl:call-template>
1524 </xsl:with-param>
1525 </xsl:call-template>
1526 </xsl:if>
1527 <!-- Display class "authordates" in 700 field -->
1528 <xsl:if test="@tag=700 and marc:subfield[@code='d']">
1529 <span class="authordates">
1530 <xsl:text>, </xsl:text>
1531 <xsl:call-template name="chopPunctuation">
1532 <xsl:with-param name="chopString">
1533 <xsl:call-template name="subfieldSelect">
1534 <xsl:with-param name="codes">d</xsl:with-param>
1535 </xsl:call-template>
1536 </xsl:with-param>
1537 </xsl:call-template>
1538 </span>
1539 </xsl:if>
1540 <!-- Display class "titleportion" in 700 field -->
1541 <xsl:variable name="titleportionfields" select="boolean(marc:subfield[@code='t' or @code='j' or @code='k' or @code='u'])"/>
1542 <xsl:if test="@tag=700 and $titleportionfields">
1543 <span class="titleportion">
1544 <xsl:text>. </xsl:text>
1545 <xsl:call-template name="chopPunctuation">
1546 <xsl:with-param name="chopString">
1547 <xsl:call-template name="subfieldSelect">
1548 <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param>
1549 </xsl:call-template>
1550 </xsl:with-param>
1551 </xsl:call-template>
1552 </span>
1553 </xsl:if>
1555 </xsl:when>
1556 </xsl:choose>
1558 <!-- add relator code too between brackets-->
1559 <!-- #13383 include relator code j for field 111 -->
1560 <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'])">
1561 <span class="relatorcode">
1562 <xsl:text> [</xsl:text>
1563 <xsl:choose>
1564 <xsl:when test="@tag=111 or @tag=711">
1565 <xsl:choose>
1566 <!-- Prefer j over 4 for fields 111 and 711-->
1567 <xsl:when test="marc:subfield[@code='j']">
1568 <xsl:for-each select="marc:subfield[@code='j']">
1569 <xsl:value-of select="."/>
1570 <xsl:if test="position() != last()">, </xsl:if>
1571 </xsl:for-each>
1572 </xsl:when>
1573 <xsl:otherwise>
1574 <xsl:for-each select="marc:subfield[@code=4]">
1575 <xsl:value-of select="."/>
1576 <xsl:if test="position() != last()">, </xsl:if>
1577 </xsl:for-each>
1578 </xsl:otherwise>
1579 </xsl:choose>
1580 </xsl:when>
1581 <!-- Prefer e over 4 for fields 111 and 711-->
1582 <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
1583 <xsl:for-each select="marc:subfield[@code='e']">
1584 <xsl:value-of select="."/>
1585 <xsl:if test="position() != last()">, </xsl:if>
1586 </xsl:for-each>
1587 </xsl:when>
1588 <xsl:otherwise>
1589 <xsl:for-each select="marc:subfield[@code=4]">
1590 <xsl:value-of select="."/>
1591 <xsl:if test="position() != last()">, </xsl:if>
1592 </xsl:for-each>
1593 </xsl:otherwise>
1594 </xsl:choose>
1595 <xsl:text>]</xsl:text>
1596 </span>
1597 </xsl:if>
1598 </a>
1599 <xsl:choose>
1600 <xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
1601 </xsl:choose>
1602 </xsl:for-each>
1603 </h5>
1605 </xsl:if>
1606 </xsl:template>
1608 <!-- #1807 Strip unwanted parenthesis from subjects for searching -->
1609 <xsl:template name="subfieldSelectSubject">
1610 <xsl:param name="codes"/>
1611 <xsl:param name="delimeter"><xsl:text> </xsl:text></xsl:param>
1612 <xsl:param name="subdivCodes"/>
1613 <xsl:param name="subdivDelimiter"/>
1614 <xsl:param name="prefix"/>
1615 <xsl:param name="suffix"/>
1616 <xsl:param name="urlencode"/>
1617 <xsl:variable name="str">
1618 <xsl:for-each select="marc:subfield">
1619 <xsl:if test="contains($codes, @code)">
1620 <xsl:if test="contains($subdivCodes, @code)">
1621 <xsl:value-of select="$subdivDelimiter"/>
1622 </xsl:if>
1623 <xsl:value-of select="$prefix"/><xsl:value-of select="translate(text(),'()','')"/><xsl:value-of select="$suffix"/><xsl:value-of select="$delimeter"/>
1624 </xsl:if>
1625 </xsl:for-each>
1626 </xsl:variable>
1627 <xsl:choose>
1628 <xsl:when test="$urlencode=1">
1629 <xsl:value-of select="str:encode-uri(substring($str,1,string-length($str)-string-length($delimeter)), true())"/>
1630 </xsl:when>
1631 <xsl:otherwise>
1632 <xsl:value-of select="substring($str,1,string-length($str)-string-length($delimeter))"/>
1633 </xsl:otherwise>
1634 </xsl:choose>
1635 </xsl:template>
1637 </xsl:stylesheet>