Closed
Description
The doc says
If you pass no
initNs
argument, the namespaces registered with the graphsnamespace_manager
are used
However, it doesn't seem true for update
.
from rdflib import Graph, URIRef, Literal, Namespace
from rdflib.namespace import FOAF, RDF
g = Graph()
g.bind('foaf', FOAF)
n = Namespace("http://myname/")
g.add((n.bob, FOAF.name, Literal('bb')))
# query is successful.
g.query("select ?n where { ?n foaf:name 'bb' . }")
# update is not.
g.update("""
delete { ?e ?p ?o }
where {
?e foaf:name 'ss' .
}""")
Exception: Unknown namespace prefix : foaf