Skip to content

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

Description

@jonrkarr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions