Bug 11232: (qa followup) empty ID due to namespace mistake
authorTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 15 Oct 2014 15:15:26 +0000 (12:15 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 15 Oct 2014 15:55:52 +0000 (12:55 -0300)
Note: NORMARC is missing the id field.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This patch makes t/db_dependent/Search.t pass again.
NORMARC is currently not tested.

I checked the results before and after applying the patch
and the facets are now looking the same as before.
Passes all tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
etc/zebradb/marc_defs/unimarc/biblios/biblio-zebra-indexdefs.xsl
etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl

index 89aefee..db4c6f2 100644 (file)
@@ -28,7 +28,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
     </xslo:if>
   </xslo:template>
   <xslo:template match="marc:record">
-    <xslo:variable name="idfield" select="normalize-space()"/>
+    <xslo:variable name="idfield" select="normalize-space(marc:datafield[@tag='999']/marc:subfield[@code='c'])"/>
     <z:record type="update">
       <xslo:attribute name="z:id">
         <xslo:value-of select="$idfield"/>
index 823cdda..db6baf4 100644 (file)
@@ -28,7 +28,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
     </xslo:if>
   </xslo:template>
   <xslo:template match="marc:record">
-    <xslo:variable name="idfield" select="normalize-space()"/>
+    <xslo:variable name="idfield" select="normalize-space(marc:controlfield[@tag='001'])"/>
     <z:record type="update">
       <xslo:attribute name="z:id">
         <xslo:value-of select="$idfield"/>
index 03e635f..e970771 100644 (file)
@@ -52,7 +52,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
 
             <xslo:template match="marc:record">
                 <xslo:variable name="idfield">
-                    <xsl:attribute name="select">normalize-space(<xsl:value-of select="//id"/>)</xsl:attribute>
+                    <xsl:attribute name="select">normalize-space(<xsl:value-of select="//kohaidx:id"/>)</xsl:attribute>
                 </xslo:variable>
                 <z:record type="update">
                     <xslo:attribute name="z:id"><xslo:value-of select="$idfield"/></xslo:attribute>