owl:versionIRI not resolved

The OWL2 spec https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#Imports has the following in section 3.2:

If O contains an ontology IRI OI and a version IRI VI, then the ontology document of O should be accessible via the IRI VI;

In contrast, an ontology document of an ontology that contains an ontology IRI http://www.example.com/my and a version IRI http://www.example.com/my/2.0 should be accessible via the IRI http://www.example.com/my/2.0. In both cases, the ontology document should be accessible via the respective IRIs using the HTTP protocol.
<<<
However Stardog does not seem to implement this. If I have the followign trivial ontology:
<owl:Ontology rdf:about=“https://spec.edmcouncil.org/fibo/ontology/BE/Corporations/Corporations/”>
rdfs:labelCorporations Ontology</rdfs:label>
<owl:versionIRI rdf:resource=“https://spec.edmcouncil.org/fibo/ontology/master/latest/BE/Corporations/Corporations/”/>
</owl:Ontology>
Then the following SPARQL fails to return a value for ?v or ?name.
SELECT *
WHERE {
BIND( https://spec.edmcouncil.org/fibo/ontology/master/latest/BE/Corporations/Corporations/ as ?id).
OPTIONAL {?id owl:versionIRI ?v}
OPTIONAL {?id rdfs:label ?name}.
}

Not sure if this would be considered a bug but I could not find any Stardog documentation on this topic which I think should be remedied.
Is there any way to obtain the behavior implied by the OWL spec (or did I misunderstand it)? A more practical use is a query to return the label of any imported ontology, where the import may or may not use a version IRI.
What about the use of versionIRI imports for reasoning - will the right version be used?

The spec only says that it SHOULD be accessible not that it MUST be accessabe. It also doesn’t say anything about how a sparql query might access it. Some sparql implementations will dereference URI’s in FROM/FROM NAMED clauses but Stardog doesn’t (I’m personally like that decision) nor does Stardog support owl:imports (http://www.stardog.com/docs/#_known_issues) which is easy enough to do with an external util.

Were you expecting the BIND to dereference the URI?

Yes I was expecting the BIND to dereference it. It would be easy in this case, but I guess not so easy if using Stardog versioning.
It’s not a big deal since I can write an OPTIONAL clause to handle my easy case. But still think there is scope for mentioning it in the documentation (e.g. the same place as the owl:imports mention) even if it is a SHOULD not a MUST.

The spec you mentioned is for OWL not SPARQL. It basically says that if you have a URI for your ontology and specific ontology version it would be really handy if when you put that URI in your browser you get back the ontology. The BIND in SPARQL is never expected to dereference a URI. The functionality you’re referring would be either FROM/FROM NAMED and is implementation dependent which Stardog does not support and is noted in the documentation here. or owl:imports mentioned in the docs here.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.