From f67f85dd9dca7bb3f0683ccbe33a7b03bcbdd289 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Thu, 10 Nov 2011 01:05:40 -0500 Subject: [PATCH] Index leading articles with apostrophes correctly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Titles with non-filing characters used to get separated by spaces; not a problem in English with leading articles like "The" and "A" which are followed by spaces anyway, but a significant problem for French where "L'année" is not supposed to be turned into "L' année". To combat this, we define a titleNonfiling variant in the MODS32 stylesheets that ignores the second indicator and does not wrap leading articles in the nonSort element, avoiding the injection of unwanted spaces. Signed-off-by: Dan Scott --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 2 +- Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql | 36 ++++++++++++++++++++ Open-ILS/xsl/MARC21slim2MODS32.xsl | 36 ++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 686471e585..e032835fb5 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -47,7 +47,7 @@ INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES (5, 'title', 'uniform', oils_i18n_gettext(5, 'Uniform Title', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleInfo[mods32:title and (@type='uniform')]$$ ); INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES - (6, 'title', 'proper', oils_i18n_gettext(6, 'Title Proper', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleInfo[mods32:title and not (@type)]$$ ); + (6, 'title', 'proper', oils_i18n_gettext(6, 'Title Proper', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:titleNonfiling[mods32:title and not (@type)]$$ ); INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_xpath, facet_field ) VALUES (7, 'author', 'corporate', oils_i18n_gettext(7, 'Corporate Author', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:name[@type='corporate' and mods32:role/mods32:roleTerm[text()='creator']]$$, $$//*[local-name()='namePart']$$, TRUE ); -- /* to fool vim */; diff --git a/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql b/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql index b0f3e4eaac..e775b66b4c 100644 --- a/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql +++ b/Open-ILS/src/sql/Pg/953.data.MODS32-xsl.sql @@ -130,6 +130,42 @@ Added Log Comment + + + + + + + b + afgk + + + + + abfgk + + + + + + <xsl:value-of select="$title"/> + + + + + + + b + b + afgk + + + + + + + diff --git a/Open-ILS/xsl/MARC21slim2MODS32.xsl b/Open-ILS/xsl/MARC21slim2MODS32.xsl index 98cea9780c..303c378359 100644 --- a/Open-ILS/xsl/MARC21slim2MODS32.xsl +++ b/Open-ILS/xsl/MARC21slim2MODS32.xsl @@ -130,6 +130,42 @@ Added Log Comment + + + + + + + b + afgk + + + + + abfgk + + + + + + <xsl:value-of select="$title"/> + + + + + + + b + b + afgk + + + + + + + -- 2.43.2