We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a trig file with just one graph like this:
@prefix adm: <http://purl.bdrc.io/ontology/admin/> . @prefix bda: <http://purl.bdrc.io/admindata/> . @prefix bdg: <http://purl.bdrc.io/graph/> . bdg:W1NLM5228 { bda:W1NLM5228 a adm:AdminData ; adm:status bda:StatusReleased . }
In my use case I need to be able to read it, modify it and then write it with the same prefix definitions, but when I do something very simple like
import rdflib from rdflib import Literal, Graph, Dataset, URIRef import os ds = Dataset() ds.parse("bug.trig", format="trig", publicID=URIRef("http://purl.bdrc.io/graph/W1NLM5228")) ds.remove_graph(URIRef("urn:x-rdflib:default")) # doesn't work ds.serialize(filepath+"-bug", format="trig")
the output I get is
@prefix adm: <http://purl.bdrc.io/ontology/admin/> . @prefix bda: <http://purl.bdrc.io/admindata/> . @prefix bdg: <http://purl.bdrc.io/graph/> . @prefix ns1: <urn:x-rdflib:> . bdg:W1NLM5228 { bda:W1NLM5228 a adm:AdminData ; adm:status bda:StatusReleased . }
and I seem unable to remove the ns1: <urn:x-rdflib:> prefix definition. Is there any way to do so? Thanks!
ns1: <urn:x-rdflib:>
The text was updated successfully, but these errors were encountered:
do not write prefix for empty graph id, fix RDFLib#2154
a4c1772
addressed in #2160
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I have a trig file with just one graph like this:
In my use case I need to be able to read it, modify it and then write it with the same prefix definitions, but when I do something very simple like
the output I get is
and I seem unable to remove the
ns1: <urn:x-rdflib:>
prefix definition. Is there any way to do so? Thanks!The text was updated successfully, but these errors were encountered: