Skip to content

revert colons in qnames? #867

@joernhees

Description

@joernhees

The change of #663 caused the following changed behavior:

import rdflib
print(rdflib.Graph().namespace_manager.compute_qname('http://dbpedia.org/page/Category:Software_bugs'))

before:

('ns1', rdflib.term.URIRef('http://dbpedia.org/page/Category:'), 'Software_bugs')

after:

('ns1', rdflib.term.URIRef('http://dbpedia.org/page/'), 'Category:Software_bugs')

The generated normalized URI causes trouble on for example the DBpedia endpoint:

prefix ns1: <http://dbpedia.org/page/>
select * { ?s ?p ns1:Category:Software_bugs }

On closer inspection ns1:Category:Software_bugs is however both: a valid CURIE and a valid SPARQL PrefixedName, so this is likely a Virtuoso bug.

ns1:Category:Software_bugs is however not a valid QName, which given the name of the compute_qname function is at least problematic.

Maybe as #649 is already dealing with this by introducing a compute_qname_strict, it could be solved in there, maybe by just renaming the new compute_qname to compute_curie and give it a dialect arg???

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions