Bug 31532: Add preprocessor to Zebra indexing pipeline to index 880 as linked field
[koha.git] / etc / zebradb / marc_defs / normarc / biblios / preprocess_marcxml.xsl
1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim"
2  version="1.0">
3 <xsl:output indent="yes"
4       method="xml"
5       version="1.0"
6       encoding="UTF-8"/>
7
8  <xsl:template name="identity" match="node()|@*">
9    <xsl:copy>
10      <xsl:apply-templates select="@*|node()"/>
11    </xsl:copy>
12  </xsl:template>
13
14  <xsl:template match="marc:datafield[@tag=880]">
15     <xsl:element name="datafield" namespace="http://www.loc.gov/MARC21/slim">
16         <xsl:attribute name="tag"><xsl:value-of select="substring(marc:subfield[@code=6],1,3)"/></xsl:attribute>
17         <xsl:attribute name="ind1"><xsl:value-of select="@ind1"/></xsl:attribute>
18         <xsl:attribute name="ind2"><xsl:value-of select="@ind2"/></xsl:attribute>
19         <xsl:apply-templates select="marc:subfield[@code != '6']"/>
20     </xsl:element>
21 </xsl:template>
22
23 </xsl:stylesheet>