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>
163 <xsl:if test="marc:datafield[@tag=011]/marc:subfield[@code='a']">
165 <strong>ISSN: </strong>
166 <xsl:for-each select="marc:datafield[@tag=011]/marc:subfield[@code='a']">
167 <span property="issn">
168 <xsl:value-of select="."/>
170 <xsl:when test="position()=last()">
171 <xsl:text>.</xsl:text>
174 <xsl:text>; </xsl:text>
182 <xsl:call-template name="tag_title">
183 <xsl:with-param name="tag">225</xsl:with-param>
184 <xsl:with-param name="label">Series</xsl:with-param>
187 <xsl:if test="marc:datafield[@tag=676]">
189 <strong>Dewey: </strong>
190 <xsl:for-each select="marc:datafield[@tag=676]">
191 <xsl:value-of select="marc:subfield[@code='a']"/>
192 <xsl:if test="marc:subfield[@code='v']">
193 <xsl:text>, </xsl:text>
194 <xsl:value-of select="marc:subfield[@code='v']"/>
196 <xsl:if test="marc:subfield[@code='z']">
197 <xsl:text>, </xsl:text>
198 <xsl:value-of select="marc:subfield[@code='z']"/>
200 <xsl:if test="not (position()=last())">
201 <xsl:text> ; </xsl:text>
207 <xsl:if test="marc:datafield[@tag=686]">
209 <strong>Classification: </strong>
210 <xsl:for-each select="marc:datafield[@tag=686]">
211 <xsl:value-of select="marc:subfield[@code='a']"/>
212 <xsl:if test="marc:subfield[@code='b']">
213 <xsl:text>, </xsl:text>
214 <xsl:value-of select="marc:subfield[@code='b']"/>
216 <xsl:if test="marc:subfield[@code='c']">
217 <xsl:text>, </xsl:text>
218 <xsl:value-of select="marc:subfield[@code='c']"/>
220 <xsl:if test="not (position()=last())"><xsl:text> ; </xsl:text></xsl:if>
225 <xsl:if test="marc:datafield[@tag=327]">
227 <strong>Contents note: </strong>
228 <xsl:for-each select="marc:datafield[@tag=327]">
229 <xsl:call-template name="chopPunctuation">
230 <xsl:with-param name="chopString">
231 <xsl:call-template name="subfieldSelect">
232 <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
233 <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
234 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
242 <xsl:if test="marc:datafield[@tag=330]">
244 <strong>Abstract: </strong>
245 <xsl:for-each select="marc:datafield[@tag=330]">
246 <xsl:value-of select="marc:subfield[@code='a']"/>
248 <xsl:when test="position()=last()">
249 <xsl:text>.</xsl:text>
252 <xsl:text>; </xsl:text>
259 <xsl:if test="marc:datafield[@tag=317]">
261 <strong>Provenance note: </strong>
262 <xsl:for-each select="marc:datafield[@tag=317]">
263 <xsl:value-of select="marc:subfield[@code='a']"/>
268 <xsl:if test="marc:datafield[@tag=320]">
270 <strong>Bibliography: </strong>
271 <xsl:for-each select="marc:datafield[@tag=320]">
272 <xsl:value-of select="marc:subfield[@code='a']"/>
273 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
278 <xsl:if test="marc:datafield[@tag=328]">
280 <strong>Thesis: </strong>
281 <xsl:for-each select="marc:datafield[@tag=328]">
282 <xsl:value-of select="marc:subfield[@code='a']"/>
283 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
288 <xsl:if test="marc:datafield[@tag=333]">
290 <strong>Audience: </strong>
291 <xsl:for-each select="marc:datafield[@tag=333]">
292 <xsl:value-of select="marc:subfield[@code='a']"/>
293 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
298 <xsl:if test="marc:datafield[@tag=955]">
300 <strong>SUDOC serial history: </strong>
301 <xsl:for-each select="marc:datafield[@tag=955]">
302 <xsl:value-of select="marc:subfield[@code='9']"/>:
303 <xsl:value-of select="marc:subfield[@code='r']"/>
304 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
309 <xsl:call-template name="tag_subject">
310 <xsl:with-param name="tag">600</xsl:with-param>
311 <xsl:with-param name="label">Subject - Personal Name</xsl:with-param>
314 <xsl:call-template name="tag_subject">
315 <xsl:with-param name="tag">601</xsl:with-param>
316 <xsl:with-param name="label">Subject - Corporate Author</xsl:with-param>
319 <xsl:call-template name="tag_subject">
320 <xsl:with-param name="tag">602</xsl:with-param>
321 <xsl:with-param name="label">Subject - Family</xsl:with-param>
324 <xsl:call-template name="tag_subject">
325 <xsl:with-param name="tag">604</xsl:with-param>
326 <xsl:with-param name="label">Subject - Author/Title</xsl:with-param>
329 <xsl:call-template name="tag_subject">
330 <xsl:with-param name="tag">606</xsl:with-param>
331 <xsl:with-param name="label">Subject - Topical Name</xsl:with-param>
334 <xsl:call-template name="tag_subject">
335 <xsl:with-param name="tag">607</xsl:with-param>
336 <xsl:with-param name="label">Subject - Geographical Name</xsl:with-param>
339 <xsl:call-template name="tag_subject">
340 <xsl:with-param name="tag">608</xsl:with-param>
341 <xsl:with-param name="label">Subject - Form</xsl:with-param>
344 <xsl:call-template name="tag_subject">
345 <xsl:with-param name="tag">610</xsl:with-param>
346 <xsl:with-param name="label">Subject</xsl:with-param>
349 <xsl:call-template name="tag_subject">
350 <xsl:with-param name="tag">615</xsl:with-param>
351 <xsl:with-param name="label">Subject Category</xsl:with-param>
354 <xsl:call-template name="tag_subject">
355 <xsl:with-param name="tag">616</xsl:with-param>
356 <xsl:with-param name="label">Trademark</xsl:with-param>
359 <xsl:if test="marc:datafield[@tag=856]">
361 <strong>Online Resources: </strong>
362 <xsl:for-each select="marc:datafield[@tag=856]">
363 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
365 <xsl:attribute name="href">
366 <xsl:value-of select="marc:subfield[@code='u']"/>
369 <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')">
370 <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>
372 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
373 <xsl:call-template name="subfieldSelect">
374 <xsl:with-param name="codes">y3z</xsl:with-param>
377 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
378 Click here to access online
383 <xsl:when test="position()=last()"></xsl:when>
384 <xsl:otherwise> | </xsl:otherwise>
391 <xsl:template name="nameABCDQ">
392 <xsl:call-template name="chopPunctuation">
393 <xsl:with-param name="chopString">
394 <xsl:call-template name="subfieldSelect">
395 <xsl:with-param name="codes">aq</xsl:with-param>
398 <xsl:with-param name="punctuation">
399 <xsl:text>:,;/ </xsl:text>
402 <xsl:call-template name="termsOfAddress"/>
405 <xsl:template name="nameABCDN">
406 <xsl:for-each select="marc:subfield[@code='a']">
407 <xsl:call-template name="chopPunctuation">
408 <xsl:with-param name="chopString" select="."/>
411 <xsl:for-each select="marc:subfield[@code='b']">
412 <xsl:value-of select="."/>
414 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
415 <xsl:call-template name="subfieldSelect">
416 <xsl:with-param name="codes">cdn</xsl:with-param>
421 <xsl:template name="nameACDEQ">
422 <xsl:call-template name="subfieldSelect">
423 <xsl:with-param name="codes">acdeq</xsl:with-param>
426 <xsl:template name="termsOfAddress">
427 <xsl:if test="marc:subfield[@code='b' or @code='c']">
428 <xsl:call-template name="chopPunctuation">
429 <xsl:with-param name="chopString">
430 <xsl:call-template name="subfieldSelect">
431 <xsl:with-param name="codes">bc</xsl:with-param>
438 <xsl:template name="part">
439 <xsl:variable name="partNumber">
440 <xsl:call-template name="specialSubfieldSelect">
441 <xsl:with-param name="axis">n</xsl:with-param>
442 <xsl:with-param name="anyCodes">n</xsl:with-param>
443 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
446 <xsl:variable name="partName">
447 <xsl:call-template name="specialSubfieldSelect">
448 <xsl:with-param name="axis">p</xsl:with-param>
449 <xsl:with-param name="anyCodes">p</xsl:with-param>
450 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
453 <xsl:if test="string-length(normalize-space($partNumber))">
454 <xsl:call-template name="chopPunctuation">
455 <xsl:with-param name="chopString" select="$partNumber"/>
458 <xsl:if test="string-length(normalize-space($partName))">
459 <xsl:call-template name="chopPunctuation">
460 <xsl:with-param name="chopString" select="$partName"/>
465 <xsl:template name="specialSubfieldSelect">
466 <xsl:param name="anyCodes"/>
467 <xsl:param name="axis"/>
468 <xsl:param name="beforeCodes"/>
469 <xsl:param name="afterCodes"/>
470 <xsl:variable name="str">
471 <xsl:for-each select="marc:subfield">
472 <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])">
473 <xsl:value-of select="text()"/>
474 <xsl:text> </xsl:text>
478 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>