From 8bd8a1c212efe04ee9d32687e8cee092859e18fd Mon Sep 17 00:00:00 2001 From: Remington Steed Date: Tue, 24 Feb 2015 13:25:16 -0500 Subject: [PATCH] LP#957466: Fix invalid MARCXML syntax This commit fixes some invalid MARCXML syntax, and also makes the XPath query more general to allow for namespaces on the tags. Signed-off-by: Remington Steed Signed-off-by: Dan Wells --- Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm index e70e5a19e4..2a4e184326 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm @@ -2142,10 +2142,10 @@ sub set_marc_905u { my ($class, $marcdoc, $username) = @_; # Look for existing 905$u subfields. If any exist, do nothing. - my @nodes = $marcdoc->findnodes('//field[@tag="905"]/subfield[@code="u"]'); + my @nodes = $marcdoc->findnodes('//*[@tag="905"]/*[@code="u"]'); unless (@nodes) { # We create a new 905 and the subfield u to that. - my $parentNode = $marcdoc->createElement('field'); + my $parentNode = $marcdoc->createElement('datafield'); $parentNode->setAttribute('tag', '905'); $parentNode->setAttribute('ind1', ''); $parentNode->setAttribute('ind2', ''); -- 2.11.0