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

decode-xml or the handlers seem not to assign record ids #566

Open
TobiasNx opened this issue Nov 11, 2024 · 0 comments
Open

decode-xml or the handlers seem not to assign record ids #566

TobiasNx opened this issue Nov 11, 2024 · 0 comments
Labels

Comments

@TobiasNx
Copy link
Contributor

Wenn testing around Metafacture i found the following:
Internally Metafacture assinges record ids that can be seen if one encodes as formeta or triples. Usually starting by 1. Except the decoder adjust this as decode-marc21 does. I assumed that handle-marcxml would assigne the value of 001 as record id. But the record id is empty. See the example:

decode-xml with handle-marcxml:
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+stream-to-triples%0A%7C+template%28%22%24%7Bs%7D+%7C+%24%7Bp%7D+%7C+%24%7Bo%7D%22+%29%0A%7C+print%0A%3B

But not only handle-marcxml does not assinges record ids but it seem a general isse. handle-generic-xml also assignes no id.

decode-xml with handle-generic-xml:
https://metafacture.org/playground/?flux=inputFile%0A%7C+open-file%0A%7Cdecode-xml%0A%7Chandle-generic-xml%0A%7C+stream-to-triples%0A%7C+template%28%22%24%7Bs%7D+%7C+%24%7Bp%7D+%7C+%24%7Bo%7D%22+%29%0A%7C+print%0A%3B&data=%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Crecord%3E%0A++++%3Cfield%3Ea%3C/field%3E%0A++++%3Cfield%3Eb%3C/field%3E%0A%3C/record%3E

In contrast json start counting from 1:
https://metafacture.org/playground/?flux=inputFile%0A%7Copen-file%0A%7Cas-lines%0A%7Cdecode-json%0A%7C+stream-to-triples%0A%7C+template%28%22%24%7Bs%7D+%7C+%24%7Bp%7D+%7C+%24%7Bo%7D%22+%29%0A%7C+print%0A%3B&data=%7B%22a%22%3A+%22Faust%22%2C+%22b%22%3A+%7B%22n%22%3A+%22Goethe%22%2C+%22v%22%3A+%22JW%22%7D%2C+%22c%22%3A+%22Weimar%22%7D%0A%7B%22a%22%3A+%22R%C3%A4uber%22%2C+%22b%22%3A+%7B%22n%22%3A+%22Schiller%22%2C+%22v%22%3A+%22F%22%7D%2C+%22c%22%3A+%22Weimar%22%7D

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

No branches or pull requests

1 participant