1 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <xsl:stylesheet version="1.0"
6 xmlns:marc="http://www.loc.gov/MARC21/slim"
7 xmlns:items="http://www.koha-community.org/items"
8 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns:str="http://exslt.org/strings"
10 exclude-result-prefixes="marc items str">
12 <xsl:import href="UNIMARCslimUtils.xsl"/>
13 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
18 <xsl:template match="marc:record">
19 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
20 <xsl:variable name="leader" select="marc:leader"/>
21 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
22 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
23 <xsl:variable name="biblionumber" select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/>
26 <xsl:if test="marc:datafield[@tag=200]">
27 <xsl:for-each select="marc:datafield[@tag=200]">
29 <xsl:call-template name="addClassRtl" />
30 <xsl:variable name="title" select="marc:subfield[@code='a']"/>
31 <xsl:variable name="ntitle"
32 select="translate($title, '˜œ슜슛슘슈슉','')"/>
33 <xsl:value-of select="$ntitle" />
34 <xsl:if test="marc:subfield[@code='e']">
35 <xsl:text> : </xsl:text>
36 <xsl:for-each select="marc:subfield[@code='e']">
37 <xsl:value-of select="."/>
40 <xsl:if test="marc:subfield[@code='b']">
41 <xsl:text> [</xsl:text>
42 <xsl:value-of select="marc:subfield[@code='b']"/>
43 <xsl:text>]</xsl:text>
45 <xsl:if test="marc:subfield[@code='f']">
46 <xsl:text> / </xsl:text>
47 <xsl:value-of select="marc:subfield[@code='f']"/>
49 <xsl:if test="marc:subfield[@code='g']">
50 <xsl:text> ; </xsl:text>
51 <xsl:value-of select="marc:subfield[@code='g']"/>
56 <xsl:call-template name="tag_4xx" />
58 <xsl:call-template name="tag_7xx">
59 <xsl:with-param name="tag">700</xsl:with-param>
60 <xsl:with-param name="label">Main Author</xsl:with-param>
63 <xsl:call-template name="tag_7xx">
64 <xsl:with-param name="tag">710</xsl:with-param>
65 <xsl:with-param name="label">Corporate Author (Main)</xsl:with-param>
68 <xsl:call-template name="tag_7xx">
69 <xsl:with-param name="tag">701</xsl:with-param>
70 <xsl:with-param name="label">Coauthor</xsl:with-param>
73 <xsl:call-template name="tag_7xx">
74 <xsl:with-param name="tag">702</xsl:with-param>
75 <xsl:with-param name="label">Secondary Author</xsl:with-param>
78 <xsl:call-template name="tag_7xx">
79 <xsl:with-param name="tag">711</xsl:with-param>
80 <xsl:with-param name="label">Corporate Author (Coauthor)</xsl:with-param>
83 <xsl:call-template name="tag_7xx">
84 <xsl:with-param name="tag">712</xsl:with-param>
85 <xsl:with-param name="label">Corporate Author (Secondary)</xsl:with-param>
88 <xsl:if test="marc:datafield[@tag=101]">
90 <strong>Language: </strong>
91 <xsl:for-each select="marc:datafield[@tag=101]">
92 <xsl:for-each select="marc:subfield">
94 <xsl:when test="@code='b'">of intermediate text, </xsl:when>
95 <xsl:when test="@code='c'">of original work, </xsl:when>
96 <xsl:when test="@code='d'">of summary, </xsl:when>
97 <xsl:when test="@code='e'">of contents page, </xsl:when>
98 <xsl:when test="@code='f'">of title page, </xsl:when>
99 <xsl:when test="@code='g'">of title proper, </xsl:when>
100 <xsl:when test="@code='h'">of libretto, </xsl:when>
101 <xsl:when test="@code='i'">of accompanying material, </xsl:when>
102 <xsl:when test="@code='j'">of subtitles, </xsl:when>n>
104 <xsl:value-of select="text()"/>
106 <xsl:when test="position()=last()">
107 <xsl:text>.</xsl:text>
110 <xsl:text> ; </xsl:text>
118 <xsl:if test="marc:datafield[@tag=102]">
120 <strong>Country: </strong>
121 <xsl:for-each select="marc:datafield[@tag=102]">
122 <xsl:for-each select="marc:subfield">
123 <xsl:value-of select="text()"/>
125 <xsl:when test="position()=last()">
126 <xsl:text>.</xsl:text>
128 <xsl:otherwise><xsl:text>, </xsl:text>
136 <xsl:call-template name="tag_210" />
138 <xsl:call-template name="tag_215" />
140 <xsl:if test="marc:controlfield[@tag=009]">
141 <li><strong>Tag 009: </strong>
142 <xsl:value-of select="marc:controlfield[@tag=009]"/>
147 <xsl:if test="marc:datafield[@tag=010]/marc:subfield[@code='a']">
148 <li><strong>ISBN: </strong>
149 <xsl:for-each select="marc:datafield[@tag=010]/marc:subfield[@code='a']">
150 <span property="isbn">
151 <xsl:value-of select="."/>
153 <xsl:when test="position()=last()">
154 <xsl:text>.</xsl:text>
157 <xsl:text>; </xsl:text>
166 <xsl:if test="marc:datafield[@tag=011]/marc:subfield[@code='a']">
168 <strong>ISSN: </strong>
169 <xsl:for-each select="marc:datafield[@tag=011]/marc:subfield[@code='a']">
170 <span property="issn">
171 <xsl:value-of select="."/>
173 <xsl:when test="position()=last()">
174 <xsl:text>.</xsl:text>
177 <xsl:text>; </xsl:text>
185 <xsl:call-template name="tag_title">
186 <xsl:with-param name="tag">225</xsl:with-param>
187 <xsl:with-param name="label">Series</xsl:with-param>
190 <xsl:if test="marc:datafield[@tag=676]">
192 <strong>Dewey: </strong>
193 <xsl:for-each select="marc:datafield[@tag=676]">
194 <xsl:value-of select="marc:subfield[@code='a']"/>
195 <xsl:if test="marc:subfield[@code='v']">
196 <xsl:text>, </xsl:text>
197 <xsl:value-of select="marc:subfield[@code='v']"/>
199 <xsl:if test="marc:subfield[@code='z']">
200 <xsl:text>, </xsl:text>
201 <xsl:value-of select="marc:subfield[@code='z']"/>
203 <xsl:if test="not (position()=last())">
204 <xsl:text> ; </xsl:text>
210 <xsl:if test="marc:datafield[@tag=686]">
212 <strong>Classification: </strong>
213 <xsl:for-each select="marc:datafield[@tag=686]">
214 <xsl:value-of select="marc:subfield[@code='a']"/>
215 <xsl:if test="marc:subfield[@code='b']">
216 <xsl:text>, </xsl:text>
217 <xsl:value-of select="marc:subfield[@code='b']"/>
219 <xsl:if test="marc:subfield[@code='c']">
220 <xsl:text>, </xsl:text>
221 <xsl:value-of select="marc:subfield[@code='c']"/>
223 <xsl:if test="not (position()=last())"><xsl:text> ; </xsl:text></xsl:if>
228 <xsl:if test="marc:datafield[@tag=327]">
230 <strong>Contents note: </strong>
231 <xsl:for-each select="marc:datafield[@tag=327]">
232 <xsl:call-template name="chopPunctuation">
233 <xsl:with-param name="chopString">
234 <xsl:call-template name="subfieldSelect">
235 <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
236 <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
237 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
245 <xsl:if test="marc:datafield[@tag=330]">
247 <strong>Abstract: </strong>
248 <xsl:for-each select="marc:datafield[@tag=330]">
249 <xsl:value-of select="marc:subfield[@code='a']"/>
251 <xsl:when test="position()=last()">
252 <xsl:text>.</xsl:text>
255 <xsl:text>; </xsl:text>
262 <xsl:if test="marc:datafield[@tag=317]">
264 <strong>Provenance note: </strong>
265 <xsl:for-each select="marc:datafield[@tag=317]">
266 <xsl:value-of select="marc:subfield[@code='a']"/>
271 <xsl:if test="marc:datafield[@tag=320]">
273 <strong>Bibliography: </strong>
274 <xsl:for-each select="marc:datafield[@tag=320]">
275 <xsl:value-of select="marc:subfield[@code='a']"/>
276 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
281 <xsl:if test="marc:datafield[@tag=328]">
283 <strong>Thesis: </strong>
284 <xsl:for-each select="marc:datafield[@tag=328]">
285 <xsl:value-of select="marc:subfield[@code='a']"/>
286 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
291 <xsl:if test="marc:datafield[@tag=333]">
293 <strong>Audience: </strong>
294 <xsl:for-each select="marc:datafield[@tag=333]">
295 <xsl:value-of select="marc:subfield[@code='a']"/>
296 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
301 <xsl:if test="marc:datafield[@tag=955]">
303 <strong>SUDOC serial history: </strong>
304 <xsl:for-each select="marc:datafield[@tag=955]">
305 <xsl:value-of select="marc:subfield[@code='9']"/>:
306 <xsl:value-of select="marc:subfield[@code='r']"/>
307 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
312 <xsl:call-template name="tag_subject">
313 <xsl:with-param name="tag">600</xsl:with-param>
314 <xsl:with-param name="label">Subject - Personal Name</xsl:with-param>
317 <xsl:call-template name="tag_subject">
318 <xsl:with-param name="tag">601</xsl:with-param>
319 <xsl:with-param name="label">Subject - Corporate Author</xsl:with-param>
322 <xsl:call-template name="tag_subject">
323 <xsl:with-param name="tag">602</xsl:with-param>
324 <xsl:with-param name="label">Subject - Family</xsl:with-param>
327 <xsl:call-template name="tag_subject">
328 <xsl:with-param name="tag">604</xsl:with-param>
329 <xsl:with-param name="label">Subject - Author/Title</xsl:with-param>
332 <xsl:call-template name="tag_subject">
333 <xsl:with-param name="tag">606</xsl:with-param>
334 <xsl:with-param name="label">Subject - Topical Name</xsl:with-param>
337 <xsl:call-template name="tag_subject">
338 <xsl:with-param name="tag">607</xsl:with-param>
339 <xsl:with-param name="label">Subject - Geographical Name</xsl:with-param>
342 <xsl:call-template name="tag_subject">
343 <xsl:with-param name="tag">608</xsl:with-param>
344 <xsl:with-param name="label">Subject - Form</xsl:with-param>
347 <xsl:call-template name="tag_subject">
348 <xsl:with-param name="tag">610</xsl:with-param>
349 <xsl:with-param name="label">Subject</xsl:with-param>
352 <xsl:call-template name="tag_subject">
353 <xsl:with-param name="tag">615</xsl:with-param>
354 <xsl:with-param name="label">Subject Category</xsl:with-param>
357 <xsl:call-template name="tag_subject">
358 <xsl:with-param name="tag">616</xsl:with-param>
359 <xsl:with-param name="label">Trademark</xsl:with-param>
362 <xsl:if test="marc:datafield[@tag=856]">
364 <strong>Online Resources: </strong>
365 <xsl:for-each select="marc:datafield[@tag=856]">
366 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
368 <xsl:attribute name="href">
369 <xsl:value-of select="marc:subfield[@code='u']"/>
372 <xsl:when test="($Show856uAsImage='Details' or $Show856uAsImage='Both') and (substring($SubqText,1,6)='image/' or $SubqText='img' or $SubqText='bmp' or $SubqText='cod' or $SubqText='gif' or $SubqText='ief' or $SubqText='jpe' or $SubqText='jpeg' or $SubqText='jpg' or $SubqText='jfif' or $SubqText='png' or $SubqText='svg' or $SubqText='tif' or $SubqText='tiff' or $SubqText='ras' or $SubqText='cmx' or $SubqText='ico' or $SubqText='pnm' or $SubqText='pbm' or $SubqText='pgm' or $SubqText='ppm' or $SubqText='rgb' or $SubqText='xbm' or $SubqText='xpm' or $SubqText='xwd')">
373 <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>
375 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
376 <xsl:call-template name="subfieldSelect">
377 <xsl:with-param name="codes">y3z</xsl:with-param>
380 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
381 Click here to access online
386 <xsl:when test="position()=last()"></xsl:when>
387 <xsl:otherwise> | </xsl:otherwise>
394 <xsl:template name="nameABCDQ">
395 <xsl:call-template name="chopPunctuation">
396 <xsl:with-param name="chopString">
397 <xsl:call-template name="subfieldSelect">
398 <xsl:with-param name="codes">aq</xsl:with-param>
401 <xsl:with-param name="punctuation">
402 <xsl:text>:,;/ </xsl:text>
405 <xsl:call-template name="termsOfAddress"/>
408 <xsl:template name="nameABCDN">
409 <xsl:for-each select="marc:subfield[@code='a']">
410 <xsl:call-template name="chopPunctuation">
411 <xsl:with-param name="chopString" select="."/>
414 <xsl:for-each select="marc:subfield[@code='b']">
415 <xsl:value-of select="."/>
417 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
418 <xsl:call-template name="subfieldSelect">
419 <xsl:with-param name="codes">cdn</xsl:with-param>
424 <xsl:template name="nameACDEQ">
425 <xsl:call-template name="subfieldSelect">
426 <xsl:with-param name="codes">acdeq</xsl:with-param>
429 <xsl:template name="termsOfAddress">
430 <xsl:if test="marc:subfield[@code='b' or @code='c']">
431 <xsl:call-template name="chopPunctuation">
432 <xsl:with-param name="chopString">
433 <xsl:call-template name="subfieldSelect">
434 <xsl:with-param name="codes">bc</xsl:with-param>
441 <xsl:template name="part">
442 <xsl:variable name="partNumber">
443 <xsl:call-template name="specialSubfieldSelect">
444 <xsl:with-param name="axis">n</xsl:with-param>
445 <xsl:with-param name="anyCodes">n</xsl:with-param>
446 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
449 <xsl:variable name="partName">
450 <xsl:call-template name="specialSubfieldSelect">
451 <xsl:with-param name="axis">p</xsl:with-param>
452 <xsl:with-param name="anyCodes">p</xsl:with-param>
453 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
456 <xsl:if test="string-length(normalize-space($partNumber))">
457 <xsl:call-template name="chopPunctuation">
458 <xsl:with-param name="chopString" select="$partNumber"/>
461 <xsl:if test="string-length(normalize-space($partName))">
462 <xsl:call-template name="chopPunctuation">
463 <xsl:with-param name="chopString" select="$partName"/>
468 <xsl:template name="specialSubfieldSelect">
469 <xsl:param name="anyCodes"/>
470 <xsl:param name="axis"/>
471 <xsl:param name="beforeCodes"/>
472 <xsl:param name="afterCodes"/>
473 <xsl:variable name="str">
474 <xsl:for-each select="marc:subfield">
475 <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])">
476 <xsl:value-of select="text()"/>
477 <xsl:text> </xsl:text>
481 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>