|
Line 0
Link Here
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- $Id: MARC21slim2DC.xsl,v 1.1 2003/01/06 08:20:27 adam Exp $ --> |
| 3 |
<xsl:stylesheet version="1.0" |
| 4 |
xmlns:marc="http://www.loc.gov/MARC21/slim" |
| 5 |
xmlns:items="http://www.koha-community.org/items" |
| 6 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 7 |
exclude-result-prefixes="marc items"> |
| 8 |
<xsl:import href="NORMARCslimUtils.xsl"/> |
| 9 |
<xsl:output method = "xml" indent="yes" omit-xml-declaration = "yes" /> |
| 10 |
<xsl:template match="/"> |
| 11 |
<xsl:apply-templates/> |
| 12 |
</xsl:template> |
| 13 |
|
| 14 |
<xsl:template match="marc:record"> |
| 15 |
|
| 16 |
<!-- Sysprefs --> |
| 17 |
<xsl:variable name="OPACBaseURL" select="marc:sysprefs/marc:syspref[@name='OPACBaseURL']"/> |
| 18 |
|
| 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="controlField008" select="marc:controlfield[@tag=008]"/> |
| 23 |
<xsl:variable name="field019b" select="marc:datafield[@tag=019]/marc:subfield[@code='b']"/> |
| 24 |
<xsl:variable name="biblionumber" select="marc:datafield[@tag=999]/marc:subfield[@code='c']"/> |
| 25 |
<xsl:variable name="materialTypeCode"> |
| 26 |
<xsl:choose> |
| 27 |
<xsl:when test="$field019b='b' or $field019b='k' or $field019b='l' or $leader6='b'">Mon</xsl:when> |
| 28 |
<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> |
| 29 |
<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> |
| 30 |
<xsl:when test="$field019b='a' or contains($field019b,'ab') or contains($field019b,'aj') or $leader6='e' or $leader6='f'">Kar</xsl:when> |
| 31 |
<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> |
| 32 |
<xsl:when test="$field019b='g' or contains($field019b,'gb') or contains($field019b,'gd') or contains($field019b,'ge') or $leader6='m'">Fil</xsl:when> |
| 33 |
<xsl:when test="$leader6='o'">kom</xsl:when> |
| 34 |
<xsl:when test="$field019b='h' or $leader6='r'">trd</xsl:when> |
| 35 |
<xsl:when test="$field019b='j' or $leader6='a'"> |
| 36 |
<xsl:choose> |
| 37 |
<xsl:when test="$leader7='a' or $leader7='c' or $leader7='m' or $leader7='p'">Mon</xsl:when> |
| 38 |
<xsl:when test="$field019b='j' or $leader7='b' or $leader7='s'">Per</xsl:when> |
| 39 |
</xsl:choose> |
| 40 |
</xsl:when> |
| 41 |
</xsl:choose> |
| 42 |
</xsl:variable> |
| 43 |
<xsl:variable name="materialTypeLabel"> |
| 44 |
<xsl:choose> |
| 45 |
<xsl:when test="$field019b='b' or $field019b='k' or $field019b='l' or $leader6='b'">Bok</xsl:when> |
| 46 |
<xsl:when test="$field019b='e' or contains($field019b,'ec') or contains($field019b,'ed') or contains($field019b,'ee') or contains($field019b,'ef') or $leader6='g'">Film og video</xsl:when> |
| 47 |
<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'">Musikalier</xsl:when> |
| 48 |
<xsl:when test="$field019b='a' or contains($field019b,'ab') or contains($field019b,'aj') or $leader6='e' or $leader6='f'">Kart</xsl:when> |
| 49 |
<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'">Grafisk materiale</xsl:when> |
| 50 |
<xsl:when test="$field019b='g' or contains($field019b,'gb') or contains($field019b,'gd') or contains($field019b,'ge') or $leader6='m'">Fil</xsl:when> |
| 51 |
<xsl:when test="$leader6='o'">Kombidokument</xsl:when> |
| 52 |
<xsl:when test="$field019b='h' or $leader6='r'">Tredimensjonal gjenstand</xsl:when> |
| 53 |
<xsl:when test="$field019b='j' or $leader6='a'"> |
| 54 |
<xsl:choose> |
| 55 |
<xsl:when test="$leader7='a' or $leader7='c' or $leader7='m' or $leader7='p'">Bok</xsl:when> |
| 56 |
<xsl:when test="$field019b='j' or $leader7='b' or $leader7='s'">Periodikum</xsl:when> |
| 57 |
</xsl:choose> |
| 58 |
</xsl:when> |
| 59 |
</xsl:choose> |
| 60 |
|
| 61 |
</xsl:variable> |
| 62 |
|
| 63 |
<!-- Tittel og ansvarsopplysninger --> |
| 64 |
<xsl:if test="marc:datafield[@tag=245]"> |
| 65 |
<h1> |
| 66 |
<xsl:for-each select="marc:datafield[@tag=245]"> |
| 67 |
<xsl:call-template name="subfieldSelect"> |
| 68 |
<xsl:with-param name="codes">a</xsl:with-param> |
| 69 |
</xsl:call-template> |
| 70 |
<xsl:if test="marc:subfield[@code='b']"> |
| 71 |
<xsl:text> : </xsl:text> |
| 72 |
<xsl:call-template name="subfieldSelect"> |
| 73 |
<xsl:with-param name="codes">b</xsl:with-param> |
| 74 |
</xsl:call-template> |
| 75 |
</xsl:if> |
| 76 |
<xsl:if test="marc:subfield[@code='h']"> |
| 77 |
<xsl:text> </xsl:text> |
| 78 |
(<xsl:call-template name="subfieldSelect"> |
| 79 |
<xsl:with-param name="codes">h</xsl:with-param> |
| 80 |
</xsl:call-template>) |
| 81 |
</xsl:if> |
| 82 |
<xsl:text> </xsl:text> |
| 83 |
<xsl:call-template name="subfieldSelect"> |
| 84 |
<xsl:with-param name="codes">np</xsl:with-param> |
| 85 |
</xsl:call-template> |
| 86 |
</xsl:for-each> |
| 87 |
</h1> |
| 88 |
</xsl:if> |
| 89 |
|
| 90 |
<!-- Author Statement --> |
| 91 |
<!-- 245$9 is Koha authority number --> |
| 92 |
<xsl:choose> |
| 93 |
<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]"> |
| 94 |
<h5 class="author">av |
| 95 |
<xsl:for-each select="marc:datafield[@tag=100 or @tag=700]"> |
| 96 |
<a> |
| 97 |
<xsl:choose> |
| 98 |
<xsl:when test="marc:subfield[@code=9]"> |
| 99 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
| 100 |
</xsl:when> |
| 101 |
<xsl:otherwise> |
| 102 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> |
| 103 |
</xsl:otherwise> |
| 104 |
</xsl:choose> |
| 105 |
<xsl:call-template name="nameABCDQ"/></a> |
| 106 |
<xsl:choose> |
| 107 |
<xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 108 |
</xsl:for-each> |
| 109 |
|
| 110 |
<xsl:for-each select="marc:datafield[@tag=110 or @tag=710]"> |
| 111 |
<a> |
| 112 |
<xsl:choose> |
| 113 |
<xsl:when test="marc:subfield[@code=9]"> |
| 114 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
| 115 |
</xsl:when> |
| 116 |
<xsl:otherwise> |
| 117 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> |
| 118 |
</xsl:otherwise> |
| 119 |
</xsl:choose> |
| 120 |
<xsl:call-template name="nameABCDN"/></a> |
| 121 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 122 |
</xsl:for-each> |
| 123 |
|
| 124 |
<xsl:for-each select="marc:datafield[@tag=111 or @tag=711]"> |
| 125 |
<a> |
| 126 |
<xsl:choose> |
| 127 |
<xsl:when test="marc:subfield[@code=9]"> |
| 128 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
| 129 |
</xsl:when> |
| 130 |
<xsl:otherwise> |
| 131 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> |
| 132 |
</xsl:otherwise> |
| 133 |
</xsl:choose> |
| 134 |
<xsl:call-template name="nameACDEQ"/></a> |
| 135 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 136 |
|
| 137 |
</xsl:for-each> |
| 138 |
</h5> |
| 139 |
</xsl:when> |
| 140 |
</xsl:choose> |
| 141 |
|
| 142 |
|
| 143 |
<xsl:if test="$materialTypeCode!=''"> |
| 144 |
<span class="results_summary"><span class="label">Materialtype: </span> |
| 145 |
<xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element> |
| 146 |
<xsl:value-of select="$materialTypeLabel"/> |
| 147 |
</span> |
| 148 |
</xsl:if> |
| 149 |
|
| 150 |
<!--Series --> |
| 151 |
<xsl:if test="marc:datafield[@tag=440 or @tag=490]"> |
| 152 |
<span class="results_summary"><span class="label">Series: </span> |
| 153 |
<xsl:for-each select="marc:datafield[@tag=440]"> |
| 154 |
<a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}"> |
| 155 |
<xsl:call-template name="chopPunctuation"> |
| 156 |
<xsl:with-param name="chopString"> |
| 157 |
<xsl:call-template name="subfieldSelect"> |
| 158 |
<xsl:with-param name="codes">av</xsl:with-param> |
| 159 |
</xsl:call-template> |
| 160 |
</xsl:with-param> |
| 161 |
</xsl:call-template> |
| 162 |
</a> |
| 163 |
<xsl:text> </xsl:text><xsl:call-template name="part"/> |
| 164 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 165 |
</xsl:for-each> |
| 166 |
|
| 167 |
<xsl:for-each select="marc:datafield[@tag=490][@ind1=0]"> |
| 168 |
<a href="/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfield[@code='a']}"> |
| 169 |
<xsl:call-template name="chopPunctuation"> |
| 170 |
<xsl:with-param name="chopString"> |
| 171 |
<xsl:call-template name="subfieldSelect"> |
| 172 |
<xsl:with-param name="codes">av</xsl:with-param> |
| 173 |
</xsl:call-template> |
| 174 |
</xsl:with-param> |
| 175 |
</xsl:call-template> |
| 176 |
</a> |
| 177 |
<xsl:call-template name="part"/> |
| 178 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 179 |
</xsl:for-each> |
| 180 |
</span> |
| 181 |
</xsl:if> |
| 182 |
|
| 183 |
<!-- Publisher Statement --> |
| 184 |
|
| 185 |
<xsl:if test="marc:datafield[@tag=260]"> |
| 186 |
<span class="results_summary"><span class="label">Utgiver: </span> |
| 187 |
<xsl:for-each select="marc:datafield[@tag=260]"> |
| 188 |
<xsl:call-template name="chopPunctuation"> |
| 189 |
<xsl:with-param name="chopString"> |
| 190 |
<xsl:call-template name="subfieldSelect"> |
| 191 |
<xsl:with-param name="codes">bcg</xsl:with-param> |
| 192 |
</xsl:call-template> |
| 193 |
</xsl:with-param> |
| 194 |
</xsl:call-template> |
| 195 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 196 |
</xsl:for-each> |
| 197 |
</span> |
| 198 |
</xsl:if> |
| 199 |
|
| 200 |
<!-- Edition Statement --> |
| 201 |
|
| 202 |
<xsl:if test="marc:datafield[@tag=250]"> |
| 203 |
<span class="results_summary"><span class="label">Utgave: </span> |
| 204 |
<xsl:for-each select="marc:datafield[@tag=250]"> |
| 205 |
<xsl:call-template name="chopPunctuation"> |
| 206 |
<xsl:with-param name="chopString"> |
| 207 |
<xsl:call-template name="subfieldSelect"> |
| 208 |
<xsl:with-param name="codes">ab</xsl:with-param> |
| 209 |
</xsl:call-template> |
| 210 |
</xsl:with-param> |
| 211 |
</xsl:call-template> |
| 212 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 213 |
</xsl:for-each> |
| 214 |
</span> |
| 215 |
</xsl:if> |
| 216 |
|
| 217 |
<!-- Description --> |
| 218 |
|
| 219 |
<xsl:if test="marc:datafield[@tag=300]"> |
| 220 |
<span class="results_summary"><span class="label">Beskrivelse: </span> |
| 221 |
<xsl:for-each select="marc:datafield[@tag=300]"> |
| 222 |
<xsl:call-template name="chopPunctuation"> |
| 223 |
<xsl:with-param name="chopString"> |
| 224 |
<xsl:call-template name="subfieldSelect"> |
| 225 |
<xsl:with-param name="codes">abceg</xsl:with-param> |
| 226 |
</xsl:call-template> |
| 227 |
</xsl:with-param> |
| 228 |
</xsl:call-template> |
| 229 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 230 |
</xsl:for-each> |
| 231 |
</span> |
| 232 |
</xsl:if> |
| 233 |
|
| 234 |
<abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr> |
| 235 |
|
| 236 |
<xsl:if test="marc:datafield[@tag=020]"> |
| 237 |
<span class="results_summary"><span class="label">ISBN: </span> |
| 238 |
<xsl:for-each select="marc:datafield[@tag=020]"> |
| 239 |
<xsl:variable name="isbn" select="marc:subfield[@code='a']"/> |
| 240 |
<xsl:value-of select="marc:subfield[@code='a']"/> |
| 241 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 242 |
</xsl:for-each> |
| 243 |
</span> |
| 244 |
</xsl:if> |
| 245 |
|
| 246 |
<xsl:if test="marc:datafield[@tag=022]"> |
| 247 |
<span class="results_summary"><span class="label">ISSN: </span> |
| 248 |
<xsl:for-each select="marc:datafield[@tag=022]"> |
| 249 |
<xsl:value-of select="marc:subfield[@code='a']"/> |
| 250 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 251 |
</xsl:for-each> |
| 252 |
</span> |
| 253 |
</xsl:if> |
| 254 |
|
| 255 |
<!-- Other Title Statement --> |
| 256 |
|
| 257 |
<xsl:if test="marc:datafield[@tag=246]"> |
| 258 |
<span class="results_summary"><span class="label">Parallelltittel: </span> |
| 259 |
<xsl:for-each select="marc:datafield[@tag=246]"> |
| 260 |
<xsl:call-template name="chopPunctuation"> |
| 261 |
<xsl:with-param name="chopString"> |
| 262 |
<xsl:call-template name="subfieldSelect"> |
| 263 |
<xsl:with-param name="codes">abhfgnp</xsl:with-param> |
| 264 |
</xsl:call-template> |
| 265 |
</xsl:with-param> |
| 266 |
</xsl:call-template> |
| 267 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 268 |
</xsl:for-each> |
| 269 |
</span> |
| 270 |
</xsl:if> |
| 271 |
|
| 272 |
<!-- Uniform Title Statement --> |
| 273 |
|
| 274 |
<xsl:if test="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]"> |
| 275 |
<span class="results_summary"><span class="label">Standardtittel: </span> |
| 276 |
<xsl:for-each select="marc:datafield[@tag=130]|marc:datafield[@tag=240]|marc:datafield[@tag=730][@ind2!=2]"> |
| 277 |
<xsl:variable name="str"> |
| 278 |
<xsl:for-each select="marc:subfield"> |
| 279 |
<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'])))"> |
| 280 |
<xsl:value-of select="text()"/> |
| 281 |
<xsl:text> </xsl:text> |
| 282 |
</xsl:if> |
| 283 |
</xsl:for-each> |
| 284 |
</xsl:variable> |
| 285 |
<xsl:call-template name="chopPunctuation"> |
| 286 |
<xsl:with-param name="chopString"> |
| 287 |
<xsl:value-of select="substring($str,1,string-length($str)-1)"/> |
| 288 |
|
| 289 |
</xsl:with-param> |
| 290 |
</xsl:call-template> |
| 291 |
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> |
| 292 |
</xsl:for-each> |
| 293 |
</span> |
| 294 |
</xsl:if> |
| 295 |
|
| 296 |
<xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']"> |
| 297 |
<span class="results_summary"><span class="label">Emner: </span> |
| 298 |
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']"> |
| 299 |
<a> |
| 300 |
<xsl:choose> |
| 301 |
<xsl:when test="marc:subfield[@code=9]"> |
| 302 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> |
| 303 |
</xsl:when> |
| 304 |
<xsl:otherwise> |
| 305 |
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute> |
| 306 |
</xsl:otherwise> |
| 307 |
</xsl:choose> |
| 308 |
<xsl:call-template name="chopPunctuation"> |
| 309 |
<xsl:with-param name="chopString"> |
| 310 |
<xsl:call-template name="subfieldSelect"> |
| 311 |
<xsl:with-param name="codes">abcdvxyz</xsl:with-param> |
| 312 |
<xsl:with-param name="subdivCodes">vxyz</xsl:with-param> |
| 313 |
<xsl:with-param name="subdivDelimiter">-- </xsl:with-param> |
| 314 |
</xsl:call-template> |
| 315 |
</xsl:with-param> |
| 316 |
</xsl:call-template></a> |
| 317 |
<xsl:choose> |
| 318 |
<xsl:when test="position()=last()"></xsl:when> |
| 319 |
<xsl:otherwise> | </xsl:otherwise> |
| 320 |
</xsl:choose> |
| 321 |
|
| 322 |
</xsl:for-each> |
| 323 |
</span> |
| 324 |
</xsl:if> |
| 325 |
|
| 326 |
<xsl:if test="marc:datafield[@tag=856]"> |
| 327 |
<span class="results_summary"><span class="label">Nettbasert ressurs: </span> |
| 328 |
<xsl:for-each select="marc:datafield[@tag=856]"> |
| 329 |
<a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> |
| 330 |
<xsl:choose> |
| 331 |
<xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']"> |
| 332 |
<xsl:call-template name="subfieldSelect"> |
| 333 |
<xsl:with-param name="codes">y3z</xsl:with-param> |
| 334 |
</xsl:call-template> |
| 335 |
</xsl:when> |
| 336 |
<xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])"> |
| 337 |
Klikk her for tilgang |
| 338 |
</xsl:when> |
| 339 |
</xsl:choose> |
| 340 |
</a> |
| 341 |
<xsl:choose> |
| 342 |
<xsl:when test="position()=last()"></xsl:when> |
| 343 |
<xsl:otherwise> | </xsl:otherwise> |
| 344 |
</xsl:choose> |
| 345 |
</xsl:for-each> |
| 346 |
</span> |
| 347 |
</xsl:if> |
| 348 |
|
| 349 |
<!-- NORMARC does not define indicators for 505 |
| 350 |
<xsl:if test="marc:datafield[@tag=505]"> |
| 351 |
<xsl:for-each select="marc:datafield[@tag=505]"> |
| 352 |
<span class="results_summary"><span class="label"> |
| 353 |
<xsl:choose> |
| 354 |
<xsl:when test="@ind1=0"> |
| 355 |
Contents: |
| 356 |
</xsl:when> |
| 357 |
<xsl:when test="@ind1=1"> |
| 358 |
Incomplete contents: |
| 359 |
</xsl:when> |
| 360 |
<xsl:when test="@ind1=1"> |
| 361 |
Partial contents: |
| 362 |
</xsl:when> |
| 363 |
</xsl:choose> |
| 364 |
</span> |
| 365 |
<xsl:choose> |
| 366 |
<xsl:when test="@ind2=0"> |
| 367 |
<xsl:for-each select="marc:subfield[@code='t']"> |
| 368 |
<xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/> |
| 369 |
</xsl:for-each> |
| 370 |
</xsl:when> |
| 371 |
<xsl:otherwise> |
| 372 |
<xsl:call-template name="subfieldSelect"> |
| 373 |
<xsl:with-param name="codes">au</xsl:with-param> |
| 374 |
</xsl:call-template> |
| 375 |
</xsl:otherwise> |
| 376 |
</xsl:choose> |
| 377 |
</span> |
| 378 |
</xsl:for-each> |
| 379 |
</xsl:if> |
| 380 |
--> |
| 381 |
<xsl:if test="marc:datafield[@tag=505]"> |
| 382 |
<xsl:call-template name="subfieldSelect"> |
| 383 |
<xsl:with-param name="codes">a</xsl:with-param> |
| 384 |
</xsl:call-template> |
| 385 |
</xsl:if> |
| 386 |
|
| 387 |
<!-- 780 --> |
| 388 |
<xsl:if test="marc:datafield[@tag=780]"> |
| 389 |
<xsl:for-each select="marc:datafield[@tag=780]"> |
| 390 |
<span class="results_summary"><span class="label"> |
| 391 |
<xsl:choose> |
| 392 |
<xsl:when test="@ind2=0"> |
| 393 |
Fortsettelse av: |
| 394 |
</xsl:when> |
| 395 |
<xsl:when test="@ind2=1"> |
| 396 |
Delvis fortsettelse av: |
| 397 |
</xsl:when> |
| 398 |
<xsl:when test="@ind2=2"> |
| 399 |
Avløser: |
| 400 |
</xsl:when> |
| 401 |
<xsl:when test="@ind2=3"> |
| 402 |
Avløser delvis: |
| 403 |
</xsl:when> |
| 404 |
<xsl:when test="@ind2=4"> |
| 405 |
Sammenslåing av: ... ; og ... |
| 406 |
</xsl:when> |
| 407 |
<xsl:when test="@ind2=5"> |
| 408 |
Har tatt opp: |
| 409 |
</xsl:when> |
| 410 |
<xsl:when test="@ind2=6"> |
| 411 |
Har delvis tatt opp: |
| 412 |
</xsl:when> |
| 413 |
<xsl:when test="@ind2=7"> |
| 414 |
Utskilt fra: |
| 415 |
</xsl:when> |
| 416 |
</xsl:choose> |
| 417 |
</span> |
| 418 |
<xsl:variable name="f780"> |
| 419 |
<xsl:call-template name="subfieldSelect"> |
| 420 |
<xsl:with-param name="codes">a_t</xsl:with-param> |
| 421 |
</xsl:call-template> |
| 422 |
</xsl:variable> |
| 423 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute> |
| 424 |
<xsl:value-of select="translate($f780, '()', '')"/> |
| 425 |
</a> |
| 426 |
</span> |
| 427 |
|
| 428 |
<xsl:choose> |
| 429 |
<xsl:when test="@ind1=0"> |
| 430 |
<span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span> |
| 431 |
</xsl:when> |
| 432 |
</xsl:choose> |
| 433 |
|
| 434 |
</xsl:for-each> |
| 435 |
</xsl:if> |
| 436 |
|
| 437 |
<!-- 785 --> |
| 438 |
<xsl:if test="marc:datafield[@tag=785]"> |
| 439 |
<xsl:for-each select="marc:datafield[@tag=785]"> |
| 440 |
<span class="results_summary"><span class="label"> |
| 441 |
<xsl:choose> |
| 442 |
<xsl:when test="@ind2=0"> |
| 443 |
Fortsettelse i: |
| 444 |
</xsl:when> |
| 445 |
<xsl:when test="@ind2=1"> |
| 446 |
Fortsettes delvis i: |
| 447 |
</xsl:when> |
| 448 |
<xsl:when test="@ind2=2"> |
| 449 |
Avløst av: |
| 450 |
</xsl:when> |
| 451 |
<xsl:when test="@ind2=3"> |
| 452 |
Delvis avløst av: |
| 453 |
</xsl:when> |
| 454 |
<xsl:when test="@ind2=4"> |
| 455 |
Gått inn i: |
| 456 |
</xsl:when> |
| 457 |
<xsl:when test="@ind2=5"> |
| 458 |
Delvis gått inn i: |
| 459 |
</xsl:when> |
| 460 |
<xsl:when test="@ind2=6"> |
| 461 |
Fortsettes av: ...; og ... |
| 462 |
</xsl:when> |
| 463 |
<xsl:when test="@ind2=7"> |
| 464 |
Slått sammen med: .., til: ... |
| 465 |
</xsl:when> |
| 466 |
</xsl:choose> |
| 467 |
</span> |
| 468 |
<xsl:variable name="f785"> |
| 469 |
<xsl:call-template name="subfieldSelect"> |
| 470 |
<xsl:with-param name="codes">a_t</xsl:with-param> |
| 471 |
</xsl:call-template> |
| 472 |
</xsl:variable> |
| 473 |
|
| 474 |
<a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute> |
| 475 |
<xsl:value-of select="translate($f785, '()', '')"/> |
| 476 |
</a> |
| 477 |
|
| 478 |
</span> |
| 479 |
</xsl:for-each> |
| 480 |
</xsl:if> |
| 481 |
|
| 482 |
<!-- This will only work if the OPACBaseURL syspref is set. --> |
| 483 |
<xsl:if test="string-length($OPACBaseURL) > 0"> |
| 484 |
<p>OPAC View: <a> |
| 485 |
<xsl:attribute name="href">http://<xsl:value-of select="$OPACBaseURL"/>/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> |
| 486 |
<xsl:attribute name="target">_blank</xsl:attribute> |
| 487 |
Open in new window |
| 488 |
</a></p> |
| 489 |
</xsl:if> |
| 490 |
|
| 491 |
</xsl:template> |
| 492 |
|
| 493 |
<xsl:template name="part"> |
| 494 |
<xsl:variable name="partNumber"> |
| 495 |
<xsl:call-template name="specialSubfieldSelect"> |
| 496 |
<xsl:with-param name="axis">n</xsl:with-param> |
| 497 |
<xsl:with-param name="anyCodes">n</xsl:with-param> |
| 498 |
<xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> |
| 499 |
</xsl:call-template> |
| 500 |
</xsl:variable> |
| 501 |
<xsl:variable name="partName"> |
| 502 |
<xsl:call-template name="specialSubfieldSelect"> |
| 503 |
<xsl:with-param name="axis">p</xsl:with-param> |
| 504 |
<xsl:with-param name="anyCodes">p</xsl:with-param> |
| 505 |
<xsl:with-param name="afterCodes">fghkdlmor</xsl:with-param> |
| 506 |
</xsl:call-template> |
| 507 |
</xsl:variable> |
| 508 |
<xsl:if test="string-length(normalize-space($partNumber))"> |
| 509 |
<xsl:call-template name="chopPunctuation"> |
| 510 |
<xsl:with-param name="chopString" select="$partNumber"/> |
| 511 |
</xsl:call-template> |
| 512 |
</xsl:if> |
| 513 |
<xsl:if test="string-length(normalize-space($partName))"> |
| 514 |
<xsl:call-template name="chopPunctuation"> |
| 515 |
<xsl:with-param name="chopString" select="$partName"/> |
| 516 |
</xsl:call-template> |
| 517 |
</xsl:if> |
| 518 |
</xsl:template> |
| 519 |
|
| 520 |
<xsl:template name="specialSubfieldSelect"> |
| 521 |
<xsl:param name="anyCodes"/> |
| 522 |
<xsl:param name="axis"/> |
| 523 |
<xsl:param name="beforeCodes"/> |
| 524 |
<xsl:param name="afterCodes"/> |
| 525 |
<xsl:variable name="str"> |
| 526 |
<xsl:for-each select="marc:subfield"> |
| 527 |
<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])"> |
| 528 |
<xsl:value-of select="text()"/> |
| 529 |
<xsl:text> </xsl:text> |
| 530 |
</xsl:if> |
| 531 |
</xsl:for-each> |
| 532 |
</xsl:variable> |
| 533 |
<xsl:value-of select="substring($str,1,string-length($str)-1)"/> |
| 534 |
</xsl:template> |
| 535 |
</xsl:stylesheet> |