From: Dan Scott Date: Mon, 20 Jun 2011 14:56:44 +0000 (-0400) Subject: Protect URI reingest from failure due to malformed XML X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0c88af95bf91553e8c20026b4f3279864dda1247;p=contrib%2FConifer.git Protect URI reingest from failure due to malformed XML In an ideal world, there would be no malformed XML. But our world is the real world of libraries, and while the well_formed_xml() protects against malformed XML in Evergreen 2.0 systems, in some cases bad XML has been able to find its way into Evergreen systems in the past. A single biblio.record_entry row containing malformed XML in the marc column will prevent the call to reingest URIs from succeeding. By limiting the set of records to those with well-formed XML, we can increase the chance of the URI reingest succeeding at the cost of more processing time. Signed-off-by: Dan Scott Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris.sql b/Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris.sql index bdb49bbbc6..85d62abc2b 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0559.schema.biblio.extract_located_uris.sql @@ -133,7 +133,9 @@ BEGIN FROM asset.call_number acn INNER JOIN asset.uri_call_number_map auricnm ON auricnm.call_number = acn.id INNER JOIN asset.uri auri ON auri.id = auricnm.uri + INNER JOIN biblio.record_entry bre ON acn.record = bre.id WHERE auri.href = auri.label + AND xml_is_well_formed(bre.marc) GROUP BY acn.record ORDER BY acn.record ) AS rec_uris