-
Notifications
You must be signed in to change notification settings - Fork 577
Closed
Labels
bugSomething isn't workingSomething isn't workingconcept: RDF datasetRelates to the RDF datasets concept.Relates to the RDF datasets concept.coreRelates to core functionality of RDFLib, i.e. `rdflib.{graph,store,term}`Relates to core functionality of RDFLib, i.e. `rdflib.{graph,store,term}`critical
Description
If you run the following code
from rdflib import Dataset
input_data = "<http://s> <http://v> <http://o>."
ds = Dataset()
ds.parse(data=input_data, format="nquads")
print(ds.serialize(format="nquads"))
you will get something like <http://s> <http://v> <http://o> _:Nf7773353eb67460ab92041894df76998 .
I believe that is wrong, since there was no graph label in the input data, and RDF standard clearly distinguishes between the default graph and named graphs.
Is this a bug, or is there a way to make it not do that? If it is necessary to have some graph in there internally, I think I saw some tools use specific IRIs like http://www.w3.org/1999/02/22-rdf-syntax-ns#defaultGraph
, but in that case there wouldn't be a reason not to leave those out when serializing.
namedgraph
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconcept: RDF datasetRelates to the RDF datasets concept.Relates to the RDF datasets concept.coreRelates to core functionality of RDFLib, i.e. `rdflib.{graph,store,term}`Relates to core functionality of RDFLib, i.e. `rdflib.{graph,store,term}`critical