Skip to content
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 validation optional or optionally less strict #567

Open
TobiasNx opened this issue Nov 11, 2024 · 1 comment
Open

Make encode-marc21 validation optional or optionally less strict #567

TobiasNx opened this issue Nov 11, 2024 · 1 comment
Assignees

Comments

@TobiasNx
Copy link
Contributor

TobiasNx commented Nov 11, 2024

Currently the marc encoder only serializes to marc21 if a lot of validations are true.

Hbz/Verbundgruppe has a use case where for the it is more important to change the form from marcxml to marc21 than having valid marc21.

The transformation breaks if the data is not valid at the moment.

I therefore suggest to make the validation of the leader and controllfields optional.

@TobiasNx TobiasNx changed the title Make encode-marc21 validation optional Make encode-marc21 validation optional or less strict Nov 12, 2024
@TobiasNx
Copy link
Contributor Author

Also the marcxml schema is less strict than the marc21 specification from LOC:

https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd

Leader has to have 24 characters but the regex is the following: <xsd:pattern value="[\d ]{5}[\dA-Za-z ]{1}[\dA-Za-z]{1}[\dA-Za-z ]{3}(2| )(2| )[\d ]{5}[\dA-Za-z ]{3}(4500| )"/>

@TobiasNx TobiasNx changed the title Make encode-marc21 validation optional or less strict Make encode-marc21 validation optional or optionally less strict Nov 12, 2024
@dr0i dr0i self-assigned this Nov 12, 2024
@dr0i dr0i moved this to Selected in Metafacture Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Selected
Development

No branches or pull requests

2 participants