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:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:str="http://exslt.org/strings"
9 exclude-result-prefixes="marc str">
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="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:controlfield[@tag=001]"/>
22 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
23 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
24 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
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:for-each select="marc:subfield">
32 <xsl:when test="@code='a'">
33 <xsl:variable name="title" select="."/>
34 <xsl:variable name="ntitle"
35 select="translate($title, 'ˆ‰˜œ','')"/>
36 <xsl:value-of select="$ntitle" />
38 <xsl:when test="@code='b'">
39 <xsl:text> [</xsl:text>
40 <xsl:value-of select="."/>
41 <xsl:text>]</xsl:text>
43 <xsl:when test="@code='d'">
44 <xsl:text> = </xsl:text>
45 <xsl:value-of select="."/>
47 <xsl:when test="@code='e'">
48 <xsl:text> : </xsl:text>
49 <xsl:value-of select="."/>
51 <xsl:when test="@code='f'">
52 <xsl:text> / </xsl:text>
53 <xsl:value-of select="."/>
55 <xsl:when test="@code='g'">
56 <xsl:text> ; </xsl:text>
57 <xsl:value-of select="."/>
60 <xsl:text>, </xsl:text>
61 <xsl:value-of select="."/>
69 <xsl:call-template name="tag_title">
70 <xsl:with-param name="tag">454</xsl:with-param>
71 <xsl:with-param name="label">Translation of</xsl:with-param>
72 <xsl:with-param name="spanclass">original_title</xsl:with-param>
75 <xsl:call-template name="tag_title">
76 <xsl:with-param name="tag">461</xsl:with-param>
77 <xsl:with-param name="label">Set Level</xsl:with-param>
78 <xsl:with-param name="spanclass">set_level</xsl:with-param>
81 <xsl:call-template name="tag_title">
82 <xsl:with-param name="tag">464</xsl:with-param>
83 <xsl:with-param name="label">Piece-Analytic Level</xsl:with-param>
84 <xsl:with-param name="spanclass">piece_analytic_level</xsl:with-param>
87 <xsl:call-template name="tag_7xx">
88 <xsl:with-param name="tag">700</xsl:with-param>
89 <xsl:with-param name="label">Main Author</xsl:with-param>
90 <xsl:with-param name="spanclass">main_author</xsl:with-param>
93 <xsl:call-template name="tag_7xx">
94 <xsl:with-param name="tag">710</xsl:with-param>
95 <xsl:with-param name="label">Corporate Author (Main)</xsl:with-param>
96 <xsl:with-param name="spanclass">corporate_main_author</xsl:with-param>
99 <xsl:call-template name="tag_7xx">
100 <xsl:with-param name="tag">701</xsl:with-param>
101 <xsl:with-param name="label">Coauthor</xsl:with-param>
102 <xsl:with-param name="spanclass">coauthor</xsl:with-param>
105 <xsl:call-template name="tag_7xx">
106 <xsl:with-param name="tag">702</xsl:with-param>
107 <xsl:with-param name="label">Secondary Author</xsl:with-param>
108 <xsl:with-param name="spanclass">secondary_author</xsl:with-param>
111 <xsl:call-template name="tag_7xx">
112 <xsl:with-param name="tag">711</xsl:with-param>
113 <xsl:with-param name="label">Corporate Author (Coauthor)</xsl:with-param>
114 <xsl:with-param name="spanclass">corporate_coauthor</xsl:with-param>
117 <xsl:call-template name="tag_7xx">
118 <xsl:with-param name="tag">712</xsl:with-param>
119 <xsl:with-param name="label">Corporate Author (Secondary)</xsl:with-param>
120 <xsl:with-param name="spanclass">corporate_secondary_author</xsl:with-param>
123 <xsl:call-template name="tag_title">
124 <xsl:with-param name="tag">500</xsl:with-param>
125 <xsl:with-param name="label">Uniform Title</xsl:with-param>
126 <xsl:with-param name="spanclass">uniform_title</xsl:with-param>
129 <xsl:call-template name="tag_title">
130 <xsl:with-param name="tag">503</xsl:with-param>
131 <xsl:with-param name="label">Uniform Conventional Heading</xsl:with-param>
132 <xsl:with-param name="spanclass">uniform_conventional_heading</xsl:with-param>
135 <xsl:if test="marc:datafield[@tag=101]">
136 <span class="results_summary language">
137 <span class="label">Language: </span>
138 <xsl:for-each select="marc:datafield[@tag=101]">
139 <xsl:for-each select="marc:subfield">
141 <xsl:when test="@code='b'">of intermediate text, </xsl:when>
142 <xsl:when test="@code='c'">of original work, </xsl:when>
143 <xsl:when test="@code='d'">of summary, </xsl:when>
144 <xsl:when test="@code='e'">of contents page, </xsl:when>
145 <xsl:when test="@code='f'">of title page, </xsl:when>
146 <xsl:when test="@code='g'">of title proper, </xsl:when>
147 <xsl:when test="@code='h'">of libretto, </xsl:when>
148 <xsl:when test="@code='i'">of accompanying material, </xsl:when>
149 <xsl:when test="@code='j'">of subtitles, </xsl:when>
151 <xsl:value-of select="text()"/>
153 <xsl:when test="position()=last()">
154 <xsl:text>.</xsl:text>
157 <xsl:text> ; </xsl:text>
165 <xsl:if test="marc:datafield[@tag=102]">
166 <span class="results_summary country">
167 <span class="label">Country: </span>
168 <xsl:for-each select="marc:datafield[@tag=102]">
169 <xsl:for-each select="marc:subfield">
170 <xsl:value-of select="text()"/>
172 <xsl:when test="position()=last()">
173 <xsl:text>.</xsl:text>
175 <xsl:otherwise><xsl:text>, </xsl:text>
183 <xsl:call-template name="tag_comma">
184 <xsl:with-param name="tag">205</xsl:with-param>
185 <xsl:with-param name="label">Edition Statement</xsl:with-param>
186 <xsl:with-param name="spanclass">edition</xsl:with-param>
189 <xsl:call-template name="tag_210" />
191 <xsl:call-template name="tag_215" />
194 <xsl:if test="marc:datafield[@tag=010]/marc:subfield[@code='a']">
195 <span class="results_summary isbn"><span class="label">ISBN: </span>
196 <xsl:for-each select="marc:datafield[@tag=010]/marc:subfield[@code='a']">
197 <span property="isbn">
198 <xsl:value-of select="."/>
200 <xsl:when test="position()=last()">
201 <xsl:text>.</xsl:text>
204 <xsl:text>; </xsl:text>
213 <xsl:if test="marc:datafield[@tag=011]/marc:subfield[@code='a']">
214 <span class="results_summary issn"><span class="label">ISSN: </span>
215 <xsl:for-each select="marc:datafield[@tag=011]/marc:subfield[@code='a']">
216 <span property="issn">
217 <xsl:value-of select="."/>
219 <xsl:when test="position()=last()">
220 <xsl:text>.</xsl:text>
223 <xsl:text>; </xsl:text>
231 <xsl:call-template name="tag_title">
232 <xsl:with-param name="tag">225</xsl:with-param>
233 <xsl:with-param name="label">Series</xsl:with-param>
234 <xsl:with-param name="spanclass">series</xsl:with-param>
237 <xsl:if test="marc:datafield[@tag=676]">
238 <span class="results_summary dewey">
239 <span class="label">Dewey: </span>
240 <xsl:for-each select="marc:datafield[@tag=676]">
241 <xsl:value-of select="marc:subfield[@code='a']"/>
242 <xsl:if test="marc:subfield[@code='v']">
243 <xsl:text>, </xsl:text>
244 <xsl:value-of select="marc:subfield[@code='v']"/>
246 <xsl:if test="marc:subfield[@code='z']">
247 <xsl:text>, </xsl:text>
248 <xsl:value-of select="marc:subfield[@code='z']"/>
250 <xsl:if test="not (position()=last())">
251 <xsl:text> ; </xsl:text>
257 <xsl:if test="marc:datafield[@tag=686]">
258 <span class="results_summary classification">
259 <span class="label">Classification: </span>
260 <xsl:for-each select="marc:datafield[@tag=686]">
261 <xsl:value-of select="marc:subfield[@code='a']"/>
262 <xsl:if test="marc:subfield[@code='b']">
263 <xsl:text>, </xsl:text>
264 <xsl:value-of select="marc:subfield[@code='b']"/>
266 <xsl:if test="marc:subfield[@code='c']">
267 <xsl:text>, </xsl:text>
268 <xsl:value-of select="marc:subfield[@code='c']"/>
270 <xsl:if test="not (position()=last())"><xsl:text> ; </xsl:text></xsl:if>
275 <xsl:if test="marc:datafield[@tag=327]">
276 <span class="results_summary contents">
277 <span class="label">Contents note: </span>
278 <xsl:for-each select="marc:datafield[@tag=327]">
279 <xsl:call-template name="chopPunctuation">
280 <xsl:with-param name="chopString">
281 <xsl:call-template name="subfieldSelect">
282 <xsl:with-param name="codes">abcdjpvxyz</xsl:with-param>
283 <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param>
284 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
292 <xsl:if test="marc:datafield[@tag=330]">
293 <span class="results_summary abstract">
294 <span class="label">Abstract: </span>
295 <xsl:for-each select="marc:datafield[@tag=330]">
296 <xsl:value-of select="marc:subfield[@code='a']"/>
298 <xsl:when test="position()=last()">
299 <xsl:text>.</xsl:text>
302 <xsl:text>; </xsl:text>
309 <xsl:if test="marc:datafield[@tag=317]">
310 <span class="results_summary provenance">
311 <span class="label">Provenance note: </span>
312 <xsl:for-each select="marc:datafield[@tag=317]">
313 <xsl:value-of select="marc:subfield[@code='a']"/>
318 <xsl:if test="marc:datafield[@tag=320]">
319 <span class="results_summary bibliography">
320 <span class="label">Bibliography: </span>
321 <xsl:for-each select="marc:datafield[@tag=320]">
322 <xsl:value-of select="marc:subfield[@code='a']"/>
323 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
328 <xsl:if test="marc:datafield[@tag=328]">
329 <span class="results_summary thesis">
330 <span class="label">Thesis: </span>
331 <xsl:for-each select="marc:datafield[@tag=328]">
332 <xsl:value-of select="marc:subfield[@code='a']"/>
333 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
338 <xsl:if test="marc:datafield[@tag=333]">
339 <span class="results_summary audience">
340 <span class="label">Audience: </span>
341 <xsl:for-each select="marc:datafield[@tag=333]">
342 <xsl:value-of select="marc:subfield[@code='a']"/>
343 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
348 <xsl:if test="marc:datafield[@tag=955]">
349 <span class="results_summary sudoc_serial_history">
350 <span class="label">SUDOC serial history: </span>
351 <xsl:for-each select="marc:datafield[@tag=955]">
352 <xsl:value-of select="marc:subfield[@code='9']"/>:
353 <xsl:value-of select="marc:subfield[@code='r']"/>
354 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
359 <xsl:call-template name="tag_subject">
360 <xsl:with-param name="tag">600</xsl:with-param>
361 <xsl:with-param name="label">Subject - Personal Name</xsl:with-param>
364 <xsl:call-template name="tag_subject">
365 <xsl:with-param name="tag">601</xsl:with-param>
366 <xsl:with-param name="label">Subject - Corporate Author</xsl:with-param>
369 <xsl:call-template name="tag_subject">
370 <xsl:with-param name="tag">602</xsl:with-param>
371 <xsl:with-param name="label">Subject - Family</xsl:with-param>
374 <xsl:call-template name="tag_subject">
375 <xsl:with-param name="tag">604</xsl:with-param>
376 <xsl:with-param name="label">Subject - Author/Title</xsl:with-param>
379 <xsl:call-template name="tag_subject">
380 <xsl:with-param name="tag">606</xsl:with-param>
381 <xsl:with-param name="label">Subject - Topical Name</xsl:with-param>
384 <xsl:call-template name="tag_subject">
385 <xsl:with-param name="tag">607</xsl:with-param>
386 <xsl:with-param name="label">Subject - Geographical Name</xsl:with-param>
389 <xsl:call-template name="tag_subject">
390 <xsl:with-param name="tag">608</xsl:with-param>
391 <xsl:with-param name="label">Subject - Form</xsl:with-param>
394 <xsl:call-template name="tag_subject">
395 <xsl:with-param name="tag">610</xsl:with-param>
396 <xsl:with-param name="label">Subject</xsl:with-param>
399 <xsl:call-template name="tag_subject">
400 <xsl:with-param name="tag">615</xsl:with-param>
401 <xsl:with-param name="label">Subject Category</xsl:with-param>
404 <xsl:call-template name="tag_subject">
405 <xsl:with-param name="tag">616</xsl:with-param>
406 <xsl:with-param name="label">Trademark</xsl:with-param>
409 <xsl:if test="marc:datafield[@tag=856]">
410 <span class="results_summary online_resources">
411 <span class="label">Online Resources:</span>
412 <xsl:for-each select="marc:datafield[@tag=856]">
414 <xsl:attribute name="href">
415 <xsl:value-of select="marc:subfield[@code='u']"/>
417 <xsl:if test="$OPACURLOpenInNewWindow='1'">
418 <xsl:attribute name="target">_blank</xsl:attribute>
421 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
422 <xsl:call-template name="subfieldSelect">
423 <xsl:with-param name="codes">y3z</xsl:with-param>
426 <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
428 <xsl:when test="$URLLinkText!=''">
429 <xsl:value-of select="$URLLinkText"/>
432 <xsl:text>Click here to access online</xsl:text>
439 <xsl:when test="position()=last()"></xsl:when>
440 <xsl:otherwise> | </xsl:otherwise>
447 <xsl:variable name="OPACShowOpenURL" select="marc:sysprefs/marc:syspref[@name='OPACShowOpenURL']" />
448 <xsl:variable name="OpenURLImageLocation" select="marc:sysprefs/marc:syspref[@name='OpenURLImageLocation']" />
449 <xsl:variable name="OpenURLText" select="marc:sysprefs/marc:syspref[@name='OpenURLText']" />
450 <xsl:variable name="OpenURLResolverURL" select="marc:variables/marc:variable[@name='OpenURLResolverURL']" />
452 <xsl:if test="$OPACShowOpenURL = 1 and $OpenURLResolverURL != ''">
453 <xsl:variable name="openurltext">
455 <xsl:when test="$OpenURLText != ''">
456 <xsl:value-of select="$OpenURLText" />
459 <xsl:text>OpenURL</xsl:text>
464 <span class="results_summary"><a>
465 <xsl:attribute name="href">
466 <xsl:value-of select="$OpenURLResolverURL" />
468 <xsl:attribute name="title">
469 <xsl:value-of select="$openurltext" />
471 <xsl:attribute name="class">
472 <xsl:text>OpenURL</xsl:text>
474 <xsl:if test="$OPACURLOpenInNewWindow='1'">
475 <xsl:attribute name="target">
476 <xsl:text>_blank</xsl:text>
480 <xsl:when test="$OpenURLImageLocation != ''">
482 <xsl:attribute name="src">
483 <xsl:value-of select="$OpenURLImageLocation" />
488 <xsl:value-of select="$openurltext" />
493 <!-- End of OpenURL -->
495 <xsl:variable name="OPACShowMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACShowMusicalInscripts']" />
496 <xsl:variable name="OPACPlayMusicalInscripts" select="marc:sysprefs/marc:syspref[@name='OPACPlayMusicalInscripts']" />
498 <xsl:if test="$OPACShowMusicalInscripts and marc:datafield[@tag=036]">
499 <xsl:for-each select="marc:datafield[@tag=031]">
501 <span class="results_summary musical_inscripts">
502 <xsl:if test="marc:subfield[@code='u']">
505 <xsl:attribute name="href">
506 <xsl:value-of select="marc:subfield[@code='u']"/>
508 <xsl:text>Audio file</xsl:text>
512 <xsl:if test="marc:subfield[@code='2'] and marc:subfield[@code='2']/text() = 'pe' and marc:subfield[@code='g'] and marc:subfield[@code='n'] and marc:subfield[@code='o'] and marc:subfield[@code='p']">
513 <div class="inscript" data-system="pae">
514 <xsl:attribute name="data-clef">
515 <xsl:value-of select="marc:subfield[@code='g']"/>
517 <xsl:attribute name="data-keysig">
518 <xsl:value-of select="marc:subfield[@code='n']"/>
520 <xsl:attribute name="data-timesig">
521 <xsl:value-of select="marc:subfield[@code='o']"/>
523 <xsl:attribute name="data-notation">
524 <xsl:value-of select="marc:subfield[@code='p']"/>
527 <xsl:if test="$OPACPlayMusicalInscripts = 1">
528 <div class="audio_controls">
529 <button class="btn play_btn">
530 <i id="carticon" class="fa fa-play"></i>
531 <xsl:text> Play this sample</xsl:text>
538 <xsl:if test="$OPACPlayMusicalInscripts = 1">
539 <div class="results_summary">
540 <span class="inscript_audio hide"></span>
547 <xsl:template name="nameABCDQ">
548 <xsl:call-template name="chopPunctuation">
549 <xsl:with-param name="chopString">
550 <xsl:call-template name="subfieldSelect">
551 <xsl:with-param name="codes">aq</xsl:with-param>
554 <xsl:with-param name="punctuation">
555 <xsl:text>:,;/ </xsl:text>
558 <xsl:call-template name="termsOfAddress"/>
561 <xsl:template name="nameABCDN">
562 <xsl:for-each select="marc:subfield[@code='a']">
563 <xsl:call-template name="chopPunctuation">
564 <xsl:with-param name="chopString" select="."/>
567 <xsl:for-each select="marc:subfield[@code='b']">
568 <xsl:value-of select="."/>
570 <xsl:if test="marc:subfield[@code='c'] or marc:subfield[@code='d'] or marc:subfield[@code='n']">
571 <xsl:call-template name="subfieldSelect">
572 <xsl:with-param name="codes">cdn</xsl:with-param>
577 <xsl:template name="nameACDEQ">
578 <xsl:call-template name="subfieldSelect">
579 <xsl:with-param name="codes">acdeq</xsl:with-param>
582 <xsl:template name="termsOfAddress">
583 <xsl:if test="marc:subfield[@code='b' or @code='c']">
584 <xsl:call-template name="chopPunctuation">
585 <xsl:with-param name="chopString">
586 <xsl:call-template name="subfieldSelect">
587 <xsl:with-param name="codes">bc</xsl:with-param>
594 <xsl:template name="part">
595 <xsl:variable name="partNumber">
596 <xsl:call-template name="specialSubfieldSelect">
597 <xsl:with-param name="axis">n</xsl:with-param>
598 <xsl:with-param name="anyCodes">n</xsl:with-param>
599 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
602 <xsl:variable name="partName">
603 <xsl:call-template name="specialSubfieldSelect">
604 <xsl:with-param name="axis">p</xsl:with-param>
605 <xsl:with-param name="anyCodes">p</xsl:with-param>
606 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
609 <xsl:if test="string-length(normalize-space($partNumber))">
610 <xsl:call-template name="chopPunctuation">
611 <xsl:with-param name="chopString" select="$partNumber"/>
614 <xsl:if test="string-length(normalize-space($partName))">
615 <xsl:call-template name="chopPunctuation">
616 <xsl:with-param name="chopString" select="$partName"/>
621 <xsl:template name="specialSubfieldSelect">
622 <xsl:param name="anyCodes"/>
623 <xsl:param name="axis"/>
624 <xsl:param name="beforeCodes"/>
625 <xsl:param name="afterCodes"/>
626 <xsl:variable name="str">
627 <xsl:for-each select="marc:subfield">
628 <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])">
629 <xsl:value-of select="text()"/>
630 <xsl:text> </xsl:text>
634 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>