-
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
Encode "leader" also if it's passed as one literal (#454) #526
Conversation
4570572
to
83432a1
Compare
83432a1
to
e2c4c0d
Compare
functional review: @TobiasNx . Deployed to test-playground. Test from #454 (comment) : Also note that we don't need to set the |
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/Marc21Encoder.java
Outdated
Show resolved
Hide resolved
metafacture-biblio/src/main/java/org/metafacture/biblio/marc21/Marc21Encoder.java
Show resolved
Hide resolved
metafacture-biblio/src/test/java/org/metafacture/biblio/marc21/Marc21EncoderTest.java
Show resolved
Hide resolved
This does not seem to work yet: https://test.metafacture.org/playground/?flux=%22https%3A//raw.githubusercontent.com/metafacture/metafacture-core/master/metafacture-runner/src/main/dist/examples/read/marc21/10.marc21%22%0A%7C+open-http%0A%7C+as-lines%0A%7C+decode-marc21%0A%7C+encode-marcxml%0A%7C+print%0A%3B decode-marc21(emitLeaderAsWhole="false")` -> encode-marcxml => the separated elements are kept:
leader should be combined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This usecase is not resolved: #526 (comment)
Otherwise very cool.
They are kept as separated elements because you told it to do so by using |
But this creates invalid marc xml data. I am confused. I thought It creates invalid marc xml data. See the leader spec here in the schema: https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd |
Discussed with @dr0i of board that I will open a new issue for this scenario. To be fixed after this PR. So +1 from me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 fix invalid handling of marc leader by encode-marcxml
in next issue.
Resolves #454 and resolves #524.
"leader" can be given as top-level literal or as literal in an entity.
This makes the claim "The stream expected by the encoder is compatible to the
streams emitted by the { Marc21Decoder} and the {MarcXmlHandler}."
true again.