Lines 619-632
sub marc_records_to_documents {
Link Here
|
619 |
my $subfields_join_mappings = $data_field_rules->{subfields_join}; |
619 |
my $subfields_join_mappings = $data_field_rules->{subfields_join}; |
620 |
if ($subfields_join_mappings) { |
620 |
if ($subfields_join_mappings) { |
621 |
foreach my $subfields_group (keys %{$subfields_join_mappings}) { |
621 |
foreach my $subfields_group (keys %{$subfields_join_mappings}) { |
622 |
# Map each subfield to values, remove empty values, join with space |
622 |
my $data_field = $field->clone; #copy field to preserve for alt scripts |
623 |
my $data = join( |
623 |
$data_field->delete_subfield(match => qr/^$/); #remove empty subfields, otherwise they are printed as a space |
624 |
' ', |
624 |
my $data = $data_field->as_string( $subfields_group ); #get values for subfields as a combind string, preserving record order |
625 |
grep( |
|
|
626 |
$_, |
627 |
map { join(' ', $field->subfield($_)) } split(//, $subfields_group) |
628 |
) |
629 |
); |
630 |
if ($data) { |
625 |
if ($data) { |
631 |
$self->_process_mappings($subfields_join_mappings->{$subfields_group}, $data, $record_document, { |
626 |
$self->_process_mappings($subfields_join_mappings->{$subfields_group}, $data, $record_document, { |
632 |
altscript => $altscript, |
627 |
altscript => $altscript, |
633 |
- |
|
|