What do you have defined as @base? https://w3c.github.io/json-ld-syntax/#base-iri
That would be used by RDFLib to parse your file. On Thu, Aug 1, 2019, 05:56 Kristina <kristina.sahlm...@gmx.de> wrote: > Hello, > > my ontology is written in JSON-LD. I use RDFLib to parse it and prepared > Query for SPARQL. So far, it works fine. > > But then I analyzed the SPARQL results and noticed that the namespace was > "manipulated" by RDFLib. For example, in the ontology an instance is > defined as "http://my-ontology-space#mySubject" and in the SPARQL results > was "http://my-ontology-space/#mySubject'}". Not only in SPARQL, but also > by printing the entire graph. > > Where the "/" comes from? > > I used an ontology IRI (spoken in Protege terms) defined as: > { > "@id" : "http://my-ontology-space", > "@type" : [ "http://www.w3.org/2002/07/owl#Ontology" ],....} > > And I also tried with "http://my-ontology-space#", unfortunately with the > same result. > > There is also a problem with DatatypeProperty. This results in " > http://my-ontology-space/.#topic", even it defined in the ontology as: > > { > "@id" : "http://my-ontology-space#topic", > "@type" : [ "http://www.w3.org/2002/07/owl#DatatypeProperty" ] > } > > Interesting, that imported ontologies using # (e.g. " > http://www.w3.org/2002/07/owl#NamedIndividual") are not "manipulated" by > RDFlib. > > However, the namespace with # is not recognized correctly during the graph > parsing. > > g = Graph() > g.parse("temp.owl", format="json-ld") > for s, p, o in g: > print (s, p, o) > > Is there any workaround? Bugfix or feature? > Again, where the "/" and "/." comes from? > How is it possible to use namespaces/prefixes with ending #? > > Thank you for any advice! > Kristina > > -- > http://github.com/RDFLib > --- > You received this message because you are subscribed to the Google Groups > "rdflib-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rdflib-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rdflib-dev/a3fea92b-0be5-4084-9190-cbba8053c722%40googlegroups.com > . > -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/CAKZ-WGdskFYPs267APuGfJ8JyEdi%3DE-fw9xrT%3DikboXTzzv4XA%40mail.gmail.com.