Now that the MARC editor is less likely to strip whitespace by
accident, make sure that TCN values extracted from the 001 field
have leading and trailing whitespace removed. This particularly
affects OCLC records, since a record downloaded from OCLC with an
eight-digit OCLC number will have a trailing space in the 001.
This makes TCNs match the normalization expected by TCN searches.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
my $xpath = '//marc:controlfield[@tag="001"]';
my $tcn = $marcxml->documentElement->findvalue($xpath);
+ $tcn =~ s/^\s+|\s+$//og;
$logger->info("biblio import located 001 (tcn) value of $tcn");
$xpath = '//marc:controlfield[@tag="003"]';