1 <?xml version="1.0" encoding="UTF-8"?>
3 <!DOCTYPE stylesheet [<!ENTITY nbsp " " >]>
5 <!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ -->
6 <xsl:stylesheet version="1.0"
7 xmlns:marc="http://www.loc.gov/MARC21/slim"
8 xmlns:items="http://www.koha-community.org/items"
9 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
10 xmlns:str="http://exslt.org/strings"
11 exclude-result-prefixes="marc items">
12 <xsl:import href="NORMARCslimUtils.xsl"/>
13 <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/>
14 <xsl:template match="/">
15 <xsl:apply-templates/>
18 <xsl:template match="marc:record">
21 <xsl:variable name="UseControlNumber" select="marc:sysprefs/marc:syspref[@name='UseControlNumber']"/>
22 <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
23 <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
24 <xsl:variable name="TracingQuotesLeft">
26 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
27 <xsl:otherwise>"</xsl:otherwise>
30 <xsl:variable name="TracingQuotesRight">
32 <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
33 <xsl:otherwise>"</xsl:otherwise>
36 <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
37 <xsl:variable name="theme" select="marc:sysprefs/marc:syspref[@name='opacthemes']"/>
38 <xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
39 <xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
40 <xsl:variable name="Show856uAsImage" select="marc:sysprefs/marc:syspref[@name='OPACDisplay856uAsImage']"/>
41 <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
42 <xsl:variable name="leader" select="marc:leader"/>
43 <xsl:variable name="leader6" select="substring($leader,7,1)"/>
44 <xsl:variable name="leader7" select="substring($leader,8,1)"/>
45 <xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/>
46 <xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
47 <xsl:variable name="field019b" select="marc:datafield[@tag=019]/marc:subfield[@code='b']"/>
48 <xsl:variable name="typeOf008">
49 <!-- The logic here should be exactly the same for NORMARCslim2intranetDetail.xsl, NORMARCslim2intranetResults.xsl, NORMARCslim2OPACDetail.xsl and NORMARCslim2OPACResults.xsl -->
51 <xsl:when test="$field019b='b' or $field019b='k' or $field019b='l' or $leader6='b'">Mon</xsl:when>
52 <xsl:when test="$field019b='e' or contains($field019b,'ec') or contains($field019b,'ed') or contains($field019b,'ee') or contains($field019b,'ef') or $leader6='g'">FV</xsl:when>
53 <xsl:when test="$field019b='c' or $field019b='d' or contains($field019b,'da') or contains($field019b,'db') or contains($field019b,'dc') or contains($field019b,'dd') or contains($field019b,'dg') or contains($field019b,'dh') or contains($field019b,'di') or contains($field019b,'dj') or contains($field019b,'dk') or $leader6='c' or $leader6='d' or $leader6='i' or $leader6='j'">Mus</xsl:when>
54 <xsl:when test="$field019b='a' or contains($field019b,'ab') or contains($field019b,'aj') or $leader6='e' or $leader6='f'">Kar</xsl:when>
55 <xsl:when test="$field019b='f' or $field019b='i' or contains($field019b,'ib') or contains($field019b,'ic') or contains($field019b,'fd') or contains($field019b,'ff') or contains($field019b,'fi') or $leader6='k'">gra</xsl:when>
56 <xsl:when test="$field019b='g' or contains($field019b,'gb') or contains($field019b,'gd') or contains($field019b,'ge') or $leader6='m'">Fil</xsl:when>
57 <xsl:when test="$leader6='o'">kom</xsl:when>
58 <xsl:when test="$field019b='h' or $leader6='r'">trd</xsl:when>
59 <xsl:when test="$field019b='j' or $leader6='a'">
61 <xsl:when test="$leader7='a' or $leader7='c' or $leader7='m' or $leader7='p'">Mon</xsl:when>
62 <xsl:when test="$field019b='j' or $leader7='b' or $leader7='s'">Per</xsl:when>
68 <!-- Tittel og ansvarsopplysninger -->
69 <xsl:if test="marc:datafield[@tag=245]">
71 <xsl:for-each select="marc:datafield[@tag=245]">
72 <xsl:call-template name="subfieldSelect">
73 <xsl:with-param name="codes">a</xsl:with-param>
75 <xsl:if test="marc:subfield[@code='h']">
76 <xsl:text> </xsl:text>
77 (<xsl:call-template name="subfieldSelect">
78 <xsl:with-param name="codes">h</xsl:with-param>
81 <xsl:if test="marc:subfield[@code='b']">
82 <xsl:text> : </xsl:text>
83 <xsl:call-template name="subfieldSelect">
84 <xsl:with-param name="codes">b</xsl:with-param>
87 <xsl:text> </xsl:text>
88 <xsl:call-template name="subfieldSelect">
89 <xsl:with-param name="codes">np</xsl:with-param>
95 <!-- Author Statement -->
96 <!-- 245$9 is Koha authority number -->
98 <xsl:when test="marc:datafield[@tag=100] or marc:datafield[@tag=110] or marc:datafield[@tag=111] or marc:datafield[@tag=700] or marc:datafield[@tag=710] or marc:datafield[@tag=711]">
100 <xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
103 <xsl:when test="marc:subfield[@code=9]">
104 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
107 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
110 <xsl:call-template name="nameABCDQ"/></a>
111 <xsl:if test="marc:subfield[@code=9]">
113 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
114 <xsl:element name="img">
115 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
116 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
117 <xsl:attribute name="height">15</xsl:attribute>
118 <xsl:attribute name="width">15</xsl:attribute>
123 <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
126 <xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
129 <xsl:when test="marc:subfield[@code=9]">
130 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
133 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
136 <xsl:call-template name="nameABCDN"/></a>
137 <xsl:if test="marc:subfield[@code=9]">
139 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
140 <xsl:element name="img">
141 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
142 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
143 <xsl:attribute name="height">15</xsl:attribute>
144 <xsl:attribute name="width">15</xsl:attribute>
148 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
151 <xsl:for-each select="marc:datafield[@tag=111 or @tag=711]">
154 <xsl:when test="marc:subfield[@code=9]">
155 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
158 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
161 <xsl:call-template name="nameACDEQ"/></a>
162 <xsl:if test="marc:subfield[@code=9]">
164 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
165 <xsl:element name="img">
166 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
167 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
168 <xsl:attribute name="height">15</xsl:attribute>
169 <xsl:attribute name="width">15</xsl:attribute>
173 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
180 <xsl:if test="$DisplayOPACiconsXSLT!='0'">
181 <xsl:if test="$typeOf008!=''">
182 <span class="results_summary">
183 <span class="label">Materialtype: </span>
185 <xsl:when test="$typeOf008='Mon'"><img src="/opac-tmpl/lib/famfamfam/BK.png" alt="Bok" title="Bok"/> Bok</xsl:when>
186 <xsl:when test="$typeOf008='Per'"><img src="/opac-tmpl/lib/famfamfam/AR.png" alt="Periodika" title="Periodika"/> Periodika</xsl:when>
187 <xsl:when test="$typeOf008='Fil'"><img src="/opac-tmpl/lib/famfamfam/CF.png" alt="Fil" title="Fil"/> Fil</xsl:when>
188 <xsl:when test="$typeOf008='Kar'"><img src="/opac-tmpl/lib/famfamfam/MP.png" alt="Kart" title="Kart"/> Kart</xsl:when>
189 <xsl:when test="$typeOf008='FV'"><img src="/opac-tmpl/lib/famfamfam/VM.png" alt="Film og video" title="Film og video"/> Film og video</xsl:when>
190 <xsl:when test="$typeOf008='Mus'"><img src="/opac-tmpl/lib/famfamfam/PR.png" alt="Musikktrykk og lydopptak" title="Musikktrykk og lydopptak"/> Musikk</xsl:when>
191 <xsl:when test="$typeOf008='gra'"><img src="/opac-tmpl/lib/famfamfam/GR.png" alt="Grafisk materiale" title="Grafisk materiale"/> Grafisk materiale</xsl:when>
192 <xsl:when test="$typeOf008='kom'"><img src="/opac-tmpl/lib/famfamfam/MX.png" alt="Kombidokumenter" title="Kombidokumenter"/> Kombidokumenter</xsl:when>
193 <xsl:when test="$typeOf008='trd'"><img src="/opac-tmpl/lib/famfamfam/TD.png" alt="Tre-dimensjonale gjenstander" title="Tre-dimensjonale gjenstander"/> Tre-dimensjonale gjenstander</xsl:when>
200 <xsl:if test="marc:datafield[@tag=440 or @tag=490]">
201 <span class="results_summary"><span class="label">Series: </span>
202 <xsl:for-each select="marc:datafield[@tag=440]">
203 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
204 <xsl:call-template name="chopPunctuation">
205 <xsl:with-param name="chopString">
206 <xsl:call-template name="subfieldSelect">
207 <xsl:with-param name="codes">av</xsl:with-param>
212 <xsl:text> </xsl:text><xsl:call-template name="part"/>
213 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
216 <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
217 <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
218 <xsl:call-template name="chopPunctuation">
219 <xsl:with-param name="chopString">
220 <xsl:call-template name="subfieldSelect">
221 <xsl:with-param name="codes">av</xsl:with-param>
226 <xsl:call-template name="part"/>
227 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
233 <xsl:if test="$leader7='s' or $leader7='c'">
234 <span class="results_summary analytics"><span class="label">Analytics: </span>
237 <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
238 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/>+and+(bib-level:a+or+bib-level:b)</xsl:attribute>
241 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Host-item:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
244 <xsl:text>Show analytics</xsl:text>
249 <!-- 773 - Links from child to parent -->
250 <xsl:if test="marc:datafield[@tag=773]">
251 <xsl:for-each select="marc:datafield[@tag=773]">
252 <xsl:if test="@ind1=0">
253 <span class="results_summary in"><span class="label">
255 <xsl:when test="@ind2=' '">
258 <xsl:when test="@ind2=8">
259 <xsl:if test="marc:subfield[@code='i']">
260 <xsl:value-of select="marc:subfield[@code='i']"/>
265 <xsl:variable name="f773">
266 <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
267 <xsl:with-param name="codes">a_t</xsl:with-param>
268 </xsl:call-template></xsl:with-param></xsl:call-template>
271 <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
272 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
273 <xsl:value-of select="translate($f773, '()', '')"/>
275 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
277 <xsl:when test="marc:subfield[@code='0']">
278 <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute>
279 <xsl:value-of select="$f773"/>
283 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
284 <xsl:value-of select="$f773"/>
286 <xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
290 <xsl:if test="marc:subfield[@code='n']">
291 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
297 <!-- Publisher Statement -->
299 <xsl:if test="marc:datafield[@tag=260]">
300 <span class="results_summary"><span class="label">Utgiver: </span>
301 <xsl:for-each select="marc:datafield[@tag=260]">
302 <xsl:call-template name="chopPunctuation">
303 <xsl:with-param name="chopString">
304 <xsl:call-template name="subfieldSelect">
305 <xsl:with-param name="codes">bcg</xsl:with-param>
309 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
314 <!-- Edition Statement -->
316 <xsl:if test="marc:datafield[@tag=250]">
317 <span class="results_summary"><span class="label">Utgave: </span>
318 <xsl:for-each select="marc:datafield[@tag=250]">
319 <xsl:call-template name="chopPunctuation">
320 <xsl:with-param name="chopString">
321 <xsl:call-template name="subfieldSelect">
322 <xsl:with-param name="codes">ab</xsl:with-param>
326 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
333 <xsl:if test="marc:datafield[@tag=300]">
334 <span class="results_summary"><span class="label">Beskrivelse: </span>
335 <xsl:for-each select="marc:datafield[@tag=300]">
336 <xsl:call-template name="chopPunctuation">
337 <xsl:with-param name="chopString">
338 <xsl:call-template name="subfieldSelect">
339 <xsl:with-param name="codes">abceg</xsl:with-param>
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 <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr>
351 <xsl:if test="marc:datafield[@tag=020]/marc:subfield[@code='a']">
352 <span class="results_summary isbn"><span class="label">ISBN: </span>
353 <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']">
354 <span property="isbn">
355 <xsl:value-of select="."/>
357 <xsl:when test="position()=last()">
358 <xsl:text>.</xsl:text>
361 <xsl:text>; </xsl:text>
370 <xsl:if test="marc:datafield[@tag=022]/marc:subfield[@code='a']">
371 <span class="results_summary issn"><span class="label">ISSN: </span>
372 <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']">
373 <span property="issn">
374 <xsl:value-of select="."/>
376 <xsl:when test="position()=last()">
377 <xsl:text>.</xsl:text>
380 <xsl:text>; </xsl:text>
388 <!-- Other Title Statement -->
390 <xsl:if test="marc:datafield[@tag=246]">
391 <span class="results_summary"><span class="label">Parallelltittel: </span>
392 <xsl:for-each select="marc:datafield[@tag=246]">
393 <xsl:call-template name="chopPunctuation">
394 <xsl:with-param name="chopString">
395 <xsl:call-template name="subfieldSelect">
396 <xsl:with-param name="codes">abhfgnp</xsl:with-param>
400 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
405 <!-- Uniform Title Statement -->
407 <xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
408 <span class="results_summary"><span class="label">Standardtittel: </span>
409 <xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]">
410 <xsl:variable name="str">
411 <xsl:for-each select="marc:subfield">
412 <xsl:if test="(contains('adfklmor',@code) and (not(../marc:subfield[@code='n' or @code='p']) or (following-sibling::marc:subfield[@code='n' or @code='p'])))">
413 <xsl:value-of select="text()"/>
414 <xsl:text> </xsl:text>
418 <xsl:call-template name="chopPunctuation">
419 <xsl:with-param name="chopString">
420 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>
424 <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
431 <xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
432 <span class="results_summary subjects"><span class="label">Emne(r): </span>
433 <xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
436 <!-- Will implement this later
437 <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
438 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
441 <xsl:when test="$TraceSubjectSubdivisions='1'">
442 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
443 <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
444 <xsl:with-param name="delimeter"> AND </xsl:with-param>
445 <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
446 <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
451 <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
454 <xsl:call-template name="chopPunctuation">
455 <xsl:with-param name="chopString">
456 <xsl:call-template name="subfieldSelect">
457 <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
458 <xsl:with-param name="subdivCodes">vxyz</xsl:with-param>
459 <xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
464 <xsl:if test="marc:subfield[@code=9]">
466 <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
467 <xsl:element name="img">
468 <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute>
469 <xsl:attribute name="style">vertical-align:middle</xsl:attribute>
470 <xsl:attribute name="height">15</xsl:attribute>
471 <xsl:attribute name="width">15</xsl:attribute>
476 <xsl:when test="position()=last()"></xsl:when>
477 <xsl:otherwise> | </xsl:otherwise>
484 <!-- Image processing code added here, takes precedence over text links including y3z text -->
485 <xsl:if test="marc:datafield[@tag=856]">
486 <span class="results_summary online_resources"><span class="label">Online resources: </span>
487 <xsl:for-each select="marc:datafield[@tag=856]">
488 <xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
491 <xsl:when test="$OPACTrackClicks='track'">
492 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
494 <xsl:when test="$OPACTrackClicks='anonymous'">
495 <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute>
498 <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
501 <xsl:if test="$OPACURLOpenInNewWindow='1'">
502 <xsl:attribute name="target">_blank</xsl:attribute>
505 <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')">
506 <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="style">height:100px</xsl:attribute></xsl:element><xsl:text></xsl:text>
508 <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
509 <xsl:call-template name="subfieldSelect">
510 <xsl:with-param name="codes">y3z</xsl:with-param>
513 <xsl:when test="$URLLinkText!=''">
514 <xsl:value-of select="$URLLinkText"/>
517 <xsl:text>Click here to access online</xsl:text>
522 <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
523 <xsl:otherwise> | </xsl:otherwise>
529 <!-- NORMARC does not define indicators for 505
530 <xsl:if test="marc:datafield[@tag=505]">
531 <xsl:for-each select="marc:datafield[@tag=505]">
532 <span class="results_summary"><span class="label">
534 <xsl:when test="@ind1=0">
537 <xsl:when test="@ind1=1">
540 <xsl:when test="@ind1=1">
546 <xsl:when test="@ind2=0">
547 <xsl:for-each select="marc:subfield[@code='t']">
548 <xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/>
552 <xsl:call-template name="subfieldSelect">
553 <xsl:with-param name="codes">au</xsl:with-param>
561 <xsl:if test="marc:datafield[@tag=505]">
562 <xsl:call-template name="subfieldSelect">
563 <xsl:with-param name="codes">a</xsl:with-param>
568 <xsl:if test="marc:datafield[@tag=780]">
569 <xsl:for-each select="marc:datafield[@tag=780]">
570 <span class="results_summary"><span class="label">
572 <xsl:when test="@ind2=0">
575 <xsl:when test="@ind2=1">
576 Delvis fortsettelse av:
578 <xsl:when test="@ind2=2">
581 <xsl:when test="@ind2=3">
584 <xsl:when test="@ind2=4">
585 Sammenslåing av: ... ; og ...
587 <xsl:when test="@ind2=5">
590 <xsl:when test="@ind2=6">
593 <xsl:when test="@ind2=7">
598 <xsl:variable name="f780">
599 <xsl:call-template name="subfieldSelect">
600 <xsl:with-param name="codes">a_t</xsl:with-param>
603 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
604 <xsl:value-of select="translate($f780, '()', '')"/>
609 <xsl:when test="@ind1=0">
610 <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span>
618 <xsl:if test="marc:datafield[@tag=785]">
619 <xsl:for-each select="marc:datafield[@tag=785]">
620 <span class="results_summary"><span class="label">
622 <xsl:when test="@ind2=0">
625 <xsl:when test="@ind2=1">
628 <xsl:when test="@ind2=2">
631 <xsl:when test="@ind2=3">
634 <xsl:when test="@ind2=4">
637 <xsl:when test="@ind2=5">
640 <xsl:when test="@ind2=6">
641 Fortsettes av: ...; og ...
643 <xsl:when test="@ind2=7">
644 Slått sammen med: .., til: ...
648 <xsl:variable name="f785">
649 <xsl:call-template name="subfieldSelect">
650 <xsl:with-param name="codes">a_t</xsl:with-param>
654 <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
655 <xsl:value-of select="translate($f785, '()', '')"/>
664 <xsl:template name="part">
665 <xsl:variable name="partNumber">
666 <xsl:call-template name="specialSubfieldSelect">
667 <xsl:with-param name="axis">n</xsl:with-param>
668 <xsl:with-param name="anyCodes">n</xsl:with-param>
669 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
672 <xsl:variable name="partName">
673 <xsl:call-template name="specialSubfieldSelect">
674 <xsl:with-param name="axis">p</xsl:with-param>
675 <xsl:with-param name="anyCodes">p</xsl:with-param>
676 <xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param>
679 <xsl:if test="string-length(normalize-space($partNumber))">
680 <xsl:call-template name="chopPunctuation">
681 <xsl:with-param name="chopString" select="$partNumber"/>
684 <xsl:if test="string-length(normalize-space($partName))">
685 <xsl:call-template name="chopPunctuation">
686 <xsl:with-param name="chopString" select="$partName"/>
691 <xsl:template name="specialSubfieldSelect">
692 <xsl:param name="anyCodes"/>
693 <xsl:param name="axis"/>
694 <xsl:param name="beforeCodes"/>
695 <xsl:param name="afterCodes"/>
696 <xsl:variable name="str">
697 <xsl:for-each select="marc:subfield">
698 <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])">
699 <xsl:value-of select="text()"/>
700 <xsl:text> </xsl:text>
704 <xsl:value-of select="substring($str,1,string-length($str)-1)"/>