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 = "xml" indent="yes" omit-xml-declaration = "yes" />
13 <xsl:template match="/">
14 <xsl:apply-templates/>
17 <xsl:template match="marc:record">
18 <xsl:variable name="leader" select="marc:leader"/>
19 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
20 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
21 <xsl:variable name="biblionumber" select="marc:datafield[@tag=090]/marc:subfield[@code='a']"/>
22 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']" />
23 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindo w']"/>
24 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
25 <xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
27 <xsl:if test="marc:datafield[@tag=200]">
28 <xsl:for-each select="marc:datafield[@tag=200]">
30 <xsl:call-template name="addClassRtl" />
31 <xsl:for-each select="marc:subfield">
33 <xsl:when test="@code='a'">
34 <xsl:variable name="title" select="."/>
35 <xsl:variable name="ntitle"
36 select="translate($title, 'ˆ‰˜œ','')"/>
37 <xsl:value-of select="$ntitle" />
39 <xsl:when test="@code='b'">
40 <xsl:text> [</xsl:text>
41 <xsl:value-of select="."/>
42 <xsl:text>]</xsl:text>
44 <xsl:when test="@code='d'">
45 <xsl:text> = </xsl:text>
46 <xsl:value-of select="."/>
48 <xsl:when test="@code='e'">
49 <xsl:text> : </xsl:text>
50 <xsl:value-of select="."/>
52 <xsl:when test="@code='f'">
53 <xsl:text> / </xsl:text>
54 <xsl:value-of select="."/>
56 <xsl:when test="@code='g'">
57 <xsl:text> ; </xsl:text>
58 <xsl:value-of select="."/>
61 <xsl:text>, </xsl:text>
62 <xsl:value-of select="."/>
72 <span id="Normalview">Normal View</span>
75 <a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id={marc:datafield[@tag=090]/marc:subfield[@code='a']}" title="MARC" rel="gb_page_center[600,500]">MARC View</a>
78 <a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber={marc:datafield[@tag=090]/marc:subfield[@code='a']}" title="MARC">Expanded MARC View</a>
80 <xsl:if test="$ShowISBD!='0'">
82 <a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=090]/marc:subfield[@code='a']}">Card View (ISBD)</a>
87 <xsl:call-template name="tag_title">
88 <xsl:with-param name="tag">454</xsl:with-param>
89 <xsl:with-param name="label">Translation of</xsl:with-param>
92 <xsl:call-template name="tag_title">
93 <xsl:with-param name="tag">461</xsl:with-param>
94 <xsl:with-param name="label">Set Level</xsl:with-param>
97 <xsl:call-template name="tag_title">
98 <xsl:with-param name="tag">464</xsl:with-param>
99 <xsl:with-param name="label">Piece-Analytic Level</xsl:with-param>
102 <xsl:call-template name="tag_7xx">
103 <xsl:with-param name="tag">700</xsl:with-param>
104 <xsl:with-param name="label">Main Author</xsl:with-param>
107 <xsl:call-template name="tag_7xx">
108 <xsl:with-param name="tag">710</xsl:with-param>
109 <xsl:with-param name="label">Corporate Author (Main)</xsl:with-param>
112 <xsl:call-template name="tag_7xx">
113 <xsl:with-param name="tag">701</xsl:with-param>
114 <xsl:with-param name="label">Coauthor</xsl:with-param>
117 <xsl:call-template name="tag_7xx">
118 <xsl:with-param name="tag">702</xsl:with-param>
119 <xsl:with-param name="label">Secondary Author</xsl:with-param>
122 <xsl:call-template name="tag_7xx">
123 <xsl:with-param name="tag">711</xsl:with-param>
124 <xsl:with-param name="label">Corporate Author (Coauthor)</xsl:with-param>
127 <xsl:call-template name="tag_7xx">
128 <xsl:with-param name="tag">712</xsl:with-param>
129 <xsl:with-param name="label">Corporate Author (Secondary)</xsl:with-param>
132 <xsl:call-template name="tag_title">
133 <xsl:with-param name="tag">500</xsl:with-param>
134 <xsl:with-param name="label">Uniform Title</xsl:with-param>
137 <xsl:call-template name="tag_title">
138 <xsl:with-param name="tag">503</xsl:with-param>
139 <xsl:with-param name="label">Uniform Conventional Heading</xsl:with-param>
142 <xsl:if test="marc:datafield[@tag=101]">
143 <span class="results_summary">
144 <span class="label">Language:</span>
145 <xsl:for-each select="marc:datafield[@tag=101]">
146 <xsl:for-each select="marc:subfield">
148 <xsl:when test="@code='b'">of intermediate text, </xsl:when>
149 <xsl:when test="@code='c'">of original work, </xsl:when>
150 <xsl:when test="@code='d'">of summary, </xsl:when>
151 <xsl:when test="@code='e'">of contents page, </xsl:when>
152 <xsl:when test="@code='f'">of title page, </xsl:when>
153 <xsl:when test="@code='g'">of title proper, </xsl:when>
154 <xsl:when test="@code='h'">of libretto, </xsl:when>
155 <xsl:when test="@code='i'">of accompanying material, </xsl:when>
156 <xsl:when test="@code='j'">of subtitles, </xsl:when>
158 <xsl:value-of select="text()"/>
160 <xsl:when test="position()=last()">
161 <xsl:text>.</xsl:text>
164 <xsl:text> ; </xsl:text>
172 <xsl:if test="marc:datafield[@tag=102]">
173 <span class="results_summary">
174 <span class="label">Country: </span>
175 <xsl:for-each select="marc:datafield[@tag=102]">
176 <xsl:for-each select="marc:subfield">
177 <xsl:value-of select="text()"/>
179 <xsl:when test="position()=last()">
180 <xsl:text>.</xsl:text>
182 <xsl:otherwise><xsl:text>, </xsl:text>
190 <xsl:call-template name="tag_comma">
191 <xsl:with-param name="tag">205</xsl:with-param>
192 <xsl:with-param name="label">Edition Statement</xsl:with-param>
195 <xsl:call-template name="tag_210" />
197 <xsl:call-template name="tag_215" />
199 <xsl:if test="marc:datafield[@tag=010]/marc:subfield[@code='a']">
200 <span class="results_summary"><span class="label">ISBN: </span>
201 <xsl:for-each select="marc:datafield[@tag=010]">
202 <xsl:variable name="isbn" select="marc:subfield[@code='a']"/>
203 <xsl:value-of select="marc:subfield[@code='a']"/>
205 <xsl:when test="position()=last()">
206 <xsl:text>.</xsl:text>
209 <xsl:text> ; </xsl:text>
216 <xsl:if test="marc:datafield[@tag=011]">
217 <span class="results_summary">
218 <span class="label">ISSN: </span>
219 <xsl:for-each select="marc:datafield[@tag=011]">
220 <xsl:value-of select="marc:subfield[@code='a']"/>
222 <xsl:when test="position()=last()">
223 <xsl:text>.</xsl:text>
226 <xsl:text>; </xsl:text>
233 <xsl:call-template name="tag_title">
234 <xsl:with-param name="tag">225</xsl:with-param>
235 <xsl:with-param name="label">Series</xsl:with-param>
238 <xsl:if test="marc:datafield[@tag=676]">
239 <span class="results_summary">
240 <span class="label">Dewey: </span>
241 <xsl:for-each select="marc:datafield[@tag=676]">
242 <xsl:value-of select="marc:subfield[@code='a']"/>
243 <xsl:if test="marc:subfield[@code='v']">
244 <xsl:text>, </xsl:text>
245 <xsl:value-of select="marc:subfield[@code='v']"/>
247 <xsl:if test="marc:subfield[@code='z']">
248 <xsl:text>, </xsl:text>
249 <xsl:value-of select="marc:subfield[@code='z']"/>
251 <xsl:if test="not (position()=last())">
252 <xsl:text> ; </xsl:text>
258 <xsl:if test="marc:datafield[@tag=686]">
259 <span class="results_summary">
260 <span class="label">Classification: </span>
261 <xsl:for-each select="marc:datafield[@tag=686]">
262 <xsl:value-of select="marc:subfield[@code='a']"/>
263 <xsl:if test="marc:subfield[@code='b']">
264 <xsl:text>, </xsl:text>
265 <xsl:value-of select="marc:subfield[@code='b']"/>
267 <xsl:if test="marc:subfield[@code='c']">
268 <xsl:text>, </xsl:text>
269 <xsl:value-of select="marc:subfield[@code='c']"/>
271 <xsl:if test="not (position()=last())"><xsl:text> ; </xsl:text></xsl:if>
276 <xsl:if test="marc:datafield[@tag=327]">
277 <span class="results_summary">
278 <span class="label">Contents note: </span>
279 <xsl:for-each select="marc:datafield[@tag=327]">
280 <xsl:call-template name="chopPunctuation">
281 <xsl:with-param name="chopString">
282 <xsl:call-template name="subfieldSelect">
283 <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
284 <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
285 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
293 <xsl:if test="marc:datafield[@tag=330]">
294 <span class="results_summary">
295 <span class="label">Abstract: </span>
296 <xsl:for-each select="marc:datafield[@tag=330]">
297 <xsl:value-of select="marc:subfield[@code='a']"/>
299 <xsl:when test="position()=last()">
300 <xsl:text>.</xsl:text>
303 <xsl:text>; </xsl:text>
310 <xsl:if test="marc:datafield[@tag=317]">
311 <span class="results_summary">
312 <span class="label">Provenance note: </span>
313 <xsl:for-each select="marc:datafield[@tag=317]">
314 <xsl:value-of select="marc:subfield[@code='a']"/>
319 <xsl:if test="marc:datafield[@tag=320]">
320 <span class="results_summary">
321 <span class="label">Bibliography: </span>
322 <xsl:for-each select="marc:datafield[@tag=320]">
323 <xsl:value-of select="marc:subfield[@code='a']"/>
324 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
329 <xsl:if test="marc:datafield[@tag=328]">
330 <span class="results_summary">
331 <span class="label">Thesis: </span>
332 <xsl:for-each select="marc:datafield[@tag=328]">
333 <xsl:value-of select="marc:subfield[@code='a']"/>
334 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
339 <xsl:if test="marc:datafield[@tag=333]">
340 <span class="results_summary">
341 <span class="label">Audience: </span>
342 <xsl:for-each select="marc:datafield[@tag=333]">
343 <xsl:value-of select="marc:subfield[@code='a']"/>
344 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
349 <xsl:if test="marc:datafield[@tag=955]">
350 <span class="results_summary">
351 <span class="label">SUDOC serial history: </span>
352 <xsl:for-each select="marc:datafield[@tag=955]">
353 <xsl:value-of select="marc:subfield[@code='9']"/>:
354 <xsl:value-of select="marc:subfield[@code='r']"/>
355 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
360 <xsl:call-template name="tag_subject">
361 <xsl:with-param name="tag">600</xsl:with-param>
362 <xsl:with-param name="label">Subject - Personal Name</xsl:with-param>
365 <xsl:call-template name="tag_subject">
366 <xsl:with-param name="tag">601</xsl:with-param>
367 <xsl:with-param name="label">Subject - Corporate Author</xsl:with-param>
370 <xsl:call-template name="tag_subject">
371 <xsl:with-param name="tag">602</xsl:with-param>
372 <xsl:with-param name="label">Subject - Family</xsl:with-param>
375 <xsl:call-template name="tag_subject">
376 <xsl:with-param name="tag">604</xsl:with-param>
377 <xsl:with-param name="label">Subject - Author/Title</xsl:with-param>
380 <xsl:call-template name="tag_subject">
381 <xsl:with-param name="tag">606</xsl:with-param>
382 <xsl:with-param name="label">Subject - Topical Name</xsl:with-param>
385 <xsl:call-template name="tag_subject">
386 <xsl:with-param name="tag">607</xsl:with-param>
387 <xsl:with-param name="label">Subject - Geographical Name</xsl:with-param>
390 <xsl:call-template name="tag_subject">
391 <xsl:with-param name="tag">608</xsl:with-param>
392 <xsl:with-param name="label">Subject - Form</xsl:with-param>
395 <xsl:call-template name="tag_subject">
396 <xsl:with-param name="tag">610</xsl:with-param>
397 <xsl:with-param name="label">Subject</xsl:with-param>
400 <xsl:call-template name="tag_subject">
401 <xsl:with-param name="tag">615</xsl:with-param>
402 <xsl:with-param name="label">Subject Category</xsl:with-param>
405 <xsl:call-template name="tag_subject">
406 <xsl:with-param name="tag">616</xsl:with-param>
407 <xsl:with-param name="label">Trademark</xsl:with-param>
410 <xsl:if test="marc:datafield[@tag=856]">
411 <span class="results_summary">
412 <span class="label">Online Resources:</span>
413 <xsl:for-each select="marc:datafield[@tag=856]">
415 <xsl:attribute name="href">
416 <xsl:value-of select="marc:subfield[@code='u']"/>
418 <xsl:if test="$OPACURLOpenInNewWindow='1'">
419 <xsl:attribute name="target">_blank</xsl:attribute>
422 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
423 <xsl:call-template name="subfieldSelect">
424 <xsl:with-param name="codes">y3z</xsl:with-param>
427 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
429 <xsl:when test="$URLLinkText!=''">
430 <xsl:value-of select="$URLLinkText"/>
433 <xsl:text>Click here to access online</xsl:text>
440 <xsl:when test="position()=last()"></xsl:when>
441 <xsl:otherwise> | </xsl:otherwise>
448 <xsl:if test="marc:datafield[@tag=780]">
449 <xsl:for-each select="marc:datafield[@tag=780]">
450 <span class="results_summary">
452 <xsl:when test="@ind2=0">
453 <span class="label">Continues:</span>
455 <xsl:when test="@ind2=1">
456 <span class="label">Continues in part:</span>
458 <xsl:when test="@ind2=2">
459 <span class="label">Supersedes:</span>
461 <xsl:when test="@ind2=3">
462 <span class="label">Supersedes in part:</span>
464 <xsl:when test="@ind2=4">
465 <span class="label">Formed by the union: ... and: ...</span>
467 <xsl:when test="@ind2=5">
468 <span class="label">Absorbed:</span>
470 <xsl:when test="@ind2=6">
471 <span class="label">Absorbed in part:</span>
473 <xsl:when test="@ind2=7">
474 <span class="label">Separated from:</span>
477 <xsl:variable name="f780">
478 <xsl:call-template name="subfieldSelect">
479 <xsl:with-param name="codes">a_t</xsl:with-param>
482 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
483 <xsl:value-of select="translate($f780, '()', '')"/>
488 <xsl:when test="@ind1=0">
489 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
497 <xsl:if test="marc:datafield[@tag=785]">
498 <xsl:for-each select="marc:datafield[@tag=785]">
499 <span class="results_summary">
501 <xsl:when test="@ind2=0">
502 <span class="label">Continued by:</span>
504 <xsl:when test="@ind2=1">
505 <span class="label">Continued in part by:</span>
507 <xsl:when test="@ind2=2">
508 <span class="label">Superseded by:</span>
510 <xsl:when test="@ind2=3">
511 <span class="label">Superseded in part by:</span>
513 <xsl:when test="@ind2=4">
514 <span class="label">Absorbed by:</span>
516 <xsl:when test="@ind2=5">
517 <span class="label">Absorbed in part by:</span>
519 <xsl:when test="@ind2=6">
520 <span class="label">Split into .. and ...:</span>
522 <xsl:when test="@ind2=7">
523 <span class="label">Merged with ... to form ...</span>
525 <xsl:when test="@ind2=8">
526 <span class="label">Changed back to:</span>
530 <xsl:variable name="f785">
531 <xsl:call-template name="subfieldSelect">
532 <xsl:with-param name="codes">a_t</xsl:with-param>
536 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
537 <xsl:value-of select="translate($f785, '()', '')"/>
546 <xsl:template name="nameABCDQ">
547 <xsl:call-template name="chopPunctuation">
548 <xsl:with-param name="chopString">
549 <xsl:call-template name="subfieldSelect">
550 <xsl:with-param name="codes">aq</xsl:with-param>
553 <xsl:with-param name="punctuation">
554 <xsl:text>:,;/ </xsl:text>
557 <xsl:call-template name="termsOfAddress"/>
560 <xsl:template name="nameABCDN">
561 <xsl:for-each select="marc:subfield[@code='a']">
562 <xsl:call-template name="chopPunctuation">
563 <xsl:with-param name="chopString" select="."/>
566 <xsl:for-each select="marc:subfield[@code='b']">
567 <xsl:value-of select="."/>
569 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
570 <xsl:call-template name="subfieldSelect">
571 <xsl:with-param name="codes">cdn</xsl:with-param>
576 <xsl:template name="nameACDEQ">
577 <xsl:call-template name="subfieldSelect">
578 <xsl:with-param name="codes">acdeq</xsl:with-param>
581 <xsl:template name="termsOfAddress">
582 <xsl:if test="marc:subfield[@code='b' or @code='c']">
583 <xsl:call-template name="chopPunctuation">
584 <xsl:with-param name="chopString">
585 <xsl:call-template name="subfieldSelect">
586 <xsl:with-param name="codes">bc</xsl:with-param>
593 <xsl:template name="part">
594 <xsl:variable name="partNumber">
595 <xsl:call-template name="specialSubfieldSelect">
596 <xsl:with-param name="axis">n</xsl:with-param>
597 <xsl:with-param name="anyCodes">n</xsl:with-param>
598 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
601 <xsl:variable name="partName">
602 <xsl:call-template name="specialSubfieldSelect">
603 <xsl:with-param name="axis">p</xsl:with-param>
604 <xsl:with-param name="anyCodes">p</xsl:with-param>
605 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
608 <xsl:if test="string-length(normalize-space($partNumber))">
609 <xsl:call-template name="chopPunctuation">
610 <xsl:with-param name="chopString" select="$partNumber"/>
613 <xsl:if test="string-length(normalize-space($partName))">
614 <xsl:call-template name="chopPunctuation">
615 <xsl:with-param name="chopString" select="$partName"/>
620 <xsl:template name="specialSubfieldSelect">
621 <xsl:param name="anyCodes"/>
622 <xsl:param name="axis"/>
623 <xsl:param name="beforeCodes"/>
624 <xsl:param name="afterCodes"/>
625 <xsl:variable name="str">
626 <xsl:for-each select="marc:subfield">
627 <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])">
628 <xsl:value-of select="text()"/>
629 <xsl:text> </xsl:text>
633 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>