Lines 1476-1482
sub GetMarcISBN {
Link Here
|
1476 |
my @marcisbns; |
1476 |
my @marcisbns; |
1477 |
foreach my $field ( $record->field($scope) ) { |
1477 |
foreach my $field ( $record->field($scope) ) { |
1478 |
my $isbn = $field->subfield( 'a' ); |
1478 |
my $isbn = $field->subfield( 'a' ); |
1479 |
if ( $isbn ne "" ) { |
1479 |
if ( $isbn && $isbn ne "" ) { |
1480 |
push @marcisbns, $isbn; |
1480 |
push @marcisbns, $isbn; |
1481 |
} |
1481 |
} |
1482 |
} |
1482 |
} |
Lines 2172-2187
sub TransformHtmlToXml {
Link Here
|
2172 |
if ( ( @$tags[$i] ne $prevtag ) ) { |
2172 |
if ( ( @$tags[$i] ne $prevtag ) ) { |
2173 |
$close_last_tag = 0; |
2173 |
$close_last_tag = 0; |
2174 |
$j++ unless ( @$tags[$i] eq "" ); |
2174 |
$j++ unless ( @$tags[$i] eq "" ); |
2175 |
my $indicator1 = eval { substr( @$indicator[$j], 0, 1 ) }; |
2175 |
my $str = ( $indicator->[$j] // q{} ) . ' '; # extra space prevents substr outside of string warn |
2176 |
my $indicator2 = eval { substr( @$indicator[$j], 1, 1 ) }; |
2176 |
my $ind1 = _default_ind_to_space( substr( $str, 0, 1 ) ); |
2177 |
my $ind1 = _default_ind_to_space($indicator1); |
2177 |
my $ind2 = _default_ind_to_space( substr( $str, 1, 1 ) ); |
2178 |
my $ind2; |
|
|
2179 |
if ( @$indicator[$j] ) { |
2180 |
$ind2 = _default_ind_to_space($indicator2); |
2181 |
} else { |
2182 |
warn "Indicator in @$tags[$i] is empty"; |
2183 |
$ind2 = " "; |
2184 |
} |
2185 |
if ( !$first ) { |
2178 |
if ( !$first ) { |
2186 |
$xml .= "</datafield>\n"; |
2179 |
$xml .= "</datafield>\n"; |
2187 |
if ( ( @$tags[$i] && @$tags[$i] > 10 ) |
2180 |
if ( ( @$tags[$i] && @$tags[$i] > 10 ) |
Lines 2214-2232
sub TransformHtmlToXml {
Link Here
|
2214 |
} |
2207 |
} |
2215 |
} |
2208 |
} |
2216 |
} else { # @$tags[$i] eq $prevtag |
2209 |
} else { # @$tags[$i] eq $prevtag |
2217 |
my $indicator1 = eval { substr( @$indicator[$j], 0, 1 ) }; |
|
|
2218 |
my $indicator2 = eval { substr( @$indicator[$j], 1, 1 ) }; |
2219 |
my $ind1 = _default_ind_to_space($indicator1); |
2220 |
my $ind2; |
2221 |
if ( @$indicator[$j] ) { |
2222 |
$ind2 = _default_ind_to_space($indicator2); |
2223 |
} else { |
2224 |
warn "Indicator in @$tags[$i] is empty"; |
2225 |
$ind2 = " "; |
2226 |
} |
2227 |
if ( @$values[$i] eq "" ) { |
2210 |
if ( @$values[$i] eq "" ) { |
2228 |
} else { |
2211 |
} else { |
2229 |
if ($first) { |
2212 |
if ($first) { |
|
|
2213 |
my $str = ( $indicator->[$j] // q{} ) . ' '; # extra space prevents substr outside of string warn |
2214 |
my $ind1 = _default_ind_to_space( substr( $str, 0, 1 ) ); |
2215 |
my $ind2 = _default_ind_to_space( substr( $str, 1, 1 ) ); |
2230 |
$xml .= "<datafield tag=\"@$tags[$i]\" ind1=\"$ind1\" ind2=\"$ind2\">\n"; |
2216 |
$xml .= "<datafield tag=\"@$tags[$i]\" ind1=\"$ind1\" ind2=\"$ind2\">\n"; |
2231 |
$first = 0; |
2217 |
$first = 0; |
2232 |
$close_last_tag = 1; |
2218 |
$close_last_tag = 1; |
2233 |
- |
|
|