1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
4 <xsl:stylesheet version="1.0"
5 xmlns:marc="http://www.loc.gov/MARC21/slim"
6 xmlns:items="http://www.koha-community.org/items"
7 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 exclude-result-prefixes="marc items">
9 <xsl:import href="MARC21slimUtils.xsl"/>
10 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
11 <xsl:key name="item-by-status" match="items:item" use="items:status"/>
12 <xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
17 <xsl:template match="marc:record">
19 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
20 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
22 <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/>
23 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
24 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
25 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
26 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
27 <xsl:variable name="AlternateHoldingsField" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 1, 3)"/>
28 <xsl:variable name="AlternateHoldingsSubfields" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 4)"/>
29 <xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/>
30 <xsl:variable name="OPACItemLocation" select="marc:sysprefs/marc:syspref[@name='OPACItemLocation']"/>
31 <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/>
32 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
33 <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/>
34 <xsl:variable name="leader" select="marc:leader"/>
35 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
36 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
37 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
38 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
39 <xsl:variable name="isbn" select="marc:datafield[@tag=020]/marc:subfield[@code='a']"/>
40 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
41 <xsl:variable name="typeOf008">
43 <xsl:when test="$leader19='a'">ST</xsl:when>
44 <xsl:when test="$leader6='a'">
46 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
47 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">CR</xsl:when>
50 <xsl:when test="$leader6='t'">BK</xsl:when>
51 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
52 <xsl:when test="$leader6='m'">CF</xsl:when>
53 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
54 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
55 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
56 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
59 <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
60 <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
61 <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
62 <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
63 <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
64 <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
65 <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
66 <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
67 <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
69 <xsl:variable name="physicalDescription">
70 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
73 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
76 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
77 digitized other analog
80 <xsl:variable name="check008-23">
81 <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='CR' or $typeOf008='MX'">
82 <xsl:value-of select="true()"></xsl:value-of>
85 <xsl:variable name="check008-29">
86 <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
87 <xsl:value-of select="true()"></xsl:value-of>
91 <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
94 <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='CR') and ($controlField008-23=' ' or $controlField008='r'))">
97 <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
100 <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
103 <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
108 <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
109 <xsl:call-template name="chopBrackets">
110 <xsl:with-param name="chopString">
111 <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"></xsl:value-of>
115 <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
116 <xsl:call-template name="chopBrackets">
117 <xsl:with-param name="chopString">
118 <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"></xsl:value-of>
122 <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
123 <xsl:call-template name="chopBrackets">
124 <xsl:with-param name="chopString">
125 <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"></xsl:value-of>
129 <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
130 <xsl:call-template name="chopBrackets">
131 <xsl:with-param name="chopString">
132 <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"></xsl:value-of>
136 <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
137 <xsl:call-template name="chopBrackets">
138 <xsl:with-param name="chopString">
139 <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"></xsl:value-of>
143 <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
144 <xsl:call-template name="chopBrackets">
145 <xsl:with-param name="chopString">
146 <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"></xsl:value-of>
150 <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
151 <xsl:value-of select="."></xsl:value-of>
153 <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
155 <xsl:when test="substring(text(),14,1)='a'">
158 <xsl:when test="substring(text(),14,1)='p'">
161 <xsl:when test="substring(text(),14,1)='r'">
167 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
170 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
171 <img src="/opac-tmpl/lib/famfamfam/silk/cd.png" alt="computer optical disc cartridge" title="computer optical disc cartridge" class="format"/>
173 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
176 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
179 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
180 <img src="/opac-tmpl/lib/famfamfam/silk/cd.png" alt="optical disc" title="optical disc" class="format"/>
182 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
184 <img src="/opac-tmpl/lib/famfamfam/silk/drive_web.png" alt="remote" title="remote" class="format"/>
186 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
189 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
192 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
196 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
197 <img src="/opac-tmpl/lib/famfamfam/silk/world.png" alt="celestial globe" title="celestial globe" class="format"/>
199 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
200 <img src="/opac-tmpl/lib/famfamfam/silk/world.png" alt="earth moon globe" title="earth moon globe" class="format"/>
202 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
203 <img src="/opac-tmpl/lib/famfamfam/silk/world.png" alt="planetary or lunar globe" title="planetary or lunar globe" class="format"/>
205 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
206 <img src="/opac-tmpl/lib/famfamfam/silk/world.png" alt="terrestrial globe" title="terrestrial globe" class="format"/>
209 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
213 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
216 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
219 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
222 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
225 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
228 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
231 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
234 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
238 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
241 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
244 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
247 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
250 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
253 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
256 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
259 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
262 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
265 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
268 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
269 <img src="/opac-tmpl/lib/famfamfam/silk/chart_curve.png" alt="chart" title="chart" class="format"/>
271 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
274 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
275 <img src="/opac-tmpl/lib/famfamfam/silk/pencil.png" alt="drawing" title="drawing" class="format"/>
277 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
278 <img src="/opac-tmpl/lib/famfamfam/silk/note.png" alt="flash card" title="flash card" class="format"/>
280 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
281 <img src="/opac-tmpl/lib/famfamfam/silk/paintbrush.png" alt="painting" title="painting" class="format"/>
283 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
284 photomechanical print
286 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
289 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
292 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
293 <img src="/opac-tmpl/lib/famfamfam/silk/picture.png" alt="picture" title="picture" class="format"/>
295 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
298 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
301 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
302 <img src="/opac-tmpl/lib/famfamfam/silk/script.png" alt="notated music" title="notated music" class="format"/>
304 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
307 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
310 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
313 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
316 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
317 <img src="/opac-tmpl/lib/famfamfam/silk/pictures.png" alt="slide" title="slide" class="format"/>
319 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
322 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
325 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
328 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
331 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
334 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
337 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
338 <img src="/opac-tmpl/lib/famfamfam/silk/cd.png" alt="sound disc" title="sound disc" class="format"/>
340 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
343 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
346 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
349 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
352 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
355 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
358 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
359 tactile, with no writing system
361 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
364 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
365 <img src="/opac-tmpl/lib/famfamfam/silk/magnifier.png" alt="large print" title="large print" class="format"/>
367 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
370 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
371 text in looseleaf binder
373 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
376 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
379 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
380 <img src="/opac-tmpl/lib/famfamfam/silk/dvd.png" alt="videodisc" title="videodisc" class="format"/>
382 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
386 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
387 <xsl:value-of select="."></xsl:value-of>
389 <xsl:for-each select="marc:datafield[@tag=300]">
390 <xsl:call-template name="subfieldSelect">
391 <xsl:with-param name="codes">abce</xsl:with-param>
397 <!-- Title Statement: Alternate Graphic Representation (MARC 880) -->
398 <xsl:if test="$display880">
399 <xsl:call-template name="m880Select">
400 <xsl:with-param name="basetags">245</xsl:with-param>
401 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
402 <xsl:with-param name="bibno"><xsl:value-of select="$biblionumber"/></xsl:with-param>
407 <xsl:attribute name="href">
408 <xsl:call-template name="buildBiblioDefaultViewURL">
409 <xsl:with-param name="BiblioDefaultView">
410 <xsl:value-of select="$BiblioDefaultView"/>
413 <xsl:value-of select="$biblionumber"/>
415 <xsl:attribute name="class">title</xsl:attribute>
417 <xsl:if test="marc:datafield[@tag=245]">
418 <xsl:for-each select="marc:datafield[@tag=245]">
419 <xsl:call-template name="subfieldSelect">
420 <xsl:with-param name="codes">a</xsl:with-param>
422 <xsl:text> </xsl:text>
423 <!-- 13381 add additional subfields-->
424 <xsl:for-each select="marc:subfield[contains('bchknps', @code)]">
426 <xsl:when test="@code='h'">
427 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
428 <span class="title_medium"><xsl:apply-templates/> </span>
430 <xsl:when test="@code='c'">
431 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
432 <span class="title_resp_stmt"><xsl:apply-templates/> </span>
435 <xsl:apply-templates/>
436 <xsl:text> </xsl:text>
445 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
446 <xsl:if test="$display880">
447 <xsl:call-template name="m880Select">
448 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
449 <xsl:with-param name="codes">abc</xsl:with-param>
454 <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
456 by <span class="author">
458 <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700 or @tag=110 or @tag=710 or @tag=111 or @tag=711) and @ind1!='z']">
459 <xsl:if test="@tag=111 or @tag=711 and marc:subfield[@code='n']">
460 <xsl:text> </xsl:text>
461 <xsl:call-template name="subfieldSelect">
462 <xsl:with-param name="codes">n</xsl:with-param>
464 <xsl:text> </xsl:text>
466 <xsl:call-template name="chopPunctuation">
467 <xsl:with-param name="chopString">
468 <xsl:call-template name="subfieldSelect">
469 <xsl:with-param name="codes">
471 <!-- #13383 include subfield e for field 111 -->
472 <xsl:when test="@tag=111">abcdeqt</xsl:when>
473 <xsl:otherwise>abcdjqt</xsl:otherwise>
478 <xsl:with-param name="punctuation">
479 <xsl:text>:,;/ </xsl:text>
482 <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'][. != ''])">
483 <span class="relatorcode">
484 <xsl:text> [</xsl:text>
486 <xsl:when test="@tag=111">
488 <!-- Prefer j over 4 -->
489 <xsl:when test="marc:subfield[@code='j']">
490 <xsl:for-each select="marc:subfield[@code='j']">
491 <xsl:value-of select="."/>
492 <xsl:if test="position() != last()">, </xsl:if>
496 <xsl:for-each select="marc:subfield[@code=4]">
497 <xsl:value-of select="."/>
498 <xsl:if test="position() != last()">, </xsl:if>
503 <!-- Prefer e over 4 -->
504 <xsl:when test="marc:subfield[@code='e']">
505 <xsl:for-each select="marc:subfield[@code='e']">
506 <xsl:value-of select="."/>
507 <xsl:if test="position() != last()">, </xsl:if>
511 <xsl:for-each select="marc:subfield[@code=4]">
512 <xsl:value-of select="."/>
513 <xsl:if test="position() != last()">, </xsl:if>
517 <xsl:text>]</xsl:text>
521 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
530 <xsl:if test="marc:datafield[@tag=250]">
531 <span class="results_summary edition">
532 <span class="label">Edition: </span>
533 <xsl:for-each select="marc:datafield[@tag=250]">
534 <xsl:call-template name="subfieldSelect">
535 <xsl:with-param name="codes">ab</xsl:with-param>
541 <xsl:if test="marc:datafield[@tag=773]">
542 <xsl:for-each select="marc:datafield[@tag=773]">
543 <xsl:if test="marc:subfield[@code='t']">
544 <span class="results_summary source">
545 <span class="label">Source: </span>
546 <xsl:value-of select="marc:subfield[@code='t']"/>
552 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
553 <span class="results_summary type">
554 <xsl:if test="$typeOf008!=''">
555 <span class="results_material_type">
556 <span class="label">Material type: </span>
558 <xsl:when test="$leader19='a'"><img src="/opac-tmpl/lib/famfamfam/silk/book_link.png" alt="book" title="book" class="materialtype"/> Set</xsl:when>
559 <xsl:when test="$leader6='a'">
561 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'"><img src="/opac-tmpl/lib/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
562 <xsl:when test="$leader7='i' or $leader7='s'"><img src="/opac-tmpl/lib/famfamfam/silk/newspaper.png" alt="serial" title="serial" class="materialtype"/> Continuing resource</xsl:when>
563 <xsl:when test="$leader7='a' or $leader7='b'"><img src="/opac-tmpl/lib/famfamfam/silk/book_open.png" alt="article" title="article" class="materialtype"/> Article</xsl:when>
566 <xsl:when test="$leader6='t'"><img src="/opac-tmpl/lib/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
567 <xsl:when test="$leader6='o'"><img src="/opac-tmpl/lib/famfamfam/silk/report_disk.png" alt="kit" title="kit" class="materialtype"/> Kit</xsl:when>
568 <xsl:when test="$leader6='p'"><img src="/opac-tmpl/lib/famfamfam/silk/report_disk.png" alt="mixed materials" title="mixed materials" class="materialtype"/>Mixed materials</xsl:when>
569 <xsl:when test="$leader6='m'"><img src="/opac-tmpl/lib/famfamfam/silk/computer_link.png" alt="computer file" title="computer file" class="materialtype"/> Computer file</xsl:when>
570 <xsl:when test="$leader6='e' or $leader6='f'"><img src="/opac-tmpl/lib/famfamfam/silk/map.png" alt="map" title="map" class="materialtype"/> Map</xsl:when>
571 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'"><img src="/opac-tmpl/lib/famfamfam/silk/film.png" alt="visual material" title="visual material" class="materialtype"/> Visual material</xsl:when>
572 <xsl:when test="$leader6='c' or $leader6='d'"><img src="/opac-tmpl/lib/famfamfam/silk/music.png" alt="score" title="score" class="materialtype"/> Score</xsl:when>
573 <xsl:when test="$leader6='i'"><img src="/opac-tmpl/lib/famfamfam/silk/sound.png" alt="sound" title="sound" class="materialtype"/> Sound</xsl:when>
574 <xsl:when test="$leader6='j'"><img src="/opac-tmpl/lib/famfamfam/silk/sound.png" alt="music" title="music" class="materialtype"/> Music</xsl:when>
578 <xsl:if test="string-length(normalize-space($physicalDescription))">
579 <span class="results_format">
580 <span class="label">; Format: </span><xsl:copy-of select="$physicalDescription"></xsl:copy-of>
584 <xsl:if test="$controlField008-21 or $controlField008-22 or $controlField008-24 or $controlField008-26 or $controlField008-29 or $controlField008-34 or $controlField008-33 or $controlField008-30-31 or $controlField008-33">
586 <xsl:if test="$typeOf008='CR'">
587 <span class="results_typeofcontinuing">
588 <xsl:if test="$controlField008-21 and $controlField008-21 !='|' and $controlField008-21 !=' '">
589 <span class="label">; Type of continuing resource: </span>
592 <xsl:when test="$controlField008-21='d'">
593 <img src="/opac-tmpl/lib/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
595 <xsl:when test="$controlField008-21='l'">
598 <xsl:when test="$controlField008-21='m'">
601 <xsl:when test="$controlField008-21='n'">
604 <xsl:when test="$controlField008-21='p'">
607 <xsl:when test="$controlField008-21='w'">
608 <img src="/opac-tmpl/lib/famfamfam/silk/world_link.png" alt="web site" title="web site" class="format"/>
613 <xsl:if test="$typeOf008='BK' or $typeOf008='CR'">
614 <xsl:if test="contains($controlField008-24,'abcdefghijklmnopqrstvwxyz')">
615 <span class="results_natureofcontents">
616 <span class="label">; Nature of contents: </span>
618 <xsl:when test="contains($controlField008-24,'a')">
621 <xsl:when test="contains($controlField008-24,'b')">
623 <img src="/opac-tmpl/lib/famfamfam/silk/text_list_bullets.png" alt="bibliography" title="bibliography" class="natureofcontents"/>
625 <xsl:when test="contains($controlField008-24,'c')">
628 <xsl:when test="contains($controlField008-24,'d')">
631 <xsl:when test="contains($controlField008-24,'e')">
634 <xsl:when test="contains($controlField008-24,'f')">
637 <xsl:when test="contains($controlField008-24,'g')">
640 <xsl:when test="contains($controlField008-24,'i')">
643 <xsl:when test="contains($controlField008-24,'k')">
646 <xsl:when test="contains($controlField008-24,'l')">
649 <xsl:when test="contains($controlField008-24,'m')">
652 <xsl:when test="contains($controlField008-24,'n')">
655 <xsl:when test="contains($controlField008-24,'o')">
658 <xsl:when test="contains($controlField008-24,'p')">
661 <xsl:when test="contains($controlField008-24,'q')">
664 <xsl:when test="contains($controlField008-24,'r')">
667 <xsl:when test="contains($controlField008-24,'s')">
670 <xsl:when test="contains($controlField008-24,'t')">
671 <img src="/opac-tmpl/lib/famfamfam/silk/report.png" alt="technical report" title="technical report" class="natureofcontents"/>
673 <xsl:when test="contains($controlField008-24,'v')">
674 legal case and case notes
676 <xsl:when test="contains($controlField008-24,'w')">
679 <xsl:when test="contains($controlField008-24,'z')">
684 <xsl:when test="$controlField008-29='1'">
685 conference publication
691 <xsl:if test="$typeOf008='CF'">
692 <span class="results_typeofcomp">
693 <xsl:if test="$controlField008-26='a' or $controlField008-26='e' or $controlField008-26='f' or $controlField008-26='g'">
694 <span class="label">; Type of computer file: </span>
697 <xsl:when test="$controlField008-26='a'">
700 <xsl:when test="$controlField008-26='e'">
701 <img src="/opac-tmpl/lib/famfamfam/silk/database.png" alt="database" title="database" class="format"/>
703 <xsl:when test="$controlField008-26='f'">
704 <img src="/opac-tmpl/lib/famfamfam/silk/font.png" alt="font" title="font" class="format"/>
706 <xsl:when test="$controlField008-26='g'">
707 <img src="/opac-tmpl/lib/famfamfam/silk/controller.png" alt="game" title="game" class="format"/>
712 <xsl:if test="$typeOf008='BK'">
713 <span class="results_contents_literary">
714 <xsl:if test="(substring($controlField008,25,1)='j') or (substring($controlField008,25,1)='1') or ($controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d')">
715 <span class="label">; Nature of contents: </span>
717 <xsl:if test="substring($controlField008,25,1)='j'">
720 <xsl:if test="substring($controlField008,31,1)='1'">
723 <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
724 <img src="/opac-tmpl/lib/famfamfam/silk/user.png" alt="biography" title="biography" class="natureofcontents"/>
727 <xsl:if test="$controlField008-33 and $controlField008-33!='|' and $controlField008-33!='u' and $controlField008-33!=' '">
728 <span class="label">; Literary form: </span>
731 <xsl:when test="$controlField008-33='0'">
734 <xsl:when test="$controlField008-33='1'">
737 <xsl:when test="$controlField008-33='e'">
740 <xsl:when test="$controlField008-33='d'">
743 <xsl:when test="$controlField008-33='c'">
746 <xsl:when test="$controlField008-33='l'">
749 <xsl:when test="$controlField008-33='h'">
752 <xsl:when test="$controlField008-33='i'">
755 <xsl:when test="$controlField008-33='f'">
758 <xsl:when test="$controlField008-33='j'">
761 <xsl:when test="$controlField008-33='s'">
767 <xsl:if test="$typeOf008='MU' and $controlField008-30-31 and $controlField008-30-31!='||' and $controlField008-30-31!=' '">
768 <span class="results_literaryform">
769 <span class="label">; Literary form: </span> <!-- Literary text for sound recordings -->
770 <xsl:if test="contains($controlField008-30-31,'b')">
773 <xsl:if test="contains($controlField008-30-31,'c')">
774 conference publication
776 <xsl:if test="contains($controlField008-30-31,'d')">
779 <xsl:if test="contains($controlField008-30-31,'e')">
782 <xsl:if test="contains($controlField008-30-31,'f')">
785 <xsl:if test="contains($controlField008-30-31,'o')">
788 <xsl:if test="contains($controlField008-30-31,'h')">
791 <xsl:if test="contains($controlField008-30-31,'k')">
794 <xsl:if test="contains($controlField008-30-31,'m')">
797 <xsl:if test="contains($controlField008-30-31,'p')">
800 <xsl:if test="contains($controlField008-30-31,'r')">
803 <xsl:if test="contains($controlField008-30-31,'g')">
806 <xsl:if test="contains($controlField008-30-31,'s')">
809 <xsl:if test="contains($controlField008-30-31,'l')">
814 <xsl:if test="$typeOf008='VM'">
815 <span class="results_typeofvisual">
816 <span class="label">; Type of visual material: </span>
818 <xsl:when test="$controlField008-33='a'">
821 <xsl:when test="$controlField008-33='b'">
824 <xsl:when test="$controlField008-33='c'">
827 <xsl:when test="$controlField008-33='d'">
830 <xsl:when test="$controlField008-33='f'">
833 <xsl:when test="$controlField008-33='g'">
836 <xsl:when test="$controlField008-33='i'">
839 <xsl:when test="$controlField008-33='k'">
842 <xsl:when test="$controlField008-33='l'">
845 <xsl:when test="$controlField008-33='m'">
848 <xsl:when test="$controlField008-33='n'">
851 <xsl:when test="$controlField008-33='o'">
854 <xsl:when test="$controlField008-33='p'">
857 <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
860 <xsl:when test="$controlField008-33='r'">
863 <xsl:when test="$controlField008-33='s'">
866 <xsl:when test="$controlField008-33='t'">
869 <xsl:when test="$controlField008-33='v'">
872 <xsl:when test="$controlField008-33='w'">
880 <xsl:if test="($typeOf008='BK' or $typeOf008='CF' or $typeOf008='MU' or $typeOf008='VM') and ($controlField008-22='a' or $controlField008-22='b' or $controlField008-22='c' or $controlField008-22='d' or $controlField008-22='e' or $controlField008-22='g' or $controlField008-22='j' or $controlField008-22='f')">
881 <span class="results_audience">
882 <span class="label">; Audience: </span>
884 <xsl:when test="$controlField008-22='a'">
887 <xsl:when test="$controlField008-22='b'">
890 <xsl:when test="$controlField008-22='c'">
893 <xsl:when test="$controlField008-22='d'">
896 <xsl:when test="$controlField008-22='e'">
899 <xsl:when test="$controlField008-22='g'">
902 <xsl:when test="$controlField008-22='j'">
905 <xsl:when test="$controlField008-22='f'">
911 <xsl:text> </xsl:text> <!-- added blank space to fix font display problem, see Bug 3671 -->
915 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
916 <xsl:if test="$display880">
917 <xsl:call-template name="m880Select">
918 <xsl:with-param name="basetags">260</xsl:with-param>
919 <xsl:with-param name="codes">abcg</xsl:with-param>
920 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
921 <xsl:with-param name="label">Publisher: </xsl:with-param>
925 <!-- Publisher info and RDA related info from tags 260, 264 -->
927 <xsl:when test="marc:datafield[@tag=264]">
928 <xsl:call-template name="showRDAtag264"/>
930 <xsl:when test="marc:datafield[@tag=260]">
931 <span class="results_summary publisher"><span class="label">Publisher: </span>
932 <xsl:for-each select="marc:datafield[@tag=260]">
933 <xsl:if test="marc:subfield[@code='a']">
934 <xsl:call-template name="subfieldSelect">
935 <xsl:with-param name="codes">a</xsl:with-param>
938 <xsl:text> </xsl:text>
939 <xsl:if test="marc:subfield[@code='b']">
940 <xsl:call-template name="subfieldSelect">
941 <xsl:with-param name="codes">b</xsl:with-param>
944 <xsl:text> </xsl:text>
945 <xsl:call-template name="chopPunctuation">
946 <xsl:with-param name="chopString">
947 <xsl:call-template name="subfieldSelect">
948 <xsl:with-param name="codes">cg</xsl:with-param>
952 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
954 <xsl:if test="marc:datafield[@tag=264]">
955 <xsl:text>; </xsl:text>
956 <xsl:call-template name="showRDAtag264"/>
962 <!-- Dissertation note -->
963 <xsl:if test="marc:datafield[@tag=502]">
964 <span class="results_summary diss_note">
965 <span class="label">Dissertation note: </span>
966 <xsl:for-each select="marc:datafield[@tag=502]">
967 <xsl:call-template name="subfieldSelect">
968 <xsl:with-param name="codes">abcdgo</xsl:with-param>
971 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
975 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
976 <xsl:if test="$display880">
977 <xsl:call-template name="m880Select">
978 <xsl:with-param name="basetags">246</xsl:with-param>
979 <xsl:with-param name="codes">ab</xsl:with-param>
980 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
981 <xsl:with-param name="label">Other title: </xsl:with-param>
985 <xsl:if test="marc:datafield[@tag=246]">
986 <span class="results_summary other_title">
987 <span class="label">Other title: </span>
988 <xsl:for-each select="marc:datafield[@tag=246]">
989 <xsl:call-template name="subfieldSelect">
990 <xsl:with-param name="codes">ab</xsl:with-param>
992 <!-- #13386 added separator | -->
993 <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>
997 <xsl:if test="marc:datafield[@tag=242]">
998 <span class="results_summary translated_title">
999 <span class="label">Title translated: </span>
1000 <xsl:for-each select="marc:datafield[@tag=242]">
1001 <xsl:call-template name="subfieldSelect">
1002 <xsl:with-param name="codes">abh</xsl:with-param>
1003 </xsl:call-template>
1004 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1008 <xsl:if test="marc:datafield[@tag=856]">
1009 <span class="results_summary online_resources">
1010 <span class="label">Online access: </span>
1011 <xsl:for-each select="marc:datafield[@tag=856]">
1012 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
1013 <xsl:if test="$OPACURLOpenInNewWindow='0'">
1016 <xsl:when test="$OPACTrackClicks='track'">
1017 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1019 <xsl:when test="$OPACTrackClicks='anonymous'">
1020 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1023 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
1027 <xsl:when test="($Show856uAsImage='Results' 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')">
1028 <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="style">height:100px;</xsl:attribute></xsl:element><xsl:text></xsl:text>
1030 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1031 <xsl:call-template name="subfieldSelect">
1032 <xsl:with-param name="codes">y3z</xsl:with-param>
1033 </xsl:call-template>
1035 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
1037 <xsl:when test="$URLLinkText!=''">
1038 <xsl:value-of select="$URLLinkText"/>
1041 <xsl:text>Click here to access online</xsl:text>
1048 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1051 <xsl:when test="$OPACTrackClicks='track'">
1052 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1054 <xsl:when test="$OPACTrackClicks='anonymous'">
1055 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1058 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
1062 <xsl:when test="($Show856uAsImage='Results' or $Show856uAsImage='Both') and ($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')">
1063 <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="style">height:100px</xsl:attribute></xsl:element><xsl:text></xsl:text>
1065 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1066 <xsl:call-template name="subfieldSelect">
1067 <xsl:with-param name="codes">y3z</xsl:with-param>
1068 </xsl:call-template>
1070 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
1072 <xsl:when test="$URLLinkText!=''">
1073 <xsl:value-of select="$URLLinkText"/>
1076 <xsl:text>Click here to access online</xsl:text>
1084 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1085 <xsl:otherwise> | </xsl:otherwise>
1090 <span class="results_summary availability">
1091 <span class="label">Availability: </span>
1093 <xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0">
1095 <xsl:when test="string-length($AlternateHoldingsField)=3 and marc:datafield[@tag=$AlternateHoldingsField]">
1096 <xsl:variable name="AlternateHoldingsCount" select="count(marc:datafield[@tag=$AlternateHoldingsField])"/>
1097 <xsl:for-each select="marc:datafield[@tag=$AlternateHoldingsField][1]">
1098 <xsl:call-template name="subfieldSelect">
1099 <xsl:with-param name="codes"><xsl:value-of select="$AlternateHoldingsSubfields"/></xsl:with-param>
1100 <xsl:with-param name="delimeter"><xsl:value-of select="$AlternateHoldingsSeparator"/></xsl:with-param>
1101 </xsl:call-template>
1103 (<xsl:value-of select="$AlternateHoldingsCount"/>)
1105 <xsl:otherwise>No items available </xsl:otherwise>
1108 <xsl:when test="count(key('item-by-status', 'available'))>0">
1109 <span class="available">
1110 <b><xsl:text>Items available for loan: </xsl:text></b>
1111 <xsl:variable name="available_items"
1112 select="key('item-by-status', 'available')"/>
1114 <xsl:when test="$singleBranchMode=1">
1115 <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1116 <span class="ItemSummary">
1117 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
1118 <xsl:text> (</xsl:text>
1119 <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
1120 <xsl:text>)</xsl:text>
1122 <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when>
1123 <xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise>
1129 <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1130 <span class="ItemSummary">
1131 <xsl:value-of select="items:homebranch"/>
1132 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
1133 <xsl:text> (</xsl:text>
1134 <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
1135 <xsl:text>)</xsl:text>
1137 <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when>
1138 <xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise>
1150 <xsl:when test="count(key('item-by-status', 'reference'))>0">
1151 <span class="available">
1152 <b><xsl:text>Items available for reference: </xsl:text></b>
1153 <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1154 <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1155 <span class="ItemSummary">
1156 <xsl:if test="$singleBranchMode=0">
1157 <xsl:value-of select="items:homebranch"/>
1159 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<span class="LabelCallNumber">Call number: </span><xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
1160 <xsl:text> (</xsl:text>
1161 <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
1162 <xsl:text>)</xsl:text>
1163 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1170 <xsl:choose> <xsl:when test="count(key('item-by-status', 'available'))>0">
1171 <xsl:choose><xsl:when test="count(key('item-by-status', 'reference'))>0">
1173 </xsl:when></xsl:choose>
1174 </xsl:when> </xsl:choose>
1176 <xsl:if test="count(key('item-by-status', 'Checked out'))>0">
1177 <span class="unavailable">
1178 <xsl:text>Checked out (</xsl:text>
1179 <xsl:value-of select="count(key('item-by-status', 'Checked out'))"/>
1180 <xsl:text>). </xsl:text>
1183 <xsl:if test="count(key('item-by-status', 'Withdrawn'))>0">
1184 <span class="unavailable">
1185 <xsl:text>Withdrawn (</xsl:text>
1186 <xsl:value-of select="count(key('item-by-status', 'Withdrawn'))"/>
1187 <xsl:text>). </xsl:text> </span>
1189 <xsl:if test="$hidelostitems='0' and count(key('item-by-status', 'Lost'))>0">
1190 <span class="unavailable">
1191 <xsl:text>Lost (</xsl:text>
1192 <xsl:value-of select="count(key('item-by-status', 'Lost'))"/>
1193 <xsl:text>). </xsl:text> </span>
1195 <xsl:if test="count(key('item-by-status', 'Damaged'))>0">
1196 <span class="unavailable">
1197 <xsl:text>Damaged (</xsl:text>
1198 <xsl:value-of select="count(key('item-by-status', 'Damaged'))"/>
1199 <xsl:text>). </xsl:text> </span>
1201 <xsl:if test="count(key('item-by-status', 'On order'))>0">
1202 <span class="unavailable">
1203 <xsl:text>On order (</xsl:text>
1204 <xsl:value-of select="count(key('item-by-status', 'On order'))"/>
1205 <xsl:text>). </xsl:text> </span>
1207 <xsl:if test="count(key('item-by-status', 'In transit'))>0">
1208 <span class="unavailable">
1209 <xsl:text>In transit (</xsl:text>
1210 <xsl:value-of select="count(key('item-by-status', 'In transit'))"/>
1211 <xsl:text>). </xsl:text> </span>
1213 <xsl:if test="count(key('item-by-status', 'Waiting'))>0">
1214 <span class="unavailable">
1215 <xsl:text>On hold (</xsl:text>
1216 <xsl:value-of select="count(key('item-by-status', 'Waiting'))"/>
1217 <xsl:text>). </xsl:text> </span>
1221 <xsl:when test="($OPACItemLocation='location' or $OPACItemLocation='ccode') and (count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0)">
1222 <span class="results_summary location">
1223 <span class="label">Location(s): </span>
1225 <xsl:when test="count(key('item-by-status', 'available'))>0">
1226 <span class="available">
1227 <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
1228 <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1230 <xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when>
1231 <xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when>
1233 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if>
1234 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1238 <xsl:when test="count(key('item-by-status', 'reference'))>0">
1239 <span class="available">
1240 <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1241 <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
1243 <xsl:when test="$OPACItemLocation='location'"><b><xsl:value-of select="concat(items:location,' ')"/></b></xsl:when>
1244 <xsl:when test="$OPACItemLocation='ccode'"><b><xsl:value-of select="concat(items:ccode,' ')"/></b></xsl:when>
1246 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> <xsl:value-of select="items:itemcallnumber"/></xsl:if>
1247 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1257 <xsl:template name="nameABCQ">
1258 <xsl:call-template name="chopPunctuation">
1259 <xsl:with-param name="chopString">
1260 <xsl:call-template name="subfieldSelect">
1261 <xsl:with-param name="codes">abcq</xsl:with-param>
1262 </xsl:call-template>
1264 <xsl:with-param name="punctuation">
1265 <xsl:text>:,;/ </xsl:text>
1267 </xsl:call-template>
1270 <xsl:template name="nameABCDN">
1271 <xsl:call-template name="chopPunctuation">
1272 <xsl:with-param name="chopString">
1273 <xsl:call-template name="subfieldSelect">
1274 <xsl:with-param name="codes">abcdn</xsl:with-param>
1275 </xsl:call-template>
1277 <xsl:with-param name="punctuation">
1278 <xsl:text>:,;/ </xsl:text>
1280 </xsl:call-template>
1283 <xsl:template name="nameACDEQ">
1284 <xsl:call-template name="subfieldSelect">
1285 <xsl:with-param name="codes">acdeq</xsl:with-param>
1286 </xsl:call-template>
1289 <xsl:template name="nameDate">
1290 <xsl:for-each select="marc:subfield[@code='d']">
1291 <xsl:call-template name="chopPunctuation">
1292 <xsl:with-param name="chopString" select="."/>
1293 </xsl:call-template>
1297 <xsl:template name="role">
1298 <xsl:for-each select="marc:subfield[@code='e']">
1299 <xsl:value-of select="."/>
1301 <xsl:for-each select="marc:subfield[@code='4']">
1302 <xsl:value-of select="."/>
1306 <xsl:template name="specialSubfieldSelect">
1307 <xsl:param name="anyCodes"/>
1308 <xsl:param name="axis"/>
1309 <xsl:param name="beforeCodes"/>
1310 <xsl:param name="afterCodes"/>
1311 <xsl:variable name="str">
1312 <xsl:for-each select="marc:subfield">
1313 <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])">
1314 <xsl:value-of select="text()"/>
1315 <xsl:text> </xsl:text>
1319 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1322 <xsl:template name="subtitle">
1323 <xsl:if test="marc:subfield[@code='b']">
1324 <xsl:call-template name="chopPunctuation">
1325 <xsl:with-param name="chopString">
1326 <xsl:value-of select="marc:subfield[@code='b']"/>
1328 <!--<xsl:call-template name="subfieldSelect">
1329 <xsl:with-param name="codes">b</xsl:with-param>
1330 </xsl:call-template>-->
1332 </xsl:call-template>
1336 <xsl:template name="chopBrackets">
1337 <xsl:param name="chopString"></xsl:param>
1338 <xsl:variable name="string">
1339 <xsl:call-template name="chopPunctuation">
1340 <xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
1341 </xsl:call-template>
1343 <xsl:if test="substring($string, 1,1)='['">
1344 <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
1346 <xsl:if test="substring($string, 1,1)!='['">
1347 <xsl:value-of select="$string"></xsl:value-of>