-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make encode-marc21 more resilient if order is not correct #492
Comments
The |
The fix is not missing, this is the old playground spec. The url still has the fix, but the playground does not interpret it anymore. I will repair the link |
Fix the link. See it in the first comment. |
Seems indeed to be fixed as a sideeffect. |
The test was identified in context of #454 but it is another problem. |
nope, you are looking at |
I am not 99% sure but I think your fix creates a problematic marc21, if any, because you set the ....
"@leader" : "00000naa a2200000uc 4500",
"leader" : {
"status" : "n",
"type" : "00000naa a2200000uc 4500",
"bibliographicLevel" : "00000naa a2200000uc 4500",
"typeOfControl" : "00000naa a2200000uc 4500",
"characterCodingScheme" : "00000naa a2200000uc 4500",
"encodingLevel" : "00000naa a2200000uc 4500",
"catalogingForm" : "00000naa a2200000uc 4500",
"multipartLevel" : "00000naa a2200000uc 4500"
} I think the order is irrelevant at least. |
okay the error was still in the fix: I did not use the correct paths in the My bad. closing |
When the leader comes not as first,
encode-marc21
breaks:java.lang.IllegalStateException: must not be appending data fields
https://metafacture.org/playground/?flux=%22https%3A//d-nb.info/1106253078/about/marcxml%22%0A%7C+open-http%28accept%3D%22application/xml%22%29%0A%7C+decode-xml%0A%7C+handle-marcxml%0A%7C+fix%28transformationFile%29%0A%7C+encode-marc21%0A%7C+print%0A%3B&transformation=move_field%28%22leader%22%2C%22@leader%22%29%0Acopy_field%28%22@leader%22%2C%22leader.status%22%29%0Asubstring%28%22leader.status%22%2C%225%22%2C%221%22%29%0Acopy_field%28%22@leader%22%2C%22leader.type%22%29%0Asubstring%28%22leader.status%22%2C%226%22%2C%221%22%29%0Acopy_field%28%22@leader%22%2C%22leader.bibliographicLevel%22%29%0Asubstring%28%22leader.status%22%2C%227%22%2C%221%22%29%0Acopy_field%28%22@leader%22%2C%22leader.typeOfControl%22%29%0Asubstring%28%22leader.status%22%2C%228%22%2C%221%22%29%0Acopy_field%28%22@leader%22%2C%22leader.characterCodingScheme%22%29%0Asubstring%28%22leader.status%22%2C%229%22%2C%221%22%29%0Acopy_field%28%22@leader%22%2C%22leader.encodingLevel%22%29%0Asubstring%28%22leader.status%22%2C%2217%22%2C%221%22%29%0Acopy_field%28%22@leader%22%2C%22leader.catalogingForm%22%29%0Asubstring%28%22leader.status%22%2C%2218%22%2C%221%22%29%0Acopy_field%28%22@leader%22%2C%22leader.multipartLevel%22%29%0Asubstring%28%22leader.status%22%2C%2219%22%2C%221%22%29%0Aremove_field%28%22@field%22%29
encode-marc21 should not care if the order of elements is correct when entering it should though output in the correct order.
The text was updated successfully, but these errors were encountered: