<?xml version="1.0" encoding="UTF-8"?>
+<!--
+This file has been automatically generated from a Koha index definition file
+with the stylesheet koha-indexdefs-to-zebra.xsl. Do not manually edit this file,
+as it may be overwritten. To regenerate, edit the appropriate Koha index
+definition file (probably something like authority-koha-indexdefs.xml) and run:
+`xsltproc koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml >
+authority-zebra-indexdefs.xsl` (substituting the appropriate file names).
+-->
<xslo:stylesheet xmlns:xslo="http://www.w3.org/1999/XSL/Transform" xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:z="http://indexdata.com/zebra-2.0" xmlns:kohaidx="http://www.koha-community.org/schemas/index-defs" version="1.0">
<xslo:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
<xslo:template match="text()"/>
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='400']">
<z:index name="Personal-name-see-from:w Personal-name-see-from:p Personal-name-see-from:s See-from:w See-from:p See-from:s">
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='410']">
<z:index name="Corporate-name-see-from:w Corporate-name-see-from:p Corporate-name-see-from:s See-from:w See-from:p See-from:s">
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='411']">
<z:index name="Meeting-name-see-from:w Meeting-name-see-from:p Meeting-name-see-from:s See-from:w See-from:p See-from:s">
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='430']">
<z:index name="Title-uniform-see-from:w Title-uniform-see-from:p Title-uniform-see-from:s See-from:w See-from:p See-from:s">
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='448']">
<z:index name="Chronological-term-see-from:w Chronological-term-see-from:p Chronological-term-see-from:s See-from:w See-from:p See-from:s">
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='450']">
<z:index name="Subject-topical-see-from:w Subject-topical-see-from:p Subject-topical-see-from:s See-from:w See-from:p See-from:s">
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='451']">
<z:index name="Name-geographic-see-from:w Name-geographic-see-from:p Name-geographic-see-from:s See-from:w See-from:p See-from:s">
</xslo:variable>
<xslo:value-of select="normalize-space($raw_heading)"/>
</z:index>
+ <z:index name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:variable name="raw_heading">
+ <xslo:for-each select="marc:subfield">
+ <xslo:if test="contains('a', @code)" name="Heading-Main:w Heading-Main:p Heading-Main:s">
+ <xslo:if test="position() > 1">
+ <xslo:choose>
+ <xslo:when test="contains('', @code)">
+ <xslo:text>--</xslo:text>
+ </xslo:when>
+ <xslo:otherwise>
+ <xslo:value-of select="substring(' ', 1, 1)"/>
+ </xslo:otherwise>
+ </xslo:choose>
+ </xslo:if>
+ <xslo:value-of select="."/>
+ </xslo:if>
+ </xslo:for-each>
+ </xslo:variable>
+ <xslo:value-of select="normalize-space($raw_heading)"/>
+ </z:index>
</xslo:template>
<xslo:template mode="index_heading" match="marc:datafield[@tag='455']">
<z:index name="Term-genre-form-see-from:w Term-genre-form-see-from:p Term-genre-form-see-from:s See-from:w See-from:p See-from:s">
<xslo:value-of select="$full_thesaurus_code"/>
</z:index>
</xslo:template>
+ <xslo:template match="*">
+ <z:index name="Any:w Any:p">
+ <xslo:value-of select="."/>
+ </z:index>
+ </xslo:template>
</xslo:stylesheet>