You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently RDFib serializes using all bound prefixes - both those that are set automatically like RDF ("rdf") and OWL etc., as well as those you set manually (g.bind(...)) but also invents some, ns, ns2 etc. This invention is problematic as those prefixes are not in the Namespace Manager and won't always be the same between serializations.
We should remove the auto-creation of prefixes.
We should also perhaps provide prefixes for all Namespaces/ClosedNamesapces/DefinedNamespaces given that many are well known. If we do, they should be default but able to be overridden manually.
While we are at it: remove the ability to import some Namespaces ("RDF", "RDFS") from rdflib and only use rdflib.namespace.
The text was updated successfully, but these errors were encountered:
nicholascar
changed the title
Non-determenistic prefix creation
Non-deterministic prefix creation
Sep 17, 2020
Since raising this issue I've come to realise this...
I might make a PR that does remove the auto0binding but then re-applies just-in-time it for XML serlialisation (RDF/XML, TRIX etc). This would be better than what we have now: prefixes as-needed only.
There is a related issue, not sure if it is in scope for this particular effort - if serialize the results.graph of a CONSTRUCT query, it does not have the prefixes defined in the query itself, and will use inconsistent nsX: temporary names. It would be good to transfer any prefix bindings defined in the query itself into the results graph for better serialization.
Currently RDFib serializes using all bound prefixes - both those that are set automatically like RDF ("rdf") and OWL etc., as well as those you set manually (
g.bind(...)
) but also invents some,ns
,ns2
etc. This invention is problematic as those prefixes are not in the Namespace Manager and won't always be the same between serializations.We should remove the auto-creation of prefixes.
We should also perhaps provide prefixes for all Namespaces/ClosedNamesapces/DefinedNamespaces given that many are well known. If we do, they should be default but able to be overridden manually.
While we are at it: remove the ability to import some Namespaces ("RDF", "RDFS") from rdflib and only use rdflib.namespace.
The text was updated successfully, but these errors were encountered: