Skip to content

Commit

Permalink
Reset manipulated xml-testfile to original state (#1823)
Browse files Browse the repository at this point in the history
Insert "prepend" into unless-clause
  • Loading branch information
Petra Maier committed Feb 15, 2024
1 parent 8529f57 commit d05f66f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/main/resources/alma/fix/otherFields.fix
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ unless exists("130??|240??")
copy_field("$i","exampleOfWork.language[].$append.id")
copy_field("$i","exampleOfWork.language[].$last.label")
end
lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND")
prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")
end
lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND")
prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")


# 300 - Physical Description (R)
# We reuse the introx transformation here.
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/alma/fix/relatedRessourcesAndLinks.fix
Original file line number Diff line number Diff line change
Expand Up @@ -620,9 +620,10 @@ if exists("130??|240??")
copy_field("$i","exampleOfWork.language[].$append.id")
copy_field("$i","exampleOfWork.language[].$last.label")
end
lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND")
prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")
end
lookup("exampleOfWork.language[].*.label","ISO639-2-to-GND")
prepend("exampleOfWork.language[].*.id", "http://id.loc.gov/vocabulary/iso639-2/")


# following only with second indicator 2 for analytical entries:
# 700 - Added Entry-Personal Name (R)
Expand Down
5 changes: 1 addition & 4 deletions src/test/resources/alma-fix/99371530278506441.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,8 @@
"id" : "https://d-nb.info/gnd/4117209-7",
"type" : [ "Work" ],
"language" : [ {
"id" : "http://id.loc.gov/vocabulary/iso639-2/http://id.loc.gov/vocabulary/iso639-2/lat",
"id" : "http://id.loc.gov/vocabulary/iso639-2/lat",
"label" : "Latein"
}, {
"id" : "http://id.loc.gov/vocabulary/iso639-2/http://id.loc.gov/vocabulary/iso639-2/rom",
"label" : "Romani"
} ]
},
"language" : [ {
Expand Down

0 comments on commit d05f66f

Please sign in to comment.