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 exclude-result-prefixes="marc items">
11 <xsl:import href="UNIMARCslimUtils.xsl"/>
12 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
13 <xsl:template match="/">
14 <xsl:apply-templates/>
17 <xsl:template match="marc:record">
18 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='Display856uAsImage']"/>
19 <xsl:variable name="leader" select="marc:leader"/>
20 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
21 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
22 <xsl:variable name="biblionumber" select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/>
25 <xsl:if test="marc:datafield[@tag=200]">
26 <xsl:for-each select="marc:datafield[@tag=200]">
28 <xsl:call-template name="addClassRtl" />
29 <xsl:variable name="title" select="marc:subfield[@code='a']"/>
30 <xsl:variable name="ntitle"
31 select="translate($title, '˜œ슜슛슘슈슉','')"/>
32 <xsl:value-of select="$ntitle" />
33 <xsl:if test="marc:subfield[@code='e']">
34 <xsl:text> : </xsl:text>
35 <xsl:for-each select="marc:subfield[@code='e']">
36 <xsl:value-of select="."/>
39 <xsl:if test="marc:subfield[@code='b']">
40 <xsl:text> [</xsl:text>
41 <xsl:value-of select="marc:subfield[@code='b']"/>
42 <xsl:text>]</xsl:text>
44 <xsl:if test="marc:subfield[@code='f']">
45 <xsl:text> / </xsl:text>
46 <xsl:value-of select="marc:subfield[@code='f']"/>
48 <xsl:if test="marc:subfield[@code='g']">
49 <xsl:text> ; </xsl:text>
50 <xsl:value-of select="marc:subfield[@code='g']"/>
55 <xsl:call-template name="tag_4xx" />
57 <xsl:call-template name="tag_7xx">
58 <xsl:with-param name="tag">700</xsl:with-param>
59 <xsl:with-param name="label">Main Author</xsl:with-param>
62 <xsl:call-template name="tag_7xx">
63 <xsl:with-param name="tag">710</xsl:with-param>
64 <xsl:with-param name="label">Corporate Author (Main)</xsl:with-param>
67 <xsl:call-template name="tag_7xx">
68 <xsl:with-param name="tag">701</xsl:with-param>
69 <xsl:with-param name="label">Coauthor</xsl:with-param>
72 <xsl:call-template name="tag_7xx">
73 <xsl:with-param name="tag">702</xsl:with-param>
74 <xsl:with-param name="label">Secondary Author</xsl:with-param>
77 <xsl:call-template name="tag_7xx">
78 <xsl:with-param name="tag">711</xsl:with-param>
79 <xsl:with-param name="label">Corporate Author (Coauthor)</xsl:with-param>
82 <xsl:call-template name="tag_7xx">
83 <xsl:with-param name="tag">712</xsl:with-param>
84 <xsl:with-param name="label">Corporate Author (Secondary)</xsl:with-param>
87 <xsl:if test="marc:datafield[@tag=101]">
89 <strong>Language: </strong>
90 <xsl:for-each select="marc:datafield[@tag=101]">
91 <xsl:for-each select="marc:subfield">
93 <xsl:when test="@code='b'">of intermediate text, </xsl:when>
94 <xsl:when test="@code='c'">of original work, </xsl:when>
95 <xsl:when test="@code='d'">of summary, </xsl:when>
96 <xsl:when test="@code='e'">of contents page, </xsl:when>
97 <xsl:when test="@code='f'">of title page, </xsl:when>
98 <xsl:when test="@code='g'">of title proper, </xsl:when>
99 <xsl:when test="@code='h'">of libretto, </xsl:when>
100 <xsl:when test="@code='i'">of accompanying material, </xsl:when>
101 <xsl:when test="@code='j'">of subtitles, </xsl:when>n>
103 <xsl:value-of select="text()"/>
105 <xsl:when test="position()=last()">
106 <xsl:text>.</xsl:text>
109 <xsl:text> ; </xsl:text>
117 <xsl:if test="marc:datafield[@tag=102]">
119 <strong>Country: </strong>
120 <xsl:for-each select="marc:datafield[@tag=102]">
121 <xsl:for-each select="marc:subfield">
122 <xsl:value-of select="text()"/>
124 <xsl:when test="position()=last()">
125 <xsl:text>.</xsl:text>
127 <xsl:otherwise><xsl:text>, </xsl:text>
135 <xsl:call-template name="tag_210" />
137 <xsl:call-template name="tag_215" />
139 <xsl:if test="marc:controlfield[@tag=009]">
140 <li><strong>Tag 009: </strong>
141 <xsl:value-of select="marc:controlfield[@tag=009]"/>
146 <xsl:if test="marc:datafield[@tag=010]/marc:subfield[@code='a']">
147 <li><strong>ISBN: </strong>
148 <xsl:for-each select="marc:datafield[@tag=010]/marc:subfield[@code='a']">
149 <span property="isbn">
150 <xsl:value-of select="."/>
152 <xsl:when test="position()=last()">
153 <xsl:text>.</xsl:text>
156 <xsl:text>; </xsl:text>
165 <xsl:if test="marc:datafield[@tag=011]/marc:subfield[@code='a']">
167 <strong>ISSN: </strong>
168 <xsl:for-each select="marc:datafield[@tag=011]/marc:subfield[@code='a']">
169 <span property="issn">
170 <xsl:value-of select="."/>
172 <xsl:when test="position()=last()">
173 <xsl:text>.</xsl:text>
176 <xsl:text>; </xsl:text>
184 <xsl:call-template name="tag_title">
185 <xsl:with-param name="tag">225</xsl:with-param>
186 <xsl:with-param name="label">Series</xsl:with-param>
189 <xsl:if test="marc:datafield[@tag=676]">
191 <strong>Dewey: </strong>
192 <xsl:for-each select="marc:datafield[@tag=676]">
193 <xsl:value-of select="marc:subfield[@code='a']"/>
194 <xsl:if test="marc:subfield[@code='v']">
195 <xsl:text>, </xsl:text>
196 <xsl:value-of select="marc:subfield[@code='v']"/>
198 <xsl:if test="marc:subfield[@code='z']">
199 <xsl:text>, </xsl:text>
200 <xsl:value-of select="marc:subfield[@code='z']"/>
202 <xsl:if test="not (position()=last())">
203 <xsl:text> ; </xsl:text>
209 <xsl:if test="marc:datafield[@tag=686]">
211 <strong>Classification: </strong>
212 <xsl:for-each select="marc:datafield[@tag=686]">
213 <xsl:value-of select="marc:subfield[@code='a']"/>
214 <xsl:if test="marc:subfield[@code='b']">
215 <xsl:text>, </xsl:text>
216 <xsl:value-of select="marc:subfield[@code='b']"/>
218 <xsl:if test="marc:subfield[@code='c']">
219 <xsl:text>, </xsl:text>
220 <xsl:value-of select="marc:subfield[@code='c']"/>
222 <xsl:if test="not (position()=last())"><xsl:text> ; </xsl:text></xsl:if>
227 <xsl:if test="marc:datafield[@tag=327]">
229 <strong>Contents note: </strong>
230 <xsl:for-each select="marc:datafield[@tag=327]">
231 <xsl:call-template name="chopPunctuation">
232 <xsl:with-param name="chopString">
233 <xsl:call-template name="subfieldSelect">
234 <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
235 <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
236 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
244 <xsl:if test="marc:datafield[@tag=330]">
246 <strong>Abstract: </strong>
247 <xsl:for-each select="marc:datafield[@tag=330]">
248 <xsl:value-of select="marc:subfield[@code='a']"/>
250 <xsl:when test="position()=last()">
251 <xsl:text>.</xsl:text>
254 <xsl:text>; </xsl:text>
261 <xsl:if test="marc:datafield[@tag=317]">
263 <strong>Provenance note: </strong>
264 <xsl:for-each select="marc:datafield[@tag=317]">
265 <xsl:value-of select="marc:subfield[@code='a']"/>
270 <xsl:if test="marc:datafield[@tag=320]">
272 <strong>Bibliography: </strong>
273 <xsl:for-each select="marc:datafield[@tag=320]">
274 <xsl:value-of select="marc:subfield[@code='a']"/>
275 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
280 <xsl:if test="marc:datafield[@tag=328]">
282 <strong>Thesis: </strong>
283 <xsl:for-each select="marc:datafield[@tag=328]">
284 <xsl:value-of select="marc:subfield[@code='a']"/>
285 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
290 <xsl:if test="marc:datafield[@tag=333]">
292 <strong>Audience: </strong>
293 <xsl:for-each select="marc:datafield[@tag=333]">
294 <xsl:value-of select="marc:subfield[@code='a']"/>
295 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
300 <xsl:if test="marc:datafield[@tag=955]">
302 <strong>SUDOC serial history: </strong>
303 <xsl:for-each select="marc:datafield[@tag=955]">
304 <xsl:value-of select="marc:subfield[@code='9']"/>:
305 <xsl:value-of select="marc:subfield[@code='r']"/>
306 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
311 <xsl:call-template name="tag_subject">
312 <xsl:with-param name="tag">600</xsl:with-param>
313 <xsl:with-param name="label">Subject - Personal Name</xsl:with-param>
316 <xsl:call-template name="tag_subject">
317 <xsl:with-param name="tag">601</xsl:with-param>
318 <xsl:with-param name="label">Subject - Corporate Author</xsl:with-param>
321 <xsl:call-template name="tag_subject">
322 <xsl:with-param name="tag">602</xsl:with-param>
323 <xsl:with-param name="label">Subject - Family</xsl:with-param>
326 <xsl:call-template name="tag_subject">
327 <xsl:with-param name="tag">604</xsl:with-param>
328 <xsl:with-param name="label">Subject - Author/Title</xsl:with-param>
331 <xsl:call-template name="tag_subject">
332 <xsl:with-param name="tag">606</xsl:with-param>
333 <xsl:with-param name="label">Subject - Topical Name</xsl:with-param>
336 <xsl:call-template name="tag_subject">
337 <xsl:with-param name="tag">607</xsl:with-param>
338 <xsl:with-param name="label">Subject - Geographical Name</xsl:with-param>
341 <xsl:call-template name="tag_subject">
342 <xsl:with-param name="tag">608</xsl:with-param>
343 <xsl:with-param name="label">Subject - Form</xsl:with-param>
346 <xsl:call-template name="tag_subject">
347 <xsl:with-param name="tag">610</xsl:with-param>
348 <xsl:with-param name="label">Subject</xsl:with-param>
351 <xsl:call-template name="tag_subject">
352 <xsl:with-param name="tag">615</xsl:with-param>
353 <xsl:with-param name="label">Subject Category</xsl:with-param>
356 <xsl:call-template name="tag_subject">
357 <xsl:with-param name="tag">616</xsl:with-param>
358 <xsl:with-param name="label">Trademark</xsl:with-param>
361 <xsl:if test="marc:datafield[@tag=856]">
363 <strong>Online Resources: </strong>
364 <xsl:for-each select="marc:datafield[@tag=856]">
365 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
367 <xsl:attribute name="href">
368 <xsl:value-of select="marc:subfield[@code='u']"/>
371 <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')">
372 <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>
374 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
375 <xsl:call-template name="subfieldSelect">
376 <xsl:with-param name="codes">y3z</xsl:with-param>
379 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
380 Click here to access online
385 <xsl:when test="position()=last()"></xsl:when>
386 <xsl:otherwise> | </xsl:otherwise>
393 <xsl:template name="nameABCDQ">
394 <xsl:call-template name="chopPunctuation">
395 <xsl:with-param name="chopString">
396 <xsl:call-template name="subfieldSelect">
397 <xsl:with-param name="codes">aq</xsl:with-param>
400 <xsl:with-param name="punctuation">
401 <xsl:text>:,;/ </xsl:text>
404 <xsl:call-template name="termsOfAddress"/>
407 <xsl:template name="nameABCDN">
408 <xsl:for-each select="marc:subfield[@code='a']">
409 <xsl:call-template name="chopPunctuation">
410 <xsl:with-param name="chopString" select="."/>
413 <xsl:for-each select="marc:subfield[@code='b']">
414 <xsl:value-of select="."/>
416 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
417 <xsl:call-template name="subfieldSelect">
418 <xsl:with-param name="codes">cdn</xsl:with-param>
423 <xsl:template name="nameACDEQ">
424 <xsl:call-template name="subfieldSelect">
425 <xsl:with-param name="codes">acdeq</xsl:with-param>
428 <xsl:template name="termsOfAddress">
429 <xsl:if test="marc:subfield[@code='b' or @code='c']">
430 <xsl:call-template name="chopPunctuation">
431 <xsl:with-param name="chopString">
432 <xsl:call-template name="subfieldSelect">
433 <xsl:with-param name="codes">bc</xsl:with-param>
440 <xsl:template name="part">
441 <xsl:variable name="partNumber">
442 <xsl:call-template name="specialSubfieldSelect">
443 <xsl:with-param name="axis">n</xsl:with-param>
444 <xsl:with-param name="anyCodes">n</xsl:with-param>
445 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
448 <xsl:variable name="partName">
449 <xsl:call-template name="specialSubfieldSelect">
450 <xsl:with-param name="axis">p</xsl:with-param>
451 <xsl:with-param name="anyCodes">p</xsl:with-param>
452 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
455 <xsl:if test="string-length(normalize-space($partNumber))">
456 <xsl:call-template name="chopPunctuation">
457 <xsl:with-param name="chopString" select="$partNumber"/>
460 <xsl:if test="string-length(normalize-space($partName))">
461 <xsl:call-template name="chopPunctuation">
462 <xsl:with-param name="chopString" select="$partName"/>
467 <xsl:template name="specialSubfieldSelect">
468 <xsl:param name="anyCodes"/>
469 <xsl:param name="axis"/>
470 <xsl:param name="beforeCodes"/>
471 <xsl:param name="afterCodes"/>
472 <xsl:variable name="str">
473 <xsl:for-each select="marc:subfield">
474 <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])">
475 <xsl:value-of select="text()"/>
476 <xsl:text> </xsl:text>
480 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>