Lines 599-612
sub marc_records_to_documents {
Link Here
|
599 |
my $subfields_join_mappings = $data_field_rules->{subfields_join}; |
599 |
my $subfields_join_mappings = $data_field_rules->{subfields_join}; |
600 |
if ($subfields_join_mappings) { |
600 |
if ($subfields_join_mappings) { |
601 |
foreach my $subfields_group (keys %{$subfields_join_mappings}) { |
601 |
foreach my $subfields_group (keys %{$subfields_join_mappings}) { |
602 |
# Map each subfield to values, remove empty values, join with space |
602 |
my $data_field = $field->clone; #copy field to preserve for alt scripts |
603 |
my $data = join( |
603 |
$data_field->delete_subfield(match => qr/^$/); #remove empty subfields, otherwise they are printed as a space |
604 |
' ', |
604 |
my $data = $data_field->as_string( $subfields_group ); #get values for subfields as a combind string, preserving record order |
605 |
grep( |
|
|
606 |
$_, |
607 |
map { join(' ', $field->subfield($_)) } split(//, $subfields_group) |
608 |
) |
609 |
); |
610 |
if ($data) { |
605 |
if ($data) { |
611 |
$self->_process_mappings($subfields_join_mappings->{$subfields_group}, $data, $record_document, { |
606 |
$self->_process_mappings($subfields_join_mappings->{$subfields_group}, $data, $record_document, { |
612 |
altscript => $altscript, |
607 |
altscript => $altscript, |
613 |
- |
|
|