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

Can MarcXmlHandler drop namespace guard for record elements? #330

Closed
blackwinter opened this issue Sep 4, 2020 · 9 comments · Fixed by #331
Closed

Can MarcXmlHandler drop namespace guard for record elements? #330

blackwinter opened this issue Sep 4, 2020 · 9 comments · Fixed by #331
Assignees

Comments

@blackwinter
Copy link
Member

Records are only recognized if the element's tag name equals record and the element's namespace URI equals http://www.loc.gov/MARC21/slim. However, at least Alma produces MARCXML without any namespace (xmlns), which MarcXmlHandler cannot process. There's no apparent workaround short of manipulating the XML files before processing.

Seeing as the record element is the only element that is restricted by namespace, it's unclear why this check was introduced in the first place (the commit doesn't provide any clues). All tests pass without it.

@dr0i
Copy link
Member

dr0i commented Sep 7, 2020

@blackwinter feel encouraged to improve it !

@dr0i
Copy link
Member

dr0i commented Sep 8, 2020

Thx a lot! It will be part of the new release.

@blackwinter
Copy link
Member Author

Great, thanks :)

@TobiasNx
Copy link
Contributor

TobiasNx commented Nov 11, 2024

This came up in a conversation with hbz/Verbundgruppe. The want to use the cli tool and want a workflow usable for records with as well without namespace. They also do not want to adjust the workflow for every data provider.

handle-marcxml(namespace="") seems to work if a namespace is not provided

But it does not with records with namespaces.

@blackwinter am I missing something. Your commit seems to suggest that this is somehow possible.

@blackwinter
Copy link
Member Author

I'm sorry, I don't understand. Where does your second example include records with namespaces?

@TobiasNx
Copy link
Contributor

Thanks, I updated the link. Here is the example with namespace too.

@blackwinter
Copy link
Member Author

So you mean that you can't use namespace="" with both records with and without namespace? That's where namespace=null comes in, but Flux does not support specifying null values.

@TobiasNx
Copy link
Contributor

TobiasNx commented Nov 12, 2024

So you mean that you can't use namespace="" with both records with and without namespace? That's where namespace=null comes in, but Flux does not support specifying null values.

Correct. We need to decide how to support this. Should I open a ticket to support this? Or is it a better idea to introduce an boolean-option that turns this test off?

@blackwinter
Copy link
Member Author

IDK. The first option would be a general improvement with potentially more widespread applicability, while the second would be a limited enhancement for this particular handler (and also redundant from an API perspective). So I guess I'm leaning towards the former, but I have no idea how difficult it would be to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants