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

Automatically creating http://omex-library.org/NewOmex.omex URIs is likely to generate confusion #138

Open
jonrkarr opened this issue Oct 13, 2021 · 0 comments

Comments

@jonrkarr
Copy link
Contributor

I think its important that this library work consistently with other RDF readers in case people choose to use other libraries to read OMEX metadata.

This illustrates a key departure that I think will likely create confusion. The root uri is ..

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
  <rdf:Description rdf:about=".">
</rdf:RDF>

However, this library transforms this to http://omex-library.org/NewOmex.omex/.

import json
import pyomexmeta
rdf = pyomexmeta.RDF.from_file('tests/fixtures/omex-metadata/no-root.rdf', 'rdfxml')
query = "SELECT ?subject ?predicate ?object WHERE { ?subject ?predicate ?object }"
triples = json.loads(rdf.query_results_as_string(query, 'json'))['results']['bindings']
print(triples[0]['subject']['value'])

Instead, validation could be provided to assert that the URI must start with http://omex-library.org/ and end in .omex.

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

No branches or pull requests

1 participant