[open-ils-commits] r11164 - branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 13 13:36:37 EST 2008
Author: erickson
Date: 2008-11-13 13:36:34 -0500 (Thu, 13 Nov 2008)
New Revision: 11164
Modified:
branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
Log:
the subfields, like the datafields, need the appropriate XML namespace
Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm 2008-11-13 18:33:50 UTC (rev 11163)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Cat/BibCommon.pm 2008-11-13 18:36:34 UTC (rev 11164)
@@ -193,9 +193,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)) {
@@ -206,14 +206,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;}
@@ -227,7 +227,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