[open-ils-commits] r18836 - branches/rel_2_0/Open-ILS/src/sql/Pg (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Nov 23 09:12:24 EST 2010


Author: gmc
Date: 2010-11-23 09:12:22 -0500 (Tue, 23 Nov 2010)
New Revision: 18836

Modified:
   branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
Log:
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 <gmc at esilibrary.com>

Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql	2010-11-23 14:11:51 UTC (rev 18835)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql	2010-11-23 14:12:22 UTC (rev 18836)
@@ -16340,6 +16340,21 @@
     
 </xsl:stylesheet>$$);
 
+-- 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 (



More information about the open-ils-commits mailing list