Am Donnerstag, 1. August 2019 15:01:42 UTC+2 schrieb Sergio Fernández: > 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...@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 rdfli...@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.
Protegé generates only an expanded version of JSON-LD. Thus, there is no @base and no context defined. It looks like in example 27 on https://w3c.github.io/json-ld-syntax/#example-27-using-as-the-vocabulary-mapping-expanded I would expect it working. -- 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/91ddaa99-224f-4ed4-87c5-67df8bcdd657%40googlegroups.com.