From 75989590a8e99e809aa52be4a4aaecf8af23942f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 13 May 2021 16:34:38 +0000 Subject: [PATCH] Bug 18540: Handle indexing sort title only when needed This patch moves the code that generates the xsl for MARC21 biblio sorting to it's own template that is only called when specified in the xml To test: 1 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 2 - git diff 3 - Note that authority-zebra-indexdefs.xsl now has 245 Title:s info 4 - Apply patch 5 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl 6 - git diff 7 - There are lines added about title sort, but no 245 block 8 - xsltproc etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml > etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl 9 - git diff 10 - Note lines changes to ...title_sort 11 - 245 block does not change --- .../marc21/biblios/biblio-koha-indexdefs.xml | 3 ++ etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl | 42 +++++++++++++++------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml index e1941793c9..925d18cef8 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml +++ b/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml @@ -390,6 +390,9 @@ Title-collective:w + + Title:s + Title-cover:w Title-cover:p diff --git a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl index 59876caf73..6c40025bc6 100644 --- a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl +++ b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl @@ -19,6 +19,7 @@ + @@ -39,7 +40,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -66,7 +67,7 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - + @@ -78,23 +79,13 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + - - - - 0 - - - - - - - @@ -450,6 +441,31 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) + + + + + marc:datafield[@tag=' + + '] + + + + + 0 + + + + + + + + + + + + + -- 2.11.0