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]"/>
145 <xsl:if test="marc:datafield[@tag=010]/marc:subfield[@code='a']">
146 <li><strong>ISBN: </strong>
147 <xsl:for-each select="marc:datafield[@tag=010]">
148 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
149 <xsl:value-of select="marc:subfield[@code='a']"/>
151 <xsl:when test="position()=last()">
152 <xsl:text>.</xsl:text>
155 <xsl:text> ; </xsl:text>
162 <xsl:if test="marc:datafield[@tag=011]">
164 <strong>ISSN: </strong>
165 <xsl:for-each select="marc:datafield[@tag=011]">
166 <xsl:value-of select="marc:subfield[@code='a']"/>
168 <xsl:when test="position()=last()">
169 <xsl:text>.</xsl:text>
172 <xsl:text>; </xsl:text>
179 <xsl:call-template name="tag_title">
180 <xsl:with-param name="tag">225</xsl:with-param>
181 <xsl:with-param name="label">Series</xsl:with-param>
184 <xsl:if test="marc:datafield[@tag=676]">
186 <strong>Dewey: </strong>
187 <xsl:for-each select="marc:datafield[@tag=676]">
188 <xsl:value-of select="marc:subfield[@code='a']"/>
189 <xsl:if test="marc:subfield[@code='v']">
190 <xsl:text>, </xsl:text>
191 <xsl:value-of select="marc:subfield[@code='v']"/>
193 <xsl:if test="marc:subfield[@code='z']">
194 <xsl:text>, </xsl:text>
195 <xsl:value-of select="marc:subfield[@code='z']"/>
197 <xsl:if test="not (position()=last())">
198 <xsl:text> ; </xsl:text>
204 <xsl:if test="marc:datafield[@tag=686]">
206 <strong>Classification: </strong>
207 <xsl:for-each select="marc:datafield[@tag=686]">
208 <xsl:value-of select="marc:subfield[@code='a']"/>
209 <xsl:if test="marc:subfield[@code='b']">
210 <xsl:text>, </xsl:text>
211 <xsl:value-of select="marc:subfield[@code='b']"/>
213 <xsl:if test="marc:subfield[@code='c']">
214 <xsl:text>, </xsl:text>
215 <xsl:value-of select="marc:subfield[@code='c']"/>
217 <xsl:if test="not (position()=last())"><xsl:text> ; </xsl:text></xsl:if>
222 <xsl:if test="marc:datafield[@tag=327]">
224 <strong>Contents note: </strong>
225 <xsl:for-each select="marc:datafield[@tag=327]">
226 <xsl:call-template name="chopPunctuation">
227 <xsl:with-param name="chopString">
228 <xsl:call-template name="subfieldSelect">
229 <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
230 <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
231 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
239 <xsl:if test="marc:datafield[@tag=330]">
241 <strong>Abstract: </strong>
242 <xsl:for-each select="marc:datafield[@tag=330]">
243 <xsl:value-of select="marc:subfield[@code='a']"/>
245 <xsl:when test="position()=last()">
246 <xsl:text>.</xsl:text>
249 <xsl:text>; </xsl:text>
256 <xsl:if test="marc:datafield[@tag=317]">
258 <strong>Provenance note: </strong>
259 <xsl:for-each select="marc:datafield[@tag=317]">
260 <xsl:value-of select="marc:subfield[@code='a']"/>
265 <xsl:if test="marc:datafield[@tag=320]">
267 <strong>Bibliography: </strong>
268 <xsl:for-each select="marc:datafield[@tag=320]">
269 <xsl:value-of select="marc:subfield[@code='a']"/>
270 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
275 <xsl:if test="marc:datafield[@tag=328]">
277 <strong>Thesis: </strong>
278 <xsl:for-each select="marc:datafield[@tag=328]">
279 <xsl:value-of select="marc:subfield[@code='a']"/>
280 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
285 <xsl:if test="marc:datafield[@tag=333]">
287 <strong>Audience: </strong>
288 <xsl:for-each select="marc:datafield[@tag=333]">
289 <xsl:value-of select="marc:subfield[@code='a']"/>
290 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
295 <xsl:if test="marc:datafield[@tag=955]">
297 <strong>SUDOC serial history: </strong>
298 <xsl:for-each select="marc:datafield[@tag=955]">
299 <xsl:value-of select="marc:subfield[@code='9']"/>:
300 <xsl:value-of select="marc:subfield[@code='r']"/>
301 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
306 <xsl:call-template name="tag_subject">
307 <xsl:with-param name="tag">600</xsl:with-param>
308 <xsl:with-param name="label">Subject - Personal Name</xsl:with-param>
311 <xsl:call-template name="tag_subject">
312 <xsl:with-param name="tag">601</xsl:with-param>
313 <xsl:with-param name="label">Subject - Corporate Author</xsl:with-param>
316 <xsl:call-template name="tag_subject">
317 <xsl:with-param name="tag">602</xsl:with-param>
318 <xsl:with-param name="label">Subject - Family</xsl:with-param>
321 <xsl:call-template name="tag_subject">
322 <xsl:with-param name="tag">604</xsl:with-param>
323 <xsl:with-param name="label">Subject - Author/Title</xsl:with-param>
326 <xsl:call-template name="tag_subject">
327 <xsl:with-param name="tag">606</xsl:with-param>
328 <xsl:with-param name="label">Subject - Topical Name</xsl:with-param>
331 <xsl:call-template name="tag_subject">
332 <xsl:with-param name="tag">607</xsl:with-param>
333 <xsl:with-param name="label">Subject - Geographical Name</xsl:with-param>
336 <xsl:call-template name="tag_subject">
337 <xsl:with-param name="tag">608</xsl:with-param>
338 <xsl:with-param name="label">Subject - Form</xsl:with-param>
341 <xsl:call-template name="tag_subject">
342 <xsl:with-param name="tag">610</xsl:with-param>
343 <xsl:with-param name="label">Subject</xsl:with-param>
346 <xsl:call-template name="tag_subject">
347 <xsl:with-param name="tag">615</xsl:with-param>
348 <xsl:with-param name="label">Subject Category</xsl:with-param>
351 <xsl:call-template name="tag_subject">
352 <xsl:with-param name="tag">616</xsl:with-param>
353 <xsl:with-param name="label">Trademark</xsl:with-param>
356 <xsl:if test="marc:datafield[@tag=856]">
358 <strong>Online Resources: </strong>
359 <xsl:for-each select="marc:datafield[@tag=856]">
360 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
362 <xsl:attribute name="href">
363 <xsl:value-of select="marc:subfield[@code='u']"/>
366 <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')">
367 <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>
369 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
370 <xsl:call-template name="subfieldSelect">
371 <xsl:with-param name="codes">y3z</xsl:with-param>
374 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
375 Click here to access online
380 <xsl:when test="position()=last()"></xsl:when>
381 <xsl:otherwise> | </xsl:otherwise>
388 <xsl:template name="nameABCDQ">
389 <xsl:call-template name="chopPunctuation">
390 <xsl:with-param name="chopString">
391 <xsl:call-template name="subfieldSelect">
392 <xsl:with-param name="codes">aq</xsl:with-param>
395 <xsl:with-param name="punctuation">
396 <xsl:text>:,;/ </xsl:text>
399 <xsl:call-template name="termsOfAddress"/>
402 <xsl:template name="nameABCDN">
403 <xsl:for-each select="marc:subfield[@code='a']">
404 <xsl:call-template name="chopPunctuation">
405 <xsl:with-param name="chopString" select="."/>
408 <xsl:for-each select="marc:subfield[@code='b']">
409 <xsl:value-of select="."/>
411 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
412 <xsl:call-template name="subfieldSelect">
413 <xsl:with-param name="codes">cdn</xsl:with-param>
418 <xsl:template name="nameACDEQ">
419 <xsl:call-template name="subfieldSelect">
420 <xsl:with-param name="codes">acdeq</xsl:with-param>
423 <xsl:template name="termsOfAddress">
424 <xsl:if test="marc:subfield[@code='b' or @code='c']">
425 <xsl:call-template name="chopPunctuation">
426 <xsl:with-param name="chopString">
427 <xsl:call-template name="subfieldSelect">
428 <xsl:with-param name="codes">bc</xsl:with-param>
435 <xsl:template name="part">
436 <xsl:variable name="partNumber">
437 <xsl:call-template name="specialSubfieldSelect">
438 <xsl:with-param name="axis">n</xsl:with-param>
439 <xsl:with-param name="anyCodes">n</xsl:with-param>
440 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
443 <xsl:variable name="partName">
444 <xsl:call-template name="specialSubfieldSelect">
445 <xsl:with-param name="axis">p</xsl:with-param>
446 <xsl:with-param name="anyCodes">p</xsl:with-param>
447 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
450 <xsl:if test="string-length(normalize-space($partNumber))">
451 <xsl:call-template name="chopPunctuation">
452 <xsl:with-param name="chopString" select="$partNumber"/>
455 <xsl:if test="string-length(normalize-space($partName))">
456 <xsl:call-template name="chopPunctuation">
457 <xsl:with-param name="chopString" select="$partName"/>
462 <xsl:template name="specialSubfieldSelect">
463 <xsl:param name="anyCodes"/>
464 <xsl:param name="axis"/>
465 <xsl:param name="beforeCodes"/>
466 <xsl:param name="afterCodes"/>
467 <xsl:variable name="str">
468 <xsl:for-each select="marc:subfield">
469 <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])">
470 <xsl:value-of select="text()"/>
471 <xsl:text> </xsl:text>
475 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>