[open-ils-commits] r11163 - branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 13 13:33:53 EST 2008
Author: erickson
Date: 2008-11-13 13:33:50 -0500 (Thu, 13 Nov 2008)
New Revision: 11163
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Log:
the subfields, like the datafields, need the appropriate XML namespace
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-11-13 18:33:19 UTC (rev 11162)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-11-13 18:33:50 UTC (rev 11163)
@@ -447,9 +447,9 @@
my $add_039 = 0;
- my $xpath = '//marc:datafield[@tag="039"]/subfield[@code="a"]';
+ my $xpath = '//marc:datafield[@tag="039"]/marc:subfield[@code="a"]';
my ($tcn) = $marcxml->documentElement->findvalue($xpath) =~ /(\w+)\s*$/o;
- $xpath = '//marc:datafield[@tag="039"]/subfield[@code="b"]';
+ $xpath = '//marc:datafield[@tag="039"]/marc:subfield[@code="b"]';
my $tcn_source = $marcxml->documentElement->findvalue($xpath) || "System Local";
if(_tcn_exists($editor, $tcn, $tcn_source, $existing_rec)) {
@@ -460,14 +460,14 @@
if(!$tcn) {
- $xpath = '//marc:datafield[@tag="020"]/subfield[@code="a"]';
+ $xpath = '//marc:datafield[@tag="020"]/marc:subfield[@code="a"]';
($tcn) = $marcxml->documentElement->findvalue($xpath) =~ /(\w+)\s*$/o;
$tcn_source = "ISBN";
if(_tcn_exists($editor, $tcn, $tcn_source, $existing_rec)) {$tcn = undef;}
}
if(!$tcn) {
- $xpath = '//marc:datafield[@tag="022"]/subfield[@code="a"]';
+ $xpath = '//marc:datafield[@tag="022"]/marc:subfield[@code="a"]';
($tcn) = $marcxml->documentElement->findvalue($xpath) =~ /(\w+)\s*$/o;
$tcn_source = "ISSN";
if(_tcn_exists($editor, $tcn, $tcn_source, $existing_rec)) {$tcn = undef;}
@@ -481,7 +481,7 @@
}
if(!$tcn) {
- $xpath = '//marc:datafield[@tag="035"]/subfield[@code="a"]';
+ $xpath = '//marc:datafield[@tag="035"]/marc:subfield[@code="a"]';
($tcn) = $marcxml->documentElement->findvalue($xpath) =~ /(\w+)\s*$/o;
$tcn_source = "System Legacy";
if(_tcn_exists($editor, $tcn, $tcn_source, $existing_rec)) {$tcn = undef;}
More information about the open-ils-commits
mailing list