From 3ff4384fc74a87c27f43cd5a9d41d3101ec1bcd4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 21 Sep 2015 12:46:02 -0300 Subject: [PATCH] Bug 14217: (QA followup) avoid repeating code This patch refactors the handle-one-index-subfields template to call a new template handle-one-index-subfields-helper instead of repeating the code for subfields indexing (index-subfields) which gets wrapped inside the new condition test if needed. This avoids code duplication, with the same results. Signed-off-by: Tomas Cohen Arazi --- etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl | 107 +++++++++++----------------- 1 file changed, 40 insertions(+), 67 deletions(-) diff --git a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl index 9573d85..9718e26 100644 --- a/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl +++ b/etc/zebradb/xsl/koha-indexdefs-to-zebra.xsl @@ -250,7 +250,19 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) '] - + + + + + + + + + + + + + @@ -263,73 +275,34 @@ definition file (probably something like {biblio,authority}-koha-indexdefs.xml) - - - - - - - - - - contains(' - - ', @code) - - - - - - - - substring(., - - , - - ) - - - . - - - - - - - - - - - - - - contains(' - - ', @code) + + + + contains(' + + ', @code) + + + + + + + + substring(., + + , + + ) + + + . + + - - - - - - - substring(., - - , - - ) - - - . - - - - - - - - - + + + + -- 2.5.2