Bug 18540: Update MARC21 biblio XSL file
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 7 Jan 2022 13:54:34 +0000 (10:54 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 19 Jan 2022 07:15:04 +0000 (21:15 -1000)
I ran the xsltproc on both MARC21 and UNIMARC files (biblios and
authorities). With my follow-up the only changed one is this one.

I skipped NORMARC as it is supposed to be removed by now (so unused in
Norway).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl

index 0b689ca..626c44c 100644 (file)
@@ -17,7 +17,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
   <xslo:template match="text()" mode="index_heading_conditional"/>
   <xslo:template match="text()" mode="index_match_heading"/>
   <xslo:template match="text()" mode="index_subject_thesaurus"/>
-  <xslo:template match="text()" mode="index_sort_tit"/>
+  <xslo:template match="text()" mode="index_sort_title"/>
   <xslo:template match="/">
     <xslo:if test="marc:collection">
       <collection>
@@ -43,7 +43,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:apply-templates mode="index_match_heading"/>
       <xslo:apply-templates mode="index_subject_thesaurus"/>
       <xslo:apply-templates mode="index_all"/>
-      <xslo:apply-templates mode="index_sort_tit"/>
+      <xslo:apply-templates mode="index_sort_title"/>
     </z:record>
   </xslo:template>
   <xslo:template match="marc:leader">
@@ -2688,12 +2688,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       </z:index>
     </xslo:if>
   </xslo:template>
-  <xslo:template mode="index_all" match="text()">
-    <z:index name="Any:w Any:p">
-      <xslo:value-of select="."/>
-    </z:index>
-  </xslo:template>
-  <xslo:template mode="index_sort_tit" match="marc:datafield[@tag='245']">
+  <xslo:template mode="index_sort_title" match="marc:datafield[@tag='245']">
     <xslo:variable name="chop">
       <xslo:choose>
         <xslo:when test="not(number(@ind2))">0</xslo:when>
@@ -2706,6 +2701,11 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml)
       <xslo:value-of select="substring(marc:subfield[@code='a'], $chop+1)"/>
     </z:index>
   </xslo:template>
+  <xslo:template mode="index_all" match="text()">
+    <z:index name="Any:w Any:p">
+      <xslo:value-of select="."/>
+    </z:index>
+  </xslo:template>
   <xslo:template name="chopPunctuation">
     <xslo:param name="chopString"/>
     <xslo:variable name="length" select="string-length($chopString)"/>