From: dbwells Date: Fri, 4 Feb 2011 18:51:45 +0000 (+0000) Subject: Fix ModsParser.pm bug involving invalid ISBNs. See bug #697398. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=181a04539b3acd6df936feb753bc8409cf4a5ea4;p=evergreen%2Fjoelewis.git Fix ModsParser.pm bug involving invalid ISBNs. See bug #697398. git-svn-id: svn://svn.open-ils.org/ILS/trunk@19383 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm index d77d07d579..287890c99c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/ModsParser.pm @@ -16,7 +16,7 @@ my $mods_sheet; # ---------------------------------------------------------------------------------------- # XPATH for extracting info from a MODS doc -my $isbn_xpath = "//mods:mods/mods:identifier[\@type='isbn']"; +my $isbn_xpath = "//mods:mods/mods:identifier[\@type='isbn' and not(\@invalid)]"; my $resource_xpath = "//mods:mods/mods:typeOfResource"; my $pub_xpath = "//mods:mods/mods:originInfo//mods:dateIssued[\@encoding='marc']|" . "//mods:mods/mods:originInfo//mods:dateIssued[1]";