Lines 1627-1633
sub GetMarcISBN {
Link Here
|
1627 |
my @marcisbns; |
1627 |
my @marcisbns; |
1628 |
foreach my $field ( $record->field($scope) ) { |
1628 |
foreach my $field ( $record->field($scope) ) { |
1629 |
my $isbn = $field->subfield( 'a' ); |
1629 |
my $isbn = $field->subfield( 'a' ); |
1630 |
if ( $isbn ne "" ) { |
1630 |
if ( $isbn && $isbn ne "" ) { |
1631 |
push @marcisbns, $isbn; |
1631 |
push @marcisbns, $isbn; |
1632 |
} |
1632 |
} |
1633 |
} |
1633 |
} |
Lines 2324-2339
sub TransformHtmlToXml {
Link Here
|
2324 |
if ( ( @$tags[$i] ne $prevtag ) ) { |
2324 |
if ( ( @$tags[$i] ne $prevtag ) ) { |
2325 |
$close_last_tag = 0; |
2325 |
$close_last_tag = 0; |
2326 |
$j++ unless ( @$tags[$i] eq "" ); |
2326 |
$j++ unless ( @$tags[$i] eq "" ); |
2327 |
my $indicator1 = eval { substr( @$indicator[$j], 0, 1 ) }; |
2327 |
my $str = ( $indicator->[$j] // q{} ) . ' '; # extra space prevents substr outside of string warn |
2328 |
my $indicator2 = eval { substr( @$indicator[$j], 1, 1 ) }; |
2328 |
my $ind1 = _default_ind_to_space( substr( $str, 0, 1 ) ); |
2329 |
my $ind1 = _default_ind_to_space($indicator1); |
2329 |
my $ind2 = _default_ind_to_space( substr( $str, 1, 1 ) ); |
2330 |
my $ind2; |
|
|
2331 |
if ( @$indicator[$j] ) { |
2332 |
$ind2 = _default_ind_to_space($indicator2); |
2333 |
} else { |
2334 |
warn "Indicator in @$tags[$i] is empty"; |
2335 |
$ind2 = " "; |
2336 |
} |
2337 |
if ( !$first ) { |
2330 |
if ( !$first ) { |
2338 |
$xml .= "</datafield>\n"; |
2331 |
$xml .= "</datafield>\n"; |
2339 |
if ( ( @$tags[$i] && @$tags[$i] > 10 ) |
2332 |
if ( ( @$tags[$i] && @$tags[$i] > 10 ) |
Lines 2366-2384
sub TransformHtmlToXml {
Link Here
|
2366 |
} |
2359 |
} |
2367 |
} |
2360 |
} |
2368 |
} else { # @$tags[$i] eq $prevtag |
2361 |
} else { # @$tags[$i] eq $prevtag |
2369 |
my $indicator1 = eval { substr( @$indicator[$j], 0, 1 ) }; |
|
|
2370 |
my $indicator2 = eval { substr( @$indicator[$j], 1, 1 ) }; |
2371 |
my $ind1 = _default_ind_to_space($indicator1); |
2372 |
my $ind2; |
2373 |
if ( @$indicator[$j] ) { |
2374 |
$ind2 = _default_ind_to_space($indicator2); |
2375 |
} else { |
2376 |
warn "Indicator in @$tags[$i] is empty"; |
2377 |
$ind2 = " "; |
2378 |
} |
2379 |
if ( @$values[$i] eq "" ) { |
2362 |
if ( @$values[$i] eq "" ) { |
2380 |
} else { |
2363 |
} else { |
2381 |
if ($first) { |
2364 |
if ($first) { |
|
|
2365 |
my $str = ( $indicator->[$j] // q{} ) . ' '; # extra space prevents substr outside of string warn |
2366 |
my $ind1 = _default_ind_to_space( substr( $str, 0, 1 ) ); |
2367 |
my $ind2 = _default_ind_to_space( substr( $str, 1, 1 ) ); |
2382 |
$xml .= "<datafield tag=\"@$tags[$i]\" ind1=\"$ind1\" ind2=\"$ind2\">\n"; |
2368 |
$xml .= "<datafield tag=\"@$tags[$i]\" ind1=\"$ind1\" ind2=\"$ind2\">\n"; |
2383 |
$first = 0; |
2369 |
$first = 0; |
2384 |
$close_last_tag = 1; |
2370 |
$close_last_tag = 1; |
2385 |
- |
|
|