From fabb840587ffbca9f9e3ed83d7d33f8b9d1a505e 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 ff018d0257..66ab824a7d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm @@ -2139,10 +2139,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