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="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
24 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
25 <xsl:variable name="AlternateHoldingsField" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 1, 3)"/>
26 <xsl:variable name="AlternateHoldingsSubfields" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 4)"/>
27 <xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/>
28 <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
29 <xsl:variable name="DisplayIconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayIconsXSLT']"/>
30 <xsl:variable name="IntranetBiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='IntranetBiblioDefaultView']"/>
31 <xsl:variable name="leader" select="marc:leader"/>
32 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
33 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
34 <xsl:variable name="leader19" select="substring($leader,20,1)"/>
35 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
36 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
37 <xsl:variable name="typeOf008">
39 <xsl:when test="$leader19='a'">ST</xsl:when>
40 <xsl:when test="$leader6='a'">
42 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
43 <xsl:when test="$leader7='b' or $leader7='i' or $leader7='s'">CR</xsl:when>
46 <xsl:when test="$leader6='t'">BK</xsl:when>
47 <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
48 <xsl:when test="$leader6='m'">CF</xsl:when>
49 <xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
50 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
51 <xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
52 <xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
55 <xsl:variable name="controlField008-23" select="substring($controlField008,24,1)"/>
56 <xsl:variable name="controlField008-21" select="substring($controlField008,22,1)"/>
57 <xsl:variable name="controlField008-22" select="substring($controlField008,23,1)"/>
58 <xsl:variable name="controlField008-24" select="substring($controlField008,25,4)"/>
59 <xsl:variable name="controlField008-26" select="substring($controlField008,27,1)"/>
60 <xsl:variable name="controlField008-29" select="substring($controlField008,30,1)"/>
61 <xsl:variable name="controlField008-34" select="substring($controlField008,35,1)"/>
62 <xsl:variable name="controlField008-33" select="substring($controlField008,34,1)"/>
63 <xsl:variable name="controlField008-30-31" select="substring($controlField008,31,2)"/>
65 <xsl:variable name="physicalDescription">
66 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='a']">
69 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='b']">
72 <xsl:if test="$typeOf008='CF' and marc:controlfield[@tag=007][substring(.,12,1)='d']">
73 digitized other analog
76 <xsl:variable name="check008-23">
77 <xsl:if test="$typeOf008='BK' or $typeOf008='MU' or $typeOf008='CR' or $typeOf008='MX'">
78 <xsl:value-of select="true()"></xsl:value-of>
81 <xsl:variable name="check008-29">
82 <xsl:if test="$typeOf008='MP' or $typeOf008='VM'">
83 <xsl:value-of select="true()"></xsl:value-of>
87 <xsl:when test="($check008-23 and $controlField008-23='f') or ($check008-29 and $controlField008-29='f')">
90 <xsl:when test="($controlField008-23=' ' and ($leader6='c' or $leader6='d')) or (($typeOf008='BK' or $typeOf008='CR') and ($controlField008-23=' ' or $controlField008='r'))">
93 <xsl:when test="$leader6 = 'm' or ($check008-23 and $controlField008-23='s') or ($check008-29 and $controlField008-29='s')">
96 <xsl:when test="($check008-23 and $controlField008-23='b') or ($check008-29 and $controlField008-29='b')">
99 <xsl:when test="($check008-23 and $controlField008-23='a') or ($check008-29 and $controlField008-29='a')">
104 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='b']">
107 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='j']">
110 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='m']">
113 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='r']">
116 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='a']">
119 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='f']">
122 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='c'][substring(text(),2,1)='h']">
126 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='o'][substring(text(),2,1)='o']">
130 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='d']">
133 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='g']">
136 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='j']">
139 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='q']">
142 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='k']">
145 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='r']">
148 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='s']">
151 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2,1)='y']">
155 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='a']">
158 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='e']">
161 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='f']">
164 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='b']">
167 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='c']">
170 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='d']">
173 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='h'][substring(text(),2,1)='g']">
176 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='c']">
179 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='f']">
182 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='m'][substring(text(),2,1)='r']">
185 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='c']">
188 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='f']">
189 photomechanical print
191 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='g']">
194 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='h']">
197 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='j']">
200 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='k'][substring(text(),2,1)='l']">
203 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='d']">
206 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='c']">
209 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='o']">
212 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='f']">
215 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='g'][substring(text(),2,1)='t']">
218 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='r'][substring(text(),2,1)='r']">
221 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='e']">
224 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='q']">
227 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='g']">
230 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='s']">
233 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='t']">
236 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='i']">
239 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='s'][substring(text(),2,1)='w']">
242 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='c']">
245 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='b']">
248 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='a']">
251 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='f'][substring(text(),2,1)='d']">
252 tactile, with no writing system
254 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='c']">
257 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='a']">
260 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='t'][substring(text(),2,1)='d']">
261 text in looseleaf binder
263 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='c']">
266 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='f']">
269 <xsl:if test="marc:controlfield[@tag=007][substring(text(),1,1)='v'][substring(text(),2,1)='r']">
273 <xsl:for-each select="marc:datafield[@tag=856]/marc:subfield[@code='q'][string-length(.)>1]">
274 <xsl:value-of select="."></xsl:value-of>
276 <xsl:for-each select="marc:datafield[@tag=300]">
277 <xsl:call-template name="subfieldSelect">
278 <xsl:with-param name="codes">abce</xsl:with-param>
284 <!-- Title Statement: Alternate Graphic Representation (MARC 880) -->
285 <xsl:if test="$display880">
286 <xsl:call-template name="m880Select">
287 <xsl:with-param name="basetags">245</xsl:with-param>
288 <xsl:with-param name="codes">abhfgknps</xsl:with-param>
289 <xsl:with-param name="bibno"><xsl:value-of select="$biblionumber"/></xsl:with-param>
294 <xsl:attribute name="href">
295 <xsl:call-template name="buildBiblioDefaultViewURL">
296 <xsl:with-param name="IntranetBiblioDefaultView">
297 <xsl:value-of select="$IntranetBiblioDefaultView"/>
300 <xsl:value-of select="$biblionumber"/>
302 <xsl:attribute name="class">title</xsl:attribute>
304 <xsl:if test="marc:datafield[@tag=245]">
305 <xsl:for-each select="marc:datafield[@tag=245]">
306 <xsl:variable name="title">
307 <xsl:call-template name="subfieldSelect">
308 <xsl:with-param name="codes">a</xsl:with-param>
310 <xsl:if test="marc:subfield[@code='h']">
311 <xsl:text> </xsl:text>
312 <xsl:call-template name="subfieldSelect">
313 <xsl:with-param name="codes">h</xsl:with-param>
316 <xsl:if test="marc:subfield[@code='b']">
317 <xsl:text> </xsl:text>
318 <xsl:call-template name="subfieldSelect">
319 <xsl:with-param name="codes">b</xsl:with-param>
322 <xsl:text> </xsl:text>
323 <xsl:call-template name="subfieldSelect">
324 <xsl:with-param name="codes">fgknps</xsl:with-param>
327 <xsl:variable name="titleChop">
328 <xsl:call-template name="chopPunctuation">
329 <xsl:with-param name="chopString">
330 <xsl:value-of select="$title"/>
334 <xsl:value-of select="$titleChop"/>
339 <!-- Author Statement: Alternate Graphic Representation (MARC 880) -->
340 <xsl:if test="$display880">
341 <xsl:call-template name="m880Select">
342 <xsl:with-param name="basetags">100,110,111,700,710,711</xsl:with-param>
343 <xsl:with-param name="codes">abc</xsl:with-param>
348 <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]">
350 <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700) and @ind1!='z']">
353 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
354 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
357 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
360 <xsl:call-template name="nameABCQ"/></a>
362 <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
365 <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']">
368 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
369 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
372 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
375 <xsl:call-template name="nameABCDN"/></a>
376 <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
379 <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']">
381 <xsl:when test="marc:subfield[@code='n']">
382 <xsl:text> </xsl:text>
383 <xsl:call-template name="subfieldSelect">
384 <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template>
385 <xsl:text> </xsl:text>
390 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
391 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
394 <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
397 <xsl:call-template name="nameACDEQ"/></a>
398 <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
405 <xsl:if test="$DisplayIconsXSLT!='0'">
406 <span class="results_summary">
407 <xsl:if test="$typeOf008!=''">
408 <span class="label">Material type: </span>
410 <xsl:when test="$leader19='a'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/book_link.png" alt="book" title="book" class="materialtype"/> Set</xsl:when>
411 <xsl:when test="$leader6='a'">
413 <xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
414 <xsl:when test="$leader7='i' or $leader7='s'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/newspaper.png" alt="serial" title="serial" class="materialtype"/> Continuing Resource</xsl:when>
415 <xsl:when test="$leader7='a' or $leader7='b'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/book_open.png" alt="article" title="article" class="materialtype"/> Article</xsl:when>
418 <xsl:when test="$leader6='t'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/book.png" alt="book" title="book" class="materialtype"/> Book</xsl:when>
419 <xsl:when test="$leader6='o'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/report_disk.png" alt="kit" title="kit" class="materialtype"/> Kit</xsl:when>
420 <xsl:when test="$leader6='p'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/report_disk.png" alt="mixed materials" title="mixed materials" class="materialtype"/>Mixed Materials</xsl:when>
421 <xsl:when test="$leader6='m'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/computer_link.png" alt="computer file" title="computer file" class="materialtype"/> Computer File</xsl:when>
422 <xsl:when test="$leader6='e' or $leader6='f'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/map.png" alt="map" title="map" class="materialtype"/> Map</xsl:when>
423 <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/film.png" alt="visual material" title="visual material" class="materialtype"/> Visual Material</xsl:when>
424 <xsl:when test="$leader6='c' or $leader6='d'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/music.png" alt="score" title="score" class="materialtype"/> Score</xsl:when>
425 <xsl:when test="$leader6='i'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/sound.png" alt="sound" title="sound" class="materialtype"/> Sound</xsl:when>
426 <xsl:when test="$leader6='j'"><img src="/intranet-tmpl/prog/img/famfamfam/silk/sound.png" alt="music" title="music" class="materialtype"/> Music</xsl:when>
430 <xsl:if test="string-length(normalize-space($physicalDescription))">
431 <span class="label">; Format: </span><xsl:copy-of select="$physicalDescription"></xsl:copy-of>
434 <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">
436 <xsl:if test="$typeOf008='CR'">
437 <xsl:if test="$controlField008-21 and $controlField008-21 !='|' and $controlField008-21 !=' '">
438 <span class="label">; Type of continuing resource: </span>
441 <xsl:when test="$controlField008-21='l'">
444 <xsl:when test="$controlField008-21='m'">
447 <xsl:when test="$controlField008-21='n'">
450 <xsl:when test="$controlField008-21='p'">
455 <xsl:if test="$typeOf008='BK' or $typeOf008='CR'">
456 <xsl:if test="contains($controlField008-24,'abcdefghijklmnopqrstvwxyz')">
457 <span class="label">; Nature of contents: </span>
460 <xsl:when test="contains($controlField008-24,'a')">
463 <xsl:when test="contains($controlField008-24,'b')">
466 <xsl:when test="contains($controlField008-24,'c')">
469 <xsl:when test="contains($controlField008-24,'d')">
472 <xsl:when test="contains($controlField008-24,'e')">
475 <xsl:when test="contains($controlField008-24,'f')">
478 <xsl:when test="contains($controlField008-24,'g')">
481 <xsl:when test="contains($controlField008-24,'i')">
484 <xsl:when test="contains($controlField008-24,'k')">
487 <xsl:when test="contains($controlField008-24,'l')">
490 <xsl:when test="contains($controlField008-24,'m')">
493 <xsl:when test="contains($controlField008-24,'n')">
496 <xsl:when test="contains($controlField008-24,'o')">
499 <xsl:when test="contains($controlField008-24,'p')">
502 <xsl:when test="contains($controlField008-24,'q')">
505 <xsl:when test="contains($controlField008-24,'r')">
508 <xsl:when test="contains($controlField008-24,'s')">
511 <xsl:when test="contains($controlField008-24,'v')">
512 legal case and case notes
514 <xsl:when test="contains($controlField008-24,'w')">
517 <xsl:when test="contains($controlField008-24,'z')">
522 <xsl:when test="$controlField008-29='1'">
523 conference publication
527 <xsl:if test="$typeOf008='CF'">
528 <xsl:if test="$controlField008-26='a' or $controlField008-26='e' or $controlField008-26='f' or $controlField008-26='g'">
529 <span class="label">; Type of computer file: </span>
532 <xsl:when test="$controlField008-26='a'">
537 <xsl:if test="$typeOf008='BK'">
538 <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')">
539 <span class="label">; Nature of contents: </span>
541 <xsl:if test="substring($controlField008,25,1)='j'">
544 <xsl:if test="substring($controlField008,31,1)='1'">
548 <xsl:if test="$controlField008-33 and $controlField008-33!='|' and $controlField008-33!='u' and $controlField008-33!=' '">
549 <span class="label">; Literary form: </span>
552 <xsl:when test="$controlField008-33='0'">
555 <xsl:when test="$controlField008-33='1'">
558 <xsl:when test="$controlField008-33='e'">
561 <xsl:when test="$controlField008-33='d'">
564 <xsl:when test="$controlField008-33='c'">
567 <xsl:when test="$controlField008-33='l'">
570 <xsl:when test="$controlField008-33='h'">
573 <xsl:when test="$controlField008-33='i'">
576 <xsl:when test="$controlField008-33='f'">
579 <xsl:when test="$controlField008-33='j'">
582 <xsl:when test="$controlField008-33='s'">
587 <xsl:if test="$typeOf008='MU' and $controlField008-30-31 and $controlField008-30-31!='||' and $controlField008-30-31!=' '">
588 <span class="label">; Literary form: </span> <!-- Literary text for sound recordings -->
589 <xsl:if test="contains($controlField008-30-31,'b')">
592 <xsl:if test="contains($controlField008-30-31,'c')">
593 conference publication
595 <xsl:if test="contains($controlField008-30-31,'d')">
598 <xsl:if test="contains($controlField008-30-31,'e')">
601 <xsl:if test="contains($controlField008-30-31,'f')">
604 <xsl:if test="contains($controlField008-30-31,'o')">
607 <xsl:if test="contains($controlField008-30-31,'h')">
610 <xsl:if test="contains($controlField008-30-31,'k')">
613 <xsl:if test="contains($controlField008-30-31,'m')">
616 <xsl:if test="contains($controlField008-30-31,'p')">
619 <xsl:if test="contains($controlField008-30-31,'r')">
622 <xsl:if test="contains($controlField008-30-31,'g')">
625 <xsl:if test="contains($controlField008-30-31,'s')">
628 <xsl:if test="contains($controlField008-30-31,'l')">
632 <xsl:if test="$typeOf008='VM'">
633 <span class="label">; Type of visual material: </span>
635 <xsl:when test="$controlField008-33='a'">
638 <xsl:when test="$controlField008-33='b'">
641 <xsl:when test="$controlField008-33='c'">
644 <xsl:when test="$controlField008-33='d'">
647 <xsl:when test="$controlField008-33='f'">
650 <xsl:when test="$controlField008-33='g'">
653 <xsl:when test="$controlField008-33='i'">
656 <xsl:when test="$controlField008-33='k'">
659 <xsl:when test="$controlField008-33='l'">
662 <xsl:when test="$controlField008-33='m'">
665 <xsl:when test="$controlField008-33='n'">
668 <xsl:when test="$controlField008-33='o'">
671 <xsl:when test="$controlField008-33='p'">
674 <xsl:when test="$controlField008-33='q' or marc:controlfield[@tag=007][substring(text(),1,1)='a'][substring(text(),2
678 <xsl:when test="$controlField008-33='r'">
681 <xsl:when test="$controlField008-33='s'">
684 <xsl:when test="$controlField008-33='t'">
687 <xsl:when test="$controlField008-33='v'">
690 <xsl:when test="$controlField008-33='w'">
697 <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')">
698 <span class="label">; Audience: </span>
700 <xsl:when test="$controlField008-22='a'">
703 <xsl:when test="$controlField008-22='b'">
706 <xsl:when test="$controlField008-22='c'">
709 <xsl:when test="$controlField008-22='d'">
712 <xsl:when test="$controlField008-22='e'">
715 <xsl:when test="$controlField008-22='g'">
718 <xsl:when test="$controlField008-22='j'">
721 <xsl:when test="$controlField008-22='f'">
726 <xsl:text> </xsl:text> <!-- added blank space to fix font display problem, see Bug 3671 -->
728 </xsl:if> <!-- DisplayIconsXSLT -->
730 <!-- Publisher Statement: Alternate Graphic Representation (MARC 880) -->
731 <xsl:if test="$display880">
732 <xsl:call-template name="m880Select">
733 <xsl:with-param name="basetags">260</xsl:with-param>
734 <xsl:with-param name="codes">abcg</xsl:with-param>
735 <xsl:with-param name="class">results_summary</xsl:with-param>
736 <xsl:with-param name="label">Publisher: </xsl:with-param>
740 <!-- Publisher info and RDA related info from tags 260, 264 -->
742 <xsl:when test="marc:datafield[@tag=260]">
743 <span class="results_summary publisher"><span class="label">Publisher: </span>
744 <xsl:for-each select="marc:datafield[@tag=260]">
745 <xsl:if test="marc:subfield[@code='a']">
746 <xsl:call-template name="subfieldSelect">
747 <xsl:with-param name="codes">a</xsl:with-param>
750 <xsl:text> </xsl:text>
751 <xsl:if test="marc:subfield[@code='b']">
752 <xsl:call-template name="subfieldSelect">
753 <xsl:with-param name="codes">b</xsl:with-param>
756 <xsl:text> </xsl:text>
757 <xsl:call-template name="chopPunctuation">
758 <xsl:with-param name="chopString">
759 <xsl:call-template name="subfieldSelect">
760 <xsl:with-param name="codes">cg</xsl:with-param>
764 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
766 <xsl:if test="marc:datafield[@tag=264]">
767 <xsl:text>; </xsl:text>
768 <xsl:call-template name="showRDAtag264"/>
772 <xsl:when test="marc:datafield[@tag=264]">
773 <span class="results_summary">
774 <xsl:call-template name="showRDAtag264"/>
779 <!-- Dissertation note -->
780 <xsl:if test="marc:datafield[@tag=502]">
781 <span class="results_summary diss_note">
782 <span class="label">Dissertation note: </span>
783 <xsl:for-each select="marc:datafield[@tag=502]">
784 <xsl:call-template name="subfieldSelect">
785 <xsl:with-param name="codes">abcdgo</xsl:with-param>
788 <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise></xsl:choose>
792 <xsl:if test="marc:datafield[@tag=300]">
793 <span class="results_summary description"><span class="label">Description: </span>
794 <xsl:for-each select="marc:datafield[@tag=300]">
795 <xsl:call-template name="chopPunctuation">
796 <xsl:with-param name="chopString">
797 <xsl:call-template name="subfieldSelect">
798 <xsl:with-param name="codes">abceg</xsl:with-param>
802 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
807 <xsl:if test="marc:datafield[@tag=020]">
808 <span class="results_summary isbn"><span class="label">ISBN: </span>
809 <xsl:for-each select="marc:datafield[@tag=020]">
810 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
811 <xsl:value-of select="marc:subfield[@code='a']"/>
812 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
817 <xsl:if test="marc:datafield[@tag=022]">
818 <span class="results_summary issn"><span class="label">ISSN: </span>
819 <xsl:for-each select="marc:datafield[@tag=022]">
820 <xsl:value-of select="marc:subfield[@code='a']"/>
821 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
826 <xsl:if test="marc:datafield[@tag=250]">
827 <span class="results_summary">
828 <span class="label">Edition: </span>
829 <xsl:for-each select="marc:datafield[@tag=250]">
830 <xsl:call-template name="subfieldSelect">
831 <xsl:with-param name="codes">ab</xsl:with-param>
837 <xsl:if test="marc:datafield[@tag=773]">
838 <xsl:for-each select="marc:datafield[@tag=773]">
839 <xsl:if test="marc:subfield[@code='t']">
840 <span class="results_summary">
841 <span class="label">Source: </span>
842 <xsl:value-of select="marc:subfield[@code='t']"/>
848 <!-- Other Title Statement: Alternate Graphic Representation (MARC 880) -->
849 <xsl:if test="$display880">
850 <xsl:call-template name="m880Select">
851 <xsl:with-param name="basetags">246</xsl:with-param>
852 <xsl:with-param name="codes">ab</xsl:with-param>
853 <xsl:with-param name="class">results_summary</xsl:with-param>
854 <xsl:with-param name="label">Other Title: </xsl:with-param>
858 <xsl:if test="marc:datafield[@tag=246]">
859 <span class="results_summary">
860 <span class="label">Other title: </span>
861 <xsl:for-each select="marc:datafield[@tag=246]">
862 <xsl:call-template name="subfieldSelect">
863 <xsl:with-param name="codes">ab</xsl:with-param>
865 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
869 <xsl:if test="marc:datafield[@tag=856]">
870 <span class="results_summary">
871 <span class="label">Online Access: </span>
872 <xsl:for-each select="marc:datafield[@tag=856]">
873 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
874 <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
876 <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')">
877 <xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute><xsl:attribute name="alt"><xsl:value-of select="marc:subfield[@code='y']"/></xsl:attribute><xsl:attribute name="height">100</xsl:attribute></xsl:element><xsl:text></xsl:text>
879 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
880 <xsl:call-template name="subfieldSelect">
881 <xsl:with-param name="codes">y3z</xsl:with-param>
884 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
886 <xsl:when test="$URLLinkText!=''">
887 <xsl:value-of select="$URLLinkText"/>
890 <xsl:text>Click here to access online</xsl:text>
897 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
898 <xsl:otherwise> | </xsl:otherwise>
905 <xsl:template name="nameABCQ">
906 <xsl:call-template name="chopPunctuation">
907 <xsl:with-param name="chopString">
908 <xsl:call-template name="subfieldSelect">
909 <xsl:with-param name="codes">abcq</xsl:with-param>
912 <xsl:with-param name="punctuation">
913 <xsl:text>:,;/ </xsl:text>
918 <xsl:template name="nameABCDN">
919 <xsl:call-template name="chopPunctuation">
920 <xsl:with-param name="chopString">
921 <xsl:call-template name="subfieldSelect">
922 <xsl:with-param name="codes">abcdn</xsl:with-param>
925 <xsl:with-param name="punctuation">
926 <xsl:text>:,;/ </xsl:text>
931 <xsl:template name="nameACDEQ">
932 <xsl:call-template name="subfieldSelect">
933 <xsl:with-param name="codes">acdeq</xsl:with-param>
937 <xsl:template name="nameDate">
938 <xsl:for-each select="marc:subfield[@code='d']">
939 <xsl:call-template name="chopPunctuation">
940 <xsl:with-param name="chopString" select="."/>
945 <xsl:template name="role">
946 <xsl:for-each select="marc:subfield[@code='e']">
947 <xsl:value-of select="."/>
949 <xsl:for-each select="marc:subfield[@code='4']">
950 <xsl:value-of select="."/>
954 <xsl:template name="specialSubfieldSelect">
955 <xsl:param name="anyCodes"/>
956 <xsl:param name="axis"/>
957 <xsl:param name="beforeCodes"/>
958 <xsl:param name="afterCodes"/>
959 <xsl:variable name="str">
960 <xsl:for-each select="marc:subfield">
961 <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])">
962 <xsl:value-of select="text()"/>
963 <xsl:text> </xsl:text>
967 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
970 <xsl:template name="subtitle">
971 <xsl:if test="marc:subfield[@code='b']">
972 <xsl:call-template name="chopPunctuation">
973 <xsl:with-param name="chopString">
974 <xsl:value-of select="marc:subfield[@code='b']"/>
976 <!--<xsl:call-template name="subfieldSelect">
977 <xsl:with-param name="codes">b</xsl:with-param>
978 </xsl:call-template>-->
984 <xsl:template name="chopBrackets">
985 <xsl:param name="chopString"></xsl:param>
986 <xsl:variable name="string">
987 <xsl:call-template name="chopPunctuation">
988 <xsl:with-param name="chopString" select="$chopString"></xsl:with-param>
991 <xsl:if test="substring($string, 1,1)='['">
992 <xsl:value-of select="substring($string,2, string-length($string)-2)"></xsl:value-of>
994 <xsl:if test="substring($string, 1,1)!='['">
995 <xsl:value-of select="$string"></xsl:value-of>