Skip to content

Commit

Permalink
Make use of flatten() Fix function.
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwinter committed Aug 12, 2022
1 parent 50d008c commit c07ef75
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/main/resources/transformation/alma.fix
Original file line number Diff line number Diff line change
Expand Up @@ -888,10 +888,8 @@ do list(path: "264[ 23]1.c", "var": "$i")
end
copy_field("@date[12]", "@date")
split_field("@date", "[,-]")
flatten("@date")
do list(path: "@date", "var": "$i")
copy_field("$i", "@date_flat")
end
do list(path: "@date_flat", "var": "$i")
replace_all("$i", ".*?(\\d{4}).*", "$1")
if any_match("$i", "\\d{4}")
unless any_equal("$i", "9999")
Expand Down Expand Up @@ -1538,10 +1536,8 @@ do list(path: "982 ", "var": "$i")
copy_field("$i.b", "@subjectHeadings")
copy_field("$i.a", "@subjectTopicName")
split_field("@subjectTopicName", ";|\\*")
do list(path: "@subjectTopicName", "var": "$j")
copy_field("$j", "@subjectHeadings")
end
remove_field("@subjectTopicName")
flatten("@subjectTopicName")
move_field("@subjectTopicName", "@subjectHeadings")
end
end
# MARC/689
Expand Down

0 comments on commit c07ef75

Please sign in to comment.