Re: Loading OWL imports from local

Posted by David on
URL: http://owlready.306.s1.nabble.com/Loading-OWL-imports-from-local-tp1606p1658.html

Thanks for your answers.
Here is a little more on the problem I don't understand.
I have this Ontology:

<rdf:RDF xmlns="https://myurl.com/ontologies/MyOntology.owl#"
     xml:base="https://myurl.com/ontologies/MyOntology.owl"
     xmlns:owl="http://www.w3.org/2002/07/owl#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:xml="http://www.w3.org/XML/1998/namespace"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:MyOntology="https://myurl.com/ontologies/MyOntology.owl#">
    <owl:Ontology rdf:about="https://myurl.com/ontologies/MyOntology.owl#">
        <owl:imports rdf:resource="https://myurl.com/ontologies/MyOtherOntology.owl#"/>
    </owl:Ontology>
...
</rdf:RDF>

I want to import https://myurl.com/ontologies/MyOtherOntology.owl, but it fails. (When I load this ontology in python with get_ontology, the imported_ontologies attribute is an empty list).
If I change the value of rdf:about in <owl:Ontology rdf:about="https://myurl.com/ontologies/MyOntology.owl#"> to a non valid url, it works, my ontology is imported.
Do you know why ?

Edit: I changed the URI to https://myurl.com/ontologies/MyOntology.owl/ (With a / at the end) and it seems it work that way).