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 xmlns:str="http://exslt.org/strings"
9 exclude-result-prefixes="marc items str">
10 <xsl:import href="MARC21slimUtils.xsl"/>
11 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
12 <xsl:key name="item-by-status" match="items:item" use="items:status"/>
13 <xsl:key name="item-by-status-and-branch-home" match="items:item" use="concat(items:status, ' ', items:homebranch)"/>
14 <xsl:key name="item-by-status-and-branch-holding" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/>
15 <xsl:key name="item-by-substatus-and-branch" match="items:item" use="concat(items:substatus, ' ', items:homebranch)"/>
17 <xsl:template match="/">
18 <xsl:apply-templates/>
20 <xsl:template match="marc:record">
22 <!-- Option: Display Alternate Graphic Representation (MARC 880) -->
23 <xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
25 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
26 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
27 <xsl:variable name="OPACResultsLibrary" select="marc:sysprefs/marc:syspref[@name='OPACResultsLibrary']"/>
28 <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/>
29 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
30 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
31 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
32 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
33 <xsl:variable name="AlternateHoldingsField" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 1, 3)"/>
34 <xsl:variable name="AlternateHoldingsSubfields" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 4)"/>
35 <xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/>
36 <xsl:variable name="OPACItemLocation" select="marc:sysprefs/marc:syspref[@name='OPACItemLocation']"/>
37 <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/>
38 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
39 <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/>
40 <xsl:variable name="leader" select="marc:leader"/>
41 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
42 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
43 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
44 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
45 <xsl:variable name="isbn" select="marc:datafield[@tag=020]/marc:subfield[@code='a']"/>
46 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
47 <xsl:variable name="typeOf008">
49 <xsl:when test="$leader19='a'">ST</xsl:when>
50 <xsl:when test="$leader6='a'">
52 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
53 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">CR</xsl:when>
56 <xsl:when test="$leader6='t'">BK</xsl:when>
57 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
58 <xsl:when test="$leader6='m'">CF</xsl:when>
59 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
60 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
61 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
62 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
65 <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
66 <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
67 <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
68 <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
69 <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
70 <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
71 <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
72 <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
73 <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
75 <xsl:variable name="physicalDescription">
76 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
79 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
82 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
83 digitized other analog
86 <xsl:variable name="check008-23">
87 <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='CR' or $typeOf008='MX'">
88 <xsl:value-of select="true()"></xsl:value-of>
91 <xsl:variable name="check008-29">
92 <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
93 <xsl:value-of select="true()"></xsl:value-of>
97 <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
100 <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='CR') and ($controlField008-23=' ' or $controlField008='r'))">
103 <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
106 <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
109 <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
112 <xsl:when test="($controlField008-23='d' and ($typeOf008='BK' or $typeOf008='CR'))">
117 <xsl:if test="marc:datafield[@tag=130]/marc:subfield[@code='h']">
118 <xsl:call-template name="chopBrackets">
119 <xsl:with-param name="chopString">
120 <xsl:value-of select="marc:datafield[@tag=130]/marc:subfield[@code='h']"></xsl:value-of>
124 <xsl:if test="marc:datafield[@tag=240]/marc:subfield[@code='h']">
125 <xsl:call-template name="chopBrackets">
126 <xsl:with-param name="chopString">
127 <xsl:value-of select="marc:datafield[@tag=240]/marc:subfield[@code='h']"></xsl:value-of>
131 <xsl:if test="marc:datafield[@tag=242]/marc:subfield[@code='h']">
132 <xsl:call-template name="chopBrackets">
133 <xsl:with-param name="chopString">
134 <xsl:value-of select="marc:datafield[@tag=242]/marc:subfield[@code='h']"></xsl:value-of>
138 <xsl:if test="marc:datafield[@tag=245]/marc:subfield[@code='h']">
139 <xsl:call-template name="chopBrackets">
140 <xsl:with-param name="chopString">
141 <xsl:value-of select="marc:datafield[@tag=245]/marc:subfield[@code='h']"></xsl:value-of>
145 <xsl:if test="marc:datafield[@tag=246]/marc:subfield[@code='h']">
146 <xsl:call-template name="chopBrackets">
147 <xsl:with-param name="chopString">
148 <xsl:value-of select="marc:datafield[@tag=246]/marc:subfield[@code='h']"></xsl:value-of>
152 <xsl:if test="marc:datafield[@tag=730]/marc:subfield[@code='h']">
153 <xsl:call-template name="chopBrackets">
154 <xsl:with-param name="chopString">
155 <xsl:value-of select="marc:datafield[@tag=730]/marc:subfield[@code='h']"></xsl:value-of>
159 <xsl:for-each select="marc:datafield[@tag=256]/marc:subfield[@code='a']">
160 <xsl:value-of select="."></xsl:value-of>
162 <xsl:for-each select="marc:controlfield[@tag=007][substring(text(),1,1)='c']">
164 <xsl:when test="substring(text(),14,1)='a'">
167 <xsl:when test="substring(text(),14,1)='p'">
170 <xsl:when test="substring(text(),14,1)='r'">
176 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
179 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='c']">
180 <img src="/opac-tmpl/lib/famfamfam/cd.png" alt="computer optical disc cartridge" class="format"/>
182 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
185 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
188 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='o']">
189 <img src="/opac-tmpl/lib/famfamfam/cd.png" alt="optical disc" class="format"/>
191 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
193 <img src="/opac-tmpl/lib/famfamfam/drive_web.png" alt="remote" class="format"/>
195 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
198 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
201 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
205 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='a']">
206 <img src="/opac-tmpl/lib/famfamfam/world.png" alt="celestial globe" class="format"/>
208 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='e']">
209 <img src="/opac-tmpl/lib/famfamfam/world.png" alt="earth moon globe" class="format"/>
211 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='b']">
212 <img src="/opac-tmpl/lib/famfamfam/world.png" alt="planetary or lunar globe" class="format"/>
214 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='d'][substring(text(),2,1)='c']">
215 <img src="/opac-tmpl/lib/famfamfam/world.png" alt="terrestrial globe" class="format"/>
218 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
222 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
225 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
228 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
231 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
234 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
237 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
240 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
243 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
247 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
250 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
253 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
256 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
259 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
262 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
265 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
268 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
271 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
274 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
277 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='n']">
278 <img src="/opac-tmpl/lib/famfamfam/chart_curve.png" alt="chart" class="format"/>
280 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
283 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='d']">
284 <img src="/opac-tmpl/lib/famfamfam/pencil.png" alt="drawing" class="format"/>
286 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='o']">
287 <img src="/opac-tmpl/lib/famfamfam/note.png" alt="flash card" class="format"/>
289 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='e']">
290 <img src="/opac-tmpl/lib/famfamfam/paintbrush.png" alt="painting" class="format"/>
292 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
293 photomechanical print
295 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
298 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
301 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='i']">
302 <img src="/opac-tmpl/lib/famfamfam/picture.png" alt="picture" class="format"/>
304 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
307 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
310 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='q'][substring(text(),2,1)='q']">
311 <img src="/opac-tmpl/lib/famfamfam/script.png" alt="notated music" class="format"/>
313 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
316 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
319 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
322 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
325 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='s']">
326 <img src="/opac-tmpl/lib/famfamfam/pictures.png" alt="slide" class="format"/>
328 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
331 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
334 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
337 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
340 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
343 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
346 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='d']">
347 <img src="/opac-tmpl/lib/famfamfam/cd.png" alt="sound disc" class="format"/>
349 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
352 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
355 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
358 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
361 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
364 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
367 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
368 tactile, with no writing system
370 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
373 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='b']">
374 <img src="/opac-tmpl/lib/famfamfam/magnifier.png" alt="large print" class="format"/>
376 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
379 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
380 text in looseleaf binder
382 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
385 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
388 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='d']">
389 <img src="/opac-tmpl/lib/famfamfam/dvd.png" alt="videodisc" class="format"/>
391 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
395 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
396 <xsl:value-of select="."></xsl:value-of>
398 <xsl:for-each select="marc:datafield[@tag=300]">
399 <xsl:call-template name="subfieldSelect">
400 <xsl:with-param name="codes">abce</xsl:with-param>
406 <!-- Title Statement: Alternate Graphic Representation (MARC 880) -->
407 <xsl:if test="$display880">
408 <xsl:call-template name="m880Select">
409 <xsl:with-param name="basetags">245</xsl:with-param>
410 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
411 <xsl:with-param name="bibno"><xsl:value-of select="$biblionumber"/></xsl:with-param>
416 <xsl:attribute name="href">
417 <xsl:call-template name="buildBiblioDefaultViewURL">
418 <xsl:with-param name="BiblioDefaultView">
419 <xsl:value-of select="$BiblioDefaultView"/>
422 <xsl:value-of select="str:encode-uri($biblionumber, true())"/>
424 <xsl:attribute name="class"><xsl:value-of select="'title'" /></xsl:attribute>
426 <xsl:if test="marc:datafield[@tag=245]">
427 <xsl:for-each select="marc:datafield[@tag=245]">
428 <xsl:call-template name="subfieldSelect">
429 <xsl:with-param name="codes">a</xsl:with-param>
431 <xsl:text> </xsl:text>
432 <!-- 13381 add additional subfields-->
433 <!-- bz 17625 adding subfields f and g -->
434 <xsl:for-each select="marc:subfield[contains('bcfghknps', @code)]">
436 <xsl:when test="@code='h'">
437 <!-- 13381 Span class around subfield h so it can be suppressed via css -->
438 <span class="title_medium"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
440 <xsl:when test="@code='c'">
441 <!-- 13381 Span class around subfield c so it can be suppressed via css -->
442 <span class="title_resp_stmt"><xsl:apply-templates/> <xsl:text> </xsl:text> </span>
445 <xsl:apply-templates/>
446 <xsl:text> </xsl:text>
455 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
456 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
457 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
458 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
460 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
461 <xsl:variable name="openurltext">
463 <xsl:when test="$OpenURLText != ''">
464 <xsl:value-of select="$OpenURLText" />
467 <xsl:text>OpenURL</xsl:text>
472 <span class="results_summary"><a>
473 <xsl:attribute name="href">
474 <xsl:value-of select="$OpenURLResolverURL" />
476 <xsl:attribute name="title">
477 <xsl:value-of select="$openurltext" />
479 <xsl:attribute name="class">
480 <xsl:text>OpenURL</xsl:text>
482 <xsl:if test="$OPACURLOpenInNewWindow='1'">
483 <xsl:attribute name="target">
484 <xsl:text>_blank</xsl:text>
488 <xsl:when test="$OpenURLImageLocation != ''">
490 <xsl:attribute name="src">
491 <xsl:value-of select="$OpenURLImageLocation" />
496 <xsl:value-of select="$openurltext" />
501 <!-- End of OpenURL -->
504 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
505 <xsl:if test="$display880">
506 <xsl:call-template name="m880Select">
507 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
508 <xsl:with-param name="codes">abc</xsl:with-param>
513 <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]">
515 <span class="byAuthor">by </span><span class="author">
517 <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']">
518 <xsl:call-template name="chopPunctuation">
519 <xsl:with-param name="chopString">
520 <xsl:call-template name="subfieldSelect">
521 <xsl:with-param name="codes">
523 <!-- #13383 include subfield e for field 111 -->
524 <xsl:when test="@tag=111 or @tag=711">aeq</xsl:when>
525 <xsl:when test="@tag=110 or @tag=710">ab</xsl:when>
526 <xsl:otherwise>abcjq</xsl:otherwise>
531 <xsl:with-param name="punctuation">
532 <xsl:text>:,;/ </xsl:text>
535 <!-- Display title portion for 110 and 710 fields -->
536 <xsl:if test="(@tag=110 or @tag=710) and boolean(marc:subfield[@code='c' or @code='d' or @code='n' or @code='t'])">
537 <span class="titleportion">
539 <xsl:when test="marc:subfield[@code='c' or @code='d' or @code='n'][not(marc:subfield[@code='t'])]"><xsl:text> </xsl:text></xsl:when>
540 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
542 <xsl:call-template name="chopPunctuation">
543 <xsl:with-param name="chopString">
544 <xsl:call-template name="subfieldSelect">
545 <xsl:with-param name="codes">cdnt</xsl:with-param>
551 <!-- Display title portion for 111 and 711 fields -->
552 <xsl:if test="(@tag=111 or @tag=711) and boolean(marc:subfield[@code='c' or @code='d' or @code='g' or @code='n' or @code='t'])">
553 <span class="titleportion">
555 <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>
556 <xsl:otherwise><xsl:text>. </xsl:text></xsl:otherwise>
559 <xsl:call-template name="chopPunctuation">
560 <xsl:with-param name="chopString">
561 <xsl:call-template name="subfieldSelect">
562 <xsl:with-param name="codes">cdgnt</xsl:with-param>
568 <!-- Display dates for 100 and 700 fields -->
569 <xsl:if test="(@tag=100 or @tag=700) and marc:subfield[@code='d']">
570 <span class="authordates">
571 <xsl:text>, </xsl:text>
572 <xsl:call-template name="chopPunctuation">
573 <xsl:with-param name="chopString">
574 <xsl:call-template name="subfieldSelect">
575 <xsl:with-param name="codes">d</xsl:with-param>
581 <!-- Display title portion for 100 and 700 fields -->
582 <xsl:if test="@tag=700 and marc:subfield[@code='t']">
583 <span class="titleportion">
584 <xsl:text>. </xsl:text>
585 <xsl:call-template name="chopPunctuation">
586 <xsl:with-param name="chopString">
587 <xsl:call-template name="subfieldSelect">
588 <xsl:with-param name="codes">t</xsl:with-param>
594 <!-- Display relators for 1XX and 7XX fields -->
595 <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'][. != ''])">
596 <span class="relatorcode">
597 <xsl:text> [</xsl:text>
599 <xsl:when test="@tag=111 or @tag=711">
601 <!-- Prefer j over 4 for 111 and 711 -->
602 <xsl:when test="marc:subfield[@code='j']">
603 <xsl:for-each select="marc:subfield[@code='j']">
604 <xsl:value-of select="."/>
605 <xsl:if test="position() != last()">, </xsl:if>
609 <xsl:for-each select="marc:subfield[@code=4]">
610 <xsl:value-of select="."/>
611 <xsl:if test="position() != last()">, </xsl:if>
616 <!-- Prefer e over 4 on 100 and 110 -->
617 <xsl:when test="marc:subfield[@code='e']">
618 <xsl:for-each select="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]">
619 <xsl:value-of select="."/>
620 <xsl:if test="position() != last()">, </xsl:if>
624 <xsl:for-each select="marc:subfield[@code=4]">
625 <xsl:value-of select="."/>
626 <xsl:if test="position() != last()">, </xsl:if>
630 <xsl:text>]</xsl:text>
634 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise>
643 <xsl:call-template name="show-series">
644 <xsl:with-param name="searchurl">/cgi-bin/koha/opac-search.pl</xsl:with-param>
645 <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/>
646 <xsl:with-param name="UseAuthoritiesForTracings" select="$UseAuthoritiesForTracings"/>
649 <xsl:if test="marc:datafield[@tag=250]">
650 <span class="results_summary edition">
651 <span class="label">Edition: </span>
652 <xsl:for-each select="marc:datafield[@tag=250]">
653 <xsl:call-template name="subfieldSelect">
654 <xsl:with-param name="codes">ab</xsl:with-param>
660 <xsl:if test="marc:datafield[@tag=773]">
661 <xsl:for-each select="marc:datafield[@tag=773]">
662 <xsl:if test="marc:subfield[@code='t']">
663 <span class="results_summary source">
664 <span class="label">Source: </span>
665 <xsl:value-of select="marc:subfield[@code='t']"/>
671 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
672 <span class="results_summary type">
673 <xsl:if test="$typeOf008!=''">
674 <span class="results_material_type">
675 <span class="label">Material type: </span>
677 <xsl:when test="$leader19='a'"><img src="/opac-tmpl/lib/famfamfam/ST.png" alt="Set" class="materialtype mt_icon_ST"/> Set</xsl:when>
678 <xsl:when test="$leader6='a'">
680 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'"><img src="/opac-tmpl/lib/famfamfam/BK.png" alt="Text" class="materialtype mt_icon_BK"/> Text</xsl:when>
681 <xsl:when test="$leader7='i' or $leader7='s'"><img src="/opac-tmpl/lib/famfamfam/SE.png" alt="Continuing resource" class="materialtype mt_icon_SE"/> Continuing resource</xsl:when>
682 <xsl:when test="$leader7='a' or $leader7='b'"><img src="/opac-tmpl/lib/famfamfam/AR.png" alt="Article" class="materialtype mt_icon_AR"/> Article</xsl:when>
685 <xsl:when test="$leader6='t'"><img src="/opac-tmpl/lib/famfamfam/BK.png" alt="Text" class="materialtype mt_icon_BK"/> Text</xsl:when>
686 <xsl:when test="$leader6='o'"><img src="/opac-tmpl/lib/famfamfam/MM.png" alt="Kit" class="materialtype mt_icon_MM"/> Kit</xsl:when>
687 <xsl:when test="$leader6='p'"><img src="/opac-tmpl/lib/famfamfam/MM.png" alt="Mixed materials" class="materialtype mt_icon_MM"/>Mixed materials</xsl:when>
688 <xsl:when test="$leader6='m'"><img src="/opac-tmpl/lib/famfamfam/CF.png" alt="Computer file" class="materialtype mt_icon_CF"/> Computer file</xsl:when>
689 <xsl:when test="$leader6='e' or $leader6='f'"><img src="/opac-tmpl/lib/famfamfam/MP.png" alt="Map" class="materialtype mt_icon_MP"/> Map</xsl:when>
690 <xsl:when test="$leader6='g'"><img src="/opac-tmpl/lib/famfamfam/VM.png" alt="Film" class="materialtype mt_icon_VM"/> Film</xsl:when>
691 <xsl:when test="$leader6='k'"><img src="/opac-tmpl/lib/famfamfam/GR.png" alt="Picture" class="materialtype mt_icon_GR"/> Picture</xsl:when>
692 <xsl:when test="$leader6='r'"><img src="/opac-tmpl/lib/famfamfam/OB.png" alt="Object" class="materialtype mt_icon_OB"/> Object</xsl:when>
693 <xsl:when test="$leader6='c' or $leader6='d'"><img src="/opac-tmpl/lib/famfamfam/PR.png" alt="Score" class="materialtype mt_icon_PR"/> Score</xsl:when>
694 <xsl:when test="$leader6='i'"><img src="/opac-tmpl/lib/famfamfam/MU.png" alt="Sound" class="materialtype mt_icon_MU"/> Sound</xsl:when>
695 <xsl:when test="$leader6='j'"><img src="/opac-tmpl/lib/famfamfam/PR.png" alt="Music" class="materialtype mt_icon_PR"/> Music</xsl:when>
699 <xsl:if test="string-length(normalize-space($physicalDescription))">
700 <span class="results_format">
701 <span class="label">; Format: </span><xsl:copy-of select="$physicalDescription"></xsl:copy-of>
705 <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">
707 <xsl:if test="$typeOf008='CR'">
708 <span class="results_typeofcontinuing">
709 <xsl:if test="$controlField008-21 and $controlField008-21 !='|' and $controlField008-21 !=' '">
710 <span class="label">; Type of continuing resource: </span>
713 <xsl:when test="$controlField008-21='d'">
714 <img src="/opac-tmpl/lib/famfamfam/database.png" alt="database" class="format"/>
716 <xsl:when test="$controlField008-21='l'">
719 <xsl:when test="$controlField008-21='m'">
722 <xsl:when test="$controlField008-21='n'">
725 <xsl:when test="$controlField008-21='p'">
728 <xsl:when test="$controlField008-21='w'">
729 <img src="/opac-tmpl/lib/famfamfam/world_link.png" alt="web site" class="format"/>
734 <xsl:if test="$typeOf008='BK' or $typeOf008='CR'">
735 <xsl:if test="contains($controlField008-24,'abcdefghijklmnopqrstvwxyz')">
736 <span class="results_natureofcontents">
737 <span class="label">; Nature of contents: </span>
739 <xsl:when test="contains($controlField008-24,'a')">
742 <xsl:when test="contains($controlField008-24,'b')">
744 <img src="/opac-tmpl/lib/famfamfam/text_list_bullets.png" alt="bibliography" class="natureofcontents"/>
746 <xsl:when test="contains($controlField008-24,'c')">
749 <xsl:when test="contains($controlField008-24,'d')">
752 <xsl:when test="contains($controlField008-24,'e')">
755 <xsl:when test="contains($controlField008-24,'f')">
758 <xsl:when test="contains($controlField008-24,'g')">
761 <xsl:when test="contains($controlField008-24,'i')">
764 <xsl:when test="contains($controlField008-24,'k')">
767 <xsl:when test="contains($controlField008-24,'l')">
770 <xsl:when test="contains($controlField008-24,'m')">
773 <xsl:when test="contains($controlField008-24,'n')">
776 <xsl:when test="contains($controlField008-24,'o')">
779 <xsl:when test="contains($controlField008-24,'p')">
782 <xsl:when test="contains($controlField008-24,'q')">
785 <xsl:when test="contains($controlField008-24,'r')">
788 <xsl:when test="contains($controlField008-24,'s')">
791 <xsl:when test="contains($controlField008-24,'t')">
792 <img src="/opac-tmpl/lib/famfamfam/report.png" alt="technical report" class="natureofcontents"/>
794 <xsl:when test="contains($controlField008-24,'v')">
795 legal case and case notes
797 <xsl:when test="contains($controlField008-24,'w')">
800 <xsl:when test="contains($controlField008-24,'z')">
805 <xsl:when test="$controlField008-29='1'">
806 conference publication
812 <xsl:if test="$typeOf008='CF'">
813 <span class="results_typeofcomp">
814 <xsl:if test="$controlField008-26='a' or $controlField008-26='e' or $controlField008-26='f' or $controlField008-26='g'">
815 <span class="label">; Type of computer file: </span>
818 <xsl:when test="$controlField008-26='a'">
821 <xsl:when test="$controlField008-26='e'">
822 <img src="/opac-tmpl/lib/famfamfam/database.png" alt="database" class="format"/>
824 <xsl:when test="$controlField008-26='f'">
825 <img src="/opac-tmpl/lib/famfamfam/font.png" alt="font" class="format"/>
827 <xsl:when test="$controlField008-26='g'">
828 <img src="/opac-tmpl/lib/famfamfam/controller.png" alt="game" class="format"/>
833 <xsl:if test="$typeOf008='BK'">
834 <span class="results_contents_literary">
835 <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')">
836 <span class="label">; Nature of contents: </span>
838 <xsl:if test="substring($controlField008,25,1)='j'">
841 <xsl:if test="substring($controlField008,31,1)='1'">
844 <xsl:if test="$controlField008-34='a' or $controlField008-34='b' or $controlField008-34='c' or $controlField008-34='d'">
845 <img src="/opac-tmpl/lib/famfamfam/user.png" alt="biography" class="natureofcontents"/>
848 <xsl:if test="$controlField008-33 and $controlField008-33!='|' and $controlField008-33!='u' and $controlField008-33!=' '">
849 <span class="label">; Literary form: </span>
852 <xsl:when test="$controlField008-33='0'">
855 <xsl:when test="$controlField008-33='1'">
858 <xsl:when test="$controlField008-33='d'">
861 <xsl:when test="$controlField008-33='e'">
864 <xsl:when test="$controlField008-33='f'">
867 <xsl:when test="$controlField008-33='h'">
870 <xsl:when test="$controlField008-33='i'">
873 <xsl:when test="$controlField008-33='j'">
876 <xsl:when test="$controlField008-33='m'">
879 <xsl:when test="$controlField008-33='p'">
882 <xsl:when test="$controlField008-33='s'">
888 <xsl:if test="$typeOf008='MU' and $controlField008-30-31 and $controlField008-30-31!='||' and $controlField008-30-31!=' '">
889 <span class="results_literaryform">
890 <span class="label">; Literary form: </span> <!-- Literary text for sound recordings -->
891 <xsl:if test="contains($controlField008-30-31,'b')">
894 <xsl:if test="contains($controlField008-30-31,'c')">
895 conference publication
897 <xsl:if test="contains($controlField008-30-31,'d')">
900 <xsl:if test="contains($controlField008-30-31,'e')">
903 <xsl:if test="contains($controlField008-30-31,'f')">
906 <xsl:if test="contains($controlField008-30-31,'o')">
909 <xsl:if test="contains($controlField008-30-31,'h')">
912 <xsl:if test="contains($controlField008-30-31,'k')">
915 <xsl:if test="contains($controlField008-30-31,'m')">
918 <xsl:if test="contains($controlField008-30-31,'p')">
921 <xsl:if test="contains($controlField008-30-31,'r')">
924 <xsl:if test="contains($controlField008-30-31,'g')">
927 <xsl:if test="contains($controlField008-30-31,'s')">
930 <xsl:if test="contains($controlField008-30-31,'l')">
935 <xsl:if test="$typeOf008='VM'">
936 <span class="results_typeofvisual">
937 <span class="label">; Type of visual material: </span>
939 <xsl:when test="$controlField008-33='a'">
942 <xsl:when test="$controlField008-33='b'">
945 <xsl:when test="$controlField008-33='c'">
948 <xsl:when test="$controlField008-33='d'">
951 <xsl:when test="$controlField008-33='f'">
954 <xsl:when test="$controlField008-33='g'">
957 <xsl:when test="$controlField008-33='i'">
960 <xsl:when test="$controlField008-33='k'">
963 <xsl:when test="$controlField008-33='l'">
966 <xsl:when test="$controlField008-33='m'">
969 <xsl:when test="$controlField008-33='n'">
972 <xsl:when test="$controlField008-33='o'">
975 <xsl:when test="$controlField008-33='p'">
978 <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
981 <xsl:when test="$controlField008-33='r'">
984 <xsl:when test="$controlField008-33='s'">
987 <xsl:when test="$controlField008-33='t'">
990 <xsl:when test="$controlField008-33='v'">
993 <xsl:when test="$controlField008-33='w'">
1001 <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')">
1002 <span class="results_audience">
1003 <span class="label">; Audience: </span>
1005 <xsl:when test="$controlField008-22='a'">
1008 <xsl:when test="$controlField008-22='b'">
1011 <xsl:when test="$controlField008-22='c'">
1014 <xsl:when test="$controlField008-22='d'">
1017 <xsl:when test="$controlField008-22='e'">
1020 <xsl:when test="$controlField008-22='g'">
1023 <xsl:when test="$controlField008-22='j'">
1026 <xsl:when test="$controlField008-22='f'">
1032 <xsl:text> </xsl:text> <!-- added blank space to fix font display problem, see Bug 3671 -->
1036 <xsl:call-template name="show-lang-041"/>
1038 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
1039 <xsl:if test="$display880">
1040 <xsl:call-template name="m880Select">
1041 <xsl:with-param name="basetags">260</xsl:with-param>
1042 <xsl:with-param name="codes">abcg</xsl:with-param>
1043 <xsl:with-param name="class">results_summary publisher</xsl:with-param>
1044 <xsl:with-param name="label">Publication details: </xsl:with-param>
1045 </xsl:call-template>
1048 <!-- Publisher info and RDA related info from tags 260, 264 -->
1050 <xsl:when test="marc:datafield[@tag=264]">
1051 <xsl:call-template name="showRDAtag264"/>
1053 <xsl:when test="marc:datafield[@tag=260]">
1054 <span class="results_summary publisher"><span class="label">Publication details: </span>
1055 <xsl:for-each select="marc:datafield[@tag=260]">
1056 <xsl:if test="marc:subfield[@code='a']">
1057 <span class="publisher_place" property="location">
1058 <xsl:call-template name="subfieldSelect">
1059 <xsl:with-param name="codes">a</xsl:with-param>
1060 </xsl:call-template>
1063 <xsl:text> </xsl:text>
1064 <xsl:if test="marc:subfield[@code='b']">
1065 <span property="name" class="publisher_name">
1066 <xsl:call-template name="subfieldSelect">
1067 <xsl:with-param name="codes">b</xsl:with-param>
1068 </xsl:call-template>
1071 <xsl:text> </xsl:text>
1072 <span property="datePublished" class="publisher_date">
1073 <xsl:call-template name="chopPunctuation">
1074 <xsl:with-param name="chopString">
1075 <xsl:call-template name="subfieldSelect">
1076 <xsl:with-param name="codes">cg</xsl:with-param>
1077 </xsl:call-template>
1079 </xsl:call-template>
1081 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1083 <xsl:if test="marc:datafield[@tag=264]">
1084 <xsl:text>; </xsl:text>
1085 <xsl:call-template name="showRDAtag264"/>
1091 <!-- Dissertation note -->
1092 <xsl:if test="marc:datafield[@tag=502]">
1093 <span class="results_summary diss_note">
1094 <span class="label">Dissertation note: </span>
1095 <xsl:for-each select="marc:datafield[@tag=502]">
1096 <xsl:call-template name="subfieldSelect">
1097 <xsl:with-param name="codes">abcdgo</xsl:with-param>
1098 </xsl:call-template>
1100 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
1104 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
1105 <xsl:if test="$display880">
1106 <xsl:call-template name="m880Select">
1107 <xsl:with-param name="basetags">246</xsl:with-param>
1108 <xsl:with-param name="codes">ab</xsl:with-param>
1109 <xsl:with-param name="class">results_summary other_title</xsl:with-param>
1110 <xsl:with-param name="label">Other title: </xsl:with-param>
1111 </xsl:call-template>
1114 <xsl:if test="marc:datafield[@tag=246]">
1115 <span class="results_summary other_title">
1116 <span class="label">Other title: </span>
1117 <xsl:for-each select="marc:datafield[@tag=246]">
1118 <xsl:call-template name="subfieldSelect">
1119 <xsl:with-param name="codes">ab</xsl:with-param>
1120 </xsl:call-template>
1121 <!-- #13386 added separator | -->
1122 <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>
1126 <xsl:if test="marc:datafield[@tag=242]">
1127 <span class="results_summary translated_title">
1128 <span class="label">Title translated: </span>
1129 <xsl:for-each select="marc:datafield[@tag=242]">
1130 <xsl:call-template name="subfieldSelect">
1131 <xsl:with-param name="codes">abh</xsl:with-param>
1132 </xsl:call-template>
1133 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
1137 <xsl:if test="marc:datafield[@tag=856]">
1138 <span class="results_summary online_resources">
1139 <span class="label">Online access: </span>
1140 <xsl:for-each select="marc:datafield[@tag=856]">
1141 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
1142 <xsl:if test="$OPACURLOpenInNewWindow='0'">
1145 <xsl:when test="$OPACTrackClicks='track'">
1146 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1148 <xsl:when test="$OPACTrackClicks='anonymous'">
1149 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1152 <xsl:attribute name="href">
1153 <xsl:if test="not(contains(marc:subfield[@code='u'],'://'))">
1155 <xsl:when test="@ind1=7">
1156 <xsl:value-of select="marc:subfield[@code='2']"/><xsl:text>://</xsl:text>
1158 <xsl:when test="@ind1=1">
1159 <xsl:text>ftp://</xsl:text>
1162 <xsl:text>http://</xsl:text>
1166 <xsl:value-of select="marc:subfield[@code='u']"/>
1171 <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')">
1172 <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>
1174 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1175 <xsl:call-template name="subfieldSelect">
1176 <xsl:with-param name="codes">y3z</xsl:with-param>
1177 </xsl:call-template>
1179 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
1181 <xsl:when test="$URLLinkText!=''">
1182 <xsl:value-of select="$URLLinkText"/>
1185 <xsl:text>Click here to access online</xsl:text>
1192 <xsl:if test="$OPACURLOpenInNewWindow='1'">
1195 <xsl:when test="$OPACTrackClicks='track'">
1196 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1198 <xsl:when test="$OPACTrackClicks='anonymous'">
1199 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
1202 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
1206 <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')">
1207 <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>
1209 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
1210 <xsl:call-template name="subfieldSelect">
1211 <xsl:with-param name="codes">y3z</xsl:with-param>
1212 </xsl:call-template>
1214 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
1216 <xsl:when test="$URLLinkText!=''">
1217 <xsl:value-of select="$URLLinkText"/>
1220 <xsl:text>Click here to access online</xsl:text>
1228 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
1229 <xsl:otherwise> | </xsl:otherwise>
1234 <span class="results_summary availability">
1235 <span class="label">Availability: </span>
1237 <xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0">
1239 <xsl:when test="string-length($AlternateHoldingsField)=3 and marc:datafield[@tag=$AlternateHoldingsField]">
1240 <xsl:variable name="AlternateHoldingsCount" select="count(marc:datafield[@tag=$AlternateHoldingsField])"/>
1241 <xsl:for-each select="marc:datafield[@tag=$AlternateHoldingsField][1]">
1242 <xsl:call-template name="subfieldSelect">
1243 <xsl:with-param name="codes"><xsl:value-of select="$AlternateHoldingsSubfields"/></xsl:with-param>
1244 <xsl:with-param name="delimeter"><xsl:value-of select="$AlternateHoldingsSeparator"/></xsl:with-param>
1245 </xsl:call-template>
1247 (<xsl:value-of select="$AlternateHoldingsCount"/>)
1249 <xsl:otherwise><span class="noitems">No items available </span> </xsl:otherwise>
1252 <xsl:when test="count(key('item-by-status', 'available'))>0">
1253 <span class="available reallyavailable">
1254 <span class="AvailabilityLabel"><strong><xsl:text>Items available for loan: </xsl:text></strong></span>
1255 <xsl:variable name="available_items"
1256 select="key('item-by-status', 'available')"/>
1258 <xsl:when test="$singleBranchMode=1">
1259 <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1260 <span class="ItemSummary">
1261 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
1262 <span class="CallNumberAndLabel">
1263 <span class="LabelCallNumber">Call number: </span>
1264 <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1267 <xsl:text> (</xsl:text>
1268 <xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/>
1269 <xsl:text>)</xsl:text>
1271 <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when>
1272 <xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise>
1279 <xsl:when test="$OPACResultsLibrary='homebranch'">
1280 <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1281 <span class="ItemSummary">
1282 <span class="ItemBranch"><xsl:value-of select="items:homebranch"/> </span>
1283 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
1284 <span class="CallNumberAndLabel">
1285 <span class="LabelCallNumber">Call number: </span>
1286 <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1289 <xsl:text> (</xsl:text>
1290 <xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/>
1291 <xsl:text>)</xsl:text>
1293 <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when>
1294 <xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise>
1300 <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]">
1301 <span class="ItemSummary">
1302 <span class="ItemBranch"><xsl:value-of select="items:holdingbranch"/> </span>
1303 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
1304 <span class="CallNumberAndLabel">
1305 <span class="LabelCallNumber">Call number: </span>
1306 <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1309 <xsl:text> (</xsl:text>
1310 <xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/>
1311 <xsl:text>)</xsl:text>
1313 <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when>
1314 <xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise>
1328 <xsl:when test="count(key('item-by-status', 'reference'))>0">
1329 <span class="available reference">
1330 <span class="AvailabilityLabel"><strong><xsl:text>Items available for reference: </xsl:text></strong></span>
1331 <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1332 <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch))[1])]">
1334 <xsl:attribute name="class">
1336 <xsl:value-of select="translate(items:substatus,' ','_')"/>
1338 <xsl:if test="$singleBranchMode=0">
1339 <span class="ItemBranch"><xsl:value-of select="items:homebranch"/><xsl:text> </xsl:text></span>
1341 <span class='notforloandesc'><xsl:value-of select="items:substatus"/></span>
1342 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
1343 <span class="CallNumberAndLabel">
1344 <span class="LabelCallNumber">Call number: </span>
1345 <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1348 <xsl:text> (</xsl:text>
1349 <xsl:value-of select="count(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch)))"/>
1350 <xsl:text>)</xsl:text>
1351 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1358 <xsl:if test="count(key('item-by-status', 'available'))=0">
1359 <span class="available"><xsl:value-of select="items:homebranch"/><xsl:text>: </xsl:text></span>
1363 <xsl:when test="count(key('item-by-status', 'reallynotforloan'))>0">
1364 <span class="unavailable">
1366 <xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')"/>
1367 <xsl:for-each select="$unavailable_items[generate-id() = generate-id(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch))[1])]">
1369 <xsl:attribute name="class">
1371 <xsl:value-of select="translate(items:substatus,' ','_')"/>
1373 <xsl:if test="$singleBranchMode=0">
1374 <span class="ItemBranch"><xsl:value-of select="items:homebranch"/><xsl:text> </xsl:text></span>
1376 <span class='notforloandesc'><xsl:value-of select="items:substatus"/></span>
1377 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
1378 <span class="CallNumberAndLabel">
1379 <span class="LabelCallNumber">Call number: </span>
1380 <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1383 <xsl:text> (</xsl:text>
1384 <xsl:value-of select="count(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch)))"/>
1385 <xsl:text>)</xsl:text>
1386 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1393 <xsl:if test="count(key('item-by-status', 'Checked out'))>0">
1394 <span class="unavailable">
1395 <xsl:text>Checked out (</xsl:text>
1396 <xsl:value-of select="count(key('item-by-status', 'Checked out'))"/>
1397 <xsl:text>). </xsl:text>
1400 <xsl:if test="count(key('item-by-status', 'Withdrawn'))>0">
1401 <span class="unavailable">
1402 <xsl:text>Withdrawn (</xsl:text>
1403 <xsl:value-of select="count(key('item-by-status', 'Withdrawn'))"/>
1404 <xsl:text>). </xsl:text> </span>
1406 <xsl:if test="$hidelostitems='0' and count(key('item-by-status', 'Lost'))>0">
1407 <span class="unavailable">
1408 <xsl:text>Lost (</xsl:text>
1409 <xsl:value-of select="count(key('item-by-status', 'Lost'))"/>
1410 <xsl:text>). </xsl:text> </span>
1412 <xsl:if test="count(key('item-by-status', 'Damaged'))>0">
1413 <span class="unavailable">
1414 <xsl:text>Damaged (</xsl:text>
1415 <xsl:value-of select="count(key('item-by-status', 'Damaged'))"/>
1416 <xsl:text>). </xsl:text> </span>
1418 <xsl:if test="count(key('item-by-status', 'On order'))>0">
1419 <span class="unavailable">
1420 <xsl:text>On order (</xsl:text>
1421 <xsl:value-of select="count(key('item-by-status', 'On order'))"/>
1422 <xsl:text>). </xsl:text> </span>
1424 <xsl:if test="count(key('item-by-status', 'Pending hold'))>0">
1425 <span class="unavailable">
1426 <xsl:text>Pending hold (</xsl:text>
1427 <xsl:value-of select="count(key('item-by-status', 'Pending hold'))"/>
1428 <xsl:text>). </xsl:text> </span>
1430 <xsl:if test="count(key('item-by-status', 'In transit'))>0">
1431 <span class="unavailable">
1432 <xsl:text>In transit (</xsl:text>
1433 <xsl:value-of select="count(key('item-by-status', 'In transit'))"/>
1434 <xsl:text>). </xsl:text> </span>
1436 <xsl:if test="count(key('item-by-status', 'Waiting'))>0">
1437 <span class="unavailable">
1438 <xsl:text>On hold (</xsl:text>
1439 <xsl:value-of select="count(key('item-by-status', 'Waiting'))"/>
1440 <xsl:text>). </xsl:text> </span>
1444 <xsl:when test="($OPACItemLocation='location' or $OPACItemLocation='ccode') and (count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0)">
1445 <span class="results_summary location">
1448 <xsl:when test="$OPACItemLocation='location'">
1449 <span class="label">Location(s): </span>
1451 <xsl:when test="$OPACItemLocation='ccode'">
1452 <span class="label">Collection(s): </span>
1457 <xsl:when test="count(key('item-by-status', 'available'))>0">
1458 <span class="available">
1459 <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
1460 <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1462 <xsl:when test="$OPACItemLocation='location'"><strong><xsl:value-of select="concat(items:location,' ')"/></strong></xsl:when>
1463 <xsl:when test="$OPACItemLocation='ccode'"><strong><xsl:value-of select="concat(items:ccode,' ')"/></strong></xsl:when>
1465 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
1466 <span class="CallNumberAndLabel">
1467 <span class="LabelCallNumber">Call number: </span>
1468 <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1471 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1475 <xsl:when test="count(key('item-by-status', 'reference'))>0">
1476 <span class="available">
1477 <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
1478 <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
1480 <xsl:when test="$OPACItemLocation='location'"><strong><xsl:value-of select="concat(items:location,' ')"/></strong></xsl:when>
1481 <xsl:when test="$OPACItemLocation='ccode'"><strong><xsl:value-of select="concat(items:ccode,' ')"/></strong></xsl:when>
1483 <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">
1484 <span class="CallNumberAndLabel">
1485 <span class="LabelCallNumber">Call number: </span>
1486 <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
1489 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
1499 <xsl:template name="nameABCQ">
1500 <xsl:call-template name="chopPunctuation">
1501 <xsl:with-param name="chopString">
1502 <xsl:call-template name="subfieldSelect">
1503 <xsl:with-param name="codes">abcq</xsl:with-param>
1504 </xsl:call-template>
1506 <xsl:with-param name="punctuation">
1507 <xsl:text>:,;/ </xsl:text>
1509 </xsl:call-template>
1512 <xsl:template name="nameABCDN">
1513 <xsl:call-template name="chopPunctuation">
1514 <xsl:with-param name="chopString">
1515 <xsl:call-template name="subfieldSelect">
1516 <xsl:with-param name="codes">abcdn</xsl:with-param>
1517 </xsl:call-template>
1519 <xsl:with-param name="punctuation">
1520 <xsl:text>:,;/ </xsl:text>
1522 </xsl:call-template>
1525 <xsl:template name="nameACDEQ">
1526 <xsl:call-template name="subfieldSelect">
1527 <xsl:with-param name="codes">acdeq</xsl:with-param>
1528 </xsl:call-template>
1531 <xsl:template name="nameDate">
1532 <xsl:for-each select="marc:subfield[@code='d']">
1533 <xsl:call-template name="chopPunctuation">
1534 <xsl:with-param name="chopString" select="."/>
1535 </xsl:call-template>
1539 <xsl:template name="role">
1540 <xsl:for-each select="marc:subfield[@code='e']">
1541 <xsl:value-of select="."/>
1543 <xsl:for-each select="marc:subfield[@code='4']">
1544 <xsl:value-of select="."/>
1548 <xsl:template name="specialSubfieldSelect">
1549 <xsl:param name="anyCodes"/>
1550 <xsl:param name="axis"/>
1551 <xsl:param name="beforeCodes"/>
1552 <xsl:param name="afterCodes"/>
1553 <xsl:variable name="str">
1554 <xsl:for-each select="marc:subfield">
1555 <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])">
1556 <xsl:value-of select="text()"/>
1557 <xsl:text> </xsl:text>
1561 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
1564 <xsl:template name="subtitle">
1565 <xsl:if test="marc:subfield[@code='b']">
1566 <xsl:call-template name="chopPunctuation">
1567 <xsl:with-param name="chopString">
1568 <xsl:value-of select="marc:subfield[@code='b']"/>
1570 <!--<xsl:call-template name="subfieldSelect">
1571 <xsl:with-param name="codes">b</xsl:with-param>
1572 </xsl:call-template>-->
1574 </xsl:call-template>
1578 <xsl:template name="chopBrackets">
1579 <xsl:param name="chopString"></xsl:param>
1580 <xsl:variable name="string">
1581 <xsl:call-template name="chopPunctuation">
1582 <xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
1583 </xsl:call-template>
1585 <xsl:if test="substring($string, 1,1)='['">
1586 <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
1588 <xsl:if test="substring($string, 1,1)!='['">
1589 <xsl:value-of select="$string"></xsl:value-of>