Bug 23000

Summary: Running xsltproc for authority index definitions adds unwanted changes
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: Searching - ZebraAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Katrin Fischer 2019-05-28 18:44:47 UTC
When running the xsptproc process for generating the authority zebra index configuration, there are unwanted changes added to the files:

xsltproc /etc/koha/zebradb/xsl/koha-indexdefs-to-zebra.xsl authority-koha-indexdefs.xml > authority-zebra-indexdefs.xsl

Generates:

  <xslo:template mode="index_sort_tit" match="marc:datafield[@tag='245']">
    <xslo:variable name="chop">
      <xslo:choose>
        <xslo:when test="not(number(@ind2))">0</xslo:when>
        <xslo:otherwise>
          <xslo:value-of select="number(@ind2)"/>
        </xslo:otherwise>
      </xslo:choose>
    </xslo:variable>
    <z:index name="Title:s">
      <xslo:value-of select="substring(marc:subfield[@code='a'], $chop+1)"/>
    </z:index>
  </xslo:template>

I think this is only meant for the bibliographic file.