[open-ils-commits] r12363 - trunk/Open-ILS/src/perlmods/OpenILS/Application (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Mar 2 19:58:27 EST 2009


Author: miker
Date: 2009-03-02 19:58:27 -0500 (Mon, 02 Mar 2009)
New Revision: 12363

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
Log:
proper XPath

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm	2009-03-03 00:51:08 UTC (rev 12362)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm	2009-03-03 00:58:27 UTC (rev 12363)
@@ -1098,23 +1098,23 @@
 
     for my $node (@nodes) {
         # first, is there a URI?
-        my $href = $node->findvalue('[local-name()="subfield" and @code="u"]/text()');
+        my $href = $node->findvalue('*[local-name()="subfield" and @code="u"]/text()');
         next unless ($href);
 
         # now, find the best possible label
-        my $label = $node->findvalue('[local-name()="subfield" and @code="y"]/text()');
-        $label ||= $node->findvalue('[local-name()="subfield" and @code="3"]/text()');
+        my $label = $node->findvalue('*[local-name()="subfield" and @code="y"]/text()');
+        $label ||= $node->findvalue('*[local-name()="subfield" and @code="3"]/text()');
         $label ||= $href;
 
         # look for use info
-        my $use = $node->findvalue('[local-name()="subfield" and @code="z"]/text()');
-        $use ||= $node->findvalue('[local-name()="subfield" and @code="2"]/text()');
-        $use ||= $node->findvalue('[local-name()="subfield" and @code="n"]/text()');
+        my $use = $node->findvalue('*[local-name()="subfield" and @code="z"]/text()');
+        $use ||= $node->findvalue('*[local-name()="subfield" and @code="2"]/text()');
+        $use ||= $node->findvalue('*[local-name()="subfield" and @code="n"]/text()');
 
         # moving on to the URI owner
-        my $owner = $node->findvalue('[local-name()="subfield" and @code="w"]/text()');
-        $owner ||= $node->findvalue('[local-name()="subfield" and @code="n"]/text()');
-        $owner ||= $node->findvalue('[local-name()="subfield" and @code="9"]/text()'); # Evergreen special sauce
+        my $owner = $node->findvalue('*[local-name()="subfield" and @code="w"]/text()');
+        $owner ||= $node->findvalue('*[local-name()="subfield" and @code="n"]/text()');
+        $owner ||= $node->findvalue('*[local-name()="subfield" and @code="9"]/text()'); # Evergreen special sauce
 
         $owner =~ s/^.*?\((\w+)\).*$/$1/o; # unwrap first paren-enclosed string and then ...
 



More information about the open-ils-commits mailing list