- Notifications
You must be signed in to change notification settings - Fork 579
Open
Description
from rdflib import Graph, Namespace, URIRef mns = Namespace("http://my-namespace.net/") g = Graph(base="http://my-base.net/") g.add((mns.foo, URIRef("http://my-base.net/my-predicate"), mns.bar)) print(g.serialize(format="text/turtle"))Prints the following (with redundant ns1 prefix):
@base <http://my-base.net/> . @prefix ns1: <http://my-base.net/> . <http://my-namespace.net/foo> <my-predicate> <http://my-namespace.net/bar> .While the expected output is:
@base <http://my-base.net/> . <http://my-namespace.net/foo> <my-predicate> <http://my-namespace.net/bar> .- PR skip prefix generation for predicates corresponding to base namespace #3238
- This issue may be related to issue Turtle serializer outputs undeclared prefix with same domain base #3160.
Metadata
Metadata
Assignees
Labels
No labels