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 namespace check for decode-xml optional #545

Open
TobiasNx opened this issue Jun 24, 2024 · 3 comments
Open

Make namespace check for decode-xml optional #545

TobiasNx opened this issue Jun 24, 2024 · 3 comments
Assignees

Comments

@TobiasNx
Copy link
Contributor

TobiasNx commented Jun 24, 2024

https://metafacture.org/playground/?flux=inputFile%0A%7C+open-file%0A%7Cdecode-xml%0A%7Chandle-generic-xml%0A%7Cencode-yaml%0A%7Cprint%0A%3B&data=%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Crecord%3E%0A++++%3Cmets%3Afield%3Ea%3C/mets%3Afield%3E%0A++++%3Cfield%3Eb%3C/field%3E%0A%3C/record%3E

When reading a xml with namespaces but no corresponding namespace definition MF breaks. This should be optional.

@dr0i
Copy link
Member

dr0i commented Jun 24, 2024

Why do you think this is a bug? The problem relies in the using of a namespace without defining one. I.e. the error lies in the input data.

@TobiasNx
Copy link
Contributor Author

Why do you think this is a bug? The problem relies in the using of a namespace without defining one. I.e. the error lies in the input data.

You are right, but you cannot handle this data at all with MF. I would not say this is a bug, but to make this optional would be a feature. This would be similar to the option ignoreId from handle-marcxml

@dr0i
Copy link
Member

dr0i commented Jun 25, 2024

There is always a way - until it isn't. Could you not filter the whole input first (treat it as a string) and use a regex that would remove the erroneous namespace?

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

No branches or pull requests

2 participants