Lines 817-852
sub get_keywords {
Link Here
|
817 |
|
817 |
|
818 |
## loop over all 6XX fields |
818 |
## loop over all 6XX fields |
819 |
foreach my $kwfield (@keywords) { |
819 |
foreach my $kwfield (@keywords) { |
820 |
if ($kwfield != undef) { |
820 |
if ($kwfield != undef) { |
821 |
## authornames get special treatment |
821 |
## authornames get special treatment |
822 |
if ($fieldname eq "600") { |
822 |
if ($fieldname eq "600") { |
823 |
my $val = normalize_author($kwfield->subfield('a'), $kwfield->subfield('b'), $kwfield->subfield('c'), $kwfield->indicator('1')); |
823 |
my $val = normalize_author($kwfield->subfield('a'), $kwfield->subfield('b'), $kwfield->subfield('c'), $kwfield->indicator('1')); |
824 |
push @kw, $val; |
824 |
push @kw, $val; |
825 |
print "<marc>Field $kwfield subfield a:", $kwfield->subfield('a'), "\r\n<marc>Field $kwfield subfield b:", $kwfield->subfield('b'), "\r\n<marc>Field $kwfield subfield c:", $kwfield->subfield('c'), "\r\n" if $marcprint; |
825 |
print "<marc>Field $kwfield subfield a:", $kwfield->subfield('a'), "\r\n<marc>Field $kwfield subfield b:", $kwfield->subfield('b'), "\r\n<marc>Field $kwfield subfield c:", $kwfield->subfield('c'), "\r\n" if $marcprint; |
826 |
} |
826 |
} |
827 |
else { |
827 |
else { |
828 |
## retrieve all available subfields |
828 |
## retrieve all available subfields |
829 |
my @kwsubfields = $kwfield->subfields(); |
829 |
my @kwsubfields = $kwfield->subfields(); |
830 |
|
830 |
|
831 |
## loop over all available subfield tuples |
831 |
## loop over all available subfield tuples |
832 |
foreach my $kwtuple (@kwsubfields) { |
832 |
foreach my $kwtuple (@kwsubfields) { |
833 |
## loop over all subfields to check |
833 |
## loop over all subfields to check |
834 |
foreach my $subfield (@subfields) { |
834 |
foreach my $subfield (@subfields) { |
835 |
## [0] contains subfield code |
835 |
## [0] contains subfield code |
836 |
if (@$kwtuple[0] eq $subfield) { |
836 |
if (@$kwtuple[0] eq $subfield) { |
837 |
## [1] contains value, remove trailing separators |
837 |
## [1] contains value, remove trailing separators |
838 |
@$kwtuple[1] =~ s% *[,;.:/]*$%%; |
838 |
@$kwtuple[1] =~ s% *[,;.:/]*$%%; |
839 |
if (length(@$kwtuple[1]) > 0) { |
839 |
if (length(@$kwtuple[1]) > 0) { |
840 |
push @kw, @$kwtuple[1]; |
840 |
push @kw, @$kwtuple[1]; |
841 |
print "<marc>Field $fieldname subfield $subfield:", @$kwtuple[1], "\r\n" if $marcprint; |
841 |
print "<marc>Field $fieldname subfield $subfield:", @$kwtuple[1], "\r\n" if $marcprint; |
842 |
} |
842 |
} |
843 |
## we can leave the subfields loop here |
843 |
## we can leave the subfields loop here |
844 |
last; |
844 |
last; |
845 |
} |
845 |
} |
846 |
} |
846 |
} |
847 |
} |
847 |
} |
848 |
} |
848 |
} |
849 |
} |
849 |
} |
850 |
} |
850 |
} |
851 |
return @kw; |
851 |
return @kw; |
852 |
} |
852 |
} |
Lines 940-967
sub pool_subx {
Link Here
|
940 |
|
940 |
|
941 |
## loop over all notefields |
941 |
## loop over all notefields |
942 |
foreach my $notefield (@notefields) { |
942 |
foreach my $notefield (@notefields) { |
943 |
if (defined $notefield) { |
943 |
if (defined $notefield) { |
944 |
## retrieve all available subfield tuples |
944 |
## retrieve all available subfield tuples |
945 |
my @notesubfields = $notefield->subfields(); |
945 |
my @notesubfields = $notefield->subfields(); |
946 |
|
946 |
|
947 |
## loop over all subfield tuples |
947 |
## loop over all subfield tuples |
948 |
foreach my $notetuple (@notesubfields) { |
948 |
foreach my $notetuple (@notesubfields) { |
949 |
## loop over all subfields to check |
949 |
## loop over all subfields to check |
950 |
foreach my $subfield (@subfields) { |
950 |
foreach my $subfield (@subfields) { |
951 |
## [0] contains subfield code |
951 |
## [0] contains subfield code |
952 |
if (@$notetuple[0] eq $subfield) { |
952 |
if (@$notetuple[0] eq $subfield) { |
953 |
## [1] contains value, remove trailing separators |
953 |
## [1] contains value, remove trailing separators |
954 |
print "<marc>field $fieldname subfield $subfield: ", @$notetuple[1], "\r\n" if $marcprint; |
954 |
print "<marc>field $fieldname subfield $subfield: ", @$notetuple[1], "\r\n" if $marcprint; |
955 |
@$notetuple[1] =~ s% *[,;.:/]*$%%; |
955 |
@$notetuple[1] =~ s% *[,;.:/]*$%%; |
956 |
if (length(@$notetuple[1]) > 0) { |
956 |
if (length(@$notetuple[1]) > 0) { |
957 |
## add to list |
957 |
## add to list |
958 |
push @{$aref}, @$notetuple[1]; |
958 |
push @{$aref}, @$notetuple[1]; |
959 |
} |
959 |
} |
960 |
last; |
960 |
last; |
961 |
} |
961 |
} |
962 |
} |
962 |
} |
963 |
} |
963 |
} |
964 |
} |
964 |
} |
965 |
} |
965 |
} |
966 |
} |
966 |
} |
967 |
|
967 |
|