1 UPDATE config.xml_transform SET xslt = $$<?xml version="1.0" encoding="UTF-8"?>
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:marc="http://www.loc.gov/MARC21/slim"
7 Copyright (C) 2010 Equinox Software, Inc.
8 Galen Charlton <gmc@esilibrary.cOM.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License
12 as published by the Free Software Foundation; either version 2
13 of the License, or (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 marc21_expand_880.xsl - stylesheet used during indexing to
21 map alternative graphical representations
22 of MARC fields stored in 880 fields
23 to the corresponding tag name and value.
25 For example, if a MARC record for a Chinese book has
27 245.00 $6 880-01 $a Ba shi san nian duan pian xiao shuo xuan
28 880.00 $6 245-01/$1 $a八十三年短篇小說選
30 this stylesheet will transform it to the equivalent of
32 245.00 $6 880-01 $a Ba shi san nian duan pian xiao shuo xuan
33 245.00 $6 245-01/$1 $a八十三年短篇小說選
36 <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
38 <xsl:template match="@*|node()">
40 <xsl:apply-templates select="@*|node()"/>
44 <xsl:template match="//marc:datafield[@tag='880']">
45 <xsl:if test="./marc:subfield[@code='6'] and string-length(./marc:subfield[@code='6']) >= 6">
47 <xsl:attribute name="tag">
48 <xsl:value-of select="substring(./marc:subfield[@code='6'], 1, 3)" />
50 <xsl:attribute name="ind1">
51 <xsl:value-of select="@ind1" />
53 <xsl:attribute name="ind2">
54 <xsl:value-of select="@ind2" />
56 <xsl:apply-templates />
62 where name = 'marc21expand880';