From ddd4e7d47e330f2e1c035b9de2c1eb9b795f0193 Mon Sep 17 00:00:00 2001 From: gmc Date: Tue, 23 Nov 2010 14:11:51 +0000 Subject: [PATCH] fix broken prefix and namespace URI for the mods32 transform This breakage can be found in databases that started out at version 1.2 or earlier; matters since in-DB ingest is stricter with its XPATH processing. Signed-off-by: Galen Charlton git-svn-id: svn://svn.open-ils.org/ILS/trunk@18835 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql index 4b7eef69a8..7d3f43c5bd 100644 --- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql @@ -16340,6 +16340,21 @@ this stylesheet will transform it to the equivalent of $$); +-- fix broken prefix and namespace URI for the +-- mods32 transform found in some databases +-- that started out at version 1.2 or earlier +UPDATE config.xml_transform +SET namespace_uri = 'http://www.loc.gov/mods/v3' +WHERE name = 'mods32' +AND namespace_uri = 'http://www.loc.gov/mods/' +AND xslt LIKE '%xmlns="http://www.loc.gov/mods/v3"%'; + +UPDATE config.xml_transform +SET prefix = 'mods32' +WHERE name = 'mods32' +AND prefix = 'mods' +AND EXISTS (SELECT xpath FROM config.metabib_field WHERE xpath ~ 'mods32:'); + -- Splitting the ingest trigger up into little bits CREATE TEMPORARY TABLE eg_0301_check_if_has_contents ( -- 2.11.0