w3c / sdw-sosa-ssn

Repository of the Spatial Data on the Web Working Group for the SOSA/SSN vocabulary
9 stars 5 forks source link

Ontology Term URLS not accessible via HTTP(s) #195

Open oldskeptic opened 9 months ago

oldskeptic commented 9 months ago

This ticket comes out of yesterday's teleconference about sosa/ssn namespaces and ontology availability.

Problem: Individual terms, eg: https://www.w3.org/ns/sosa/host, cannot be retrieved from the web server.

In the beginning, ontologies tended to use http://example.com/ontology#term for individual terms. This follows html documents and when SPARQL servers / reasoners / curl / whatever try and retrieve a term, the URL fetches the entire ontology and the client parses the whole thing to find what it needs. It also means that a "naive" fetcher will always get all of the data that it needs, even if it can't differentiate http://example.com/ontology from http://example.com/ontology#term. This works on any web server in its default configuration because it always serves the same document by ignoring anchors; same as an html request.

We now use an ontology URL hierarchy where the term host has URL https://www.w3.org/ns/sosa/host in an ontology with URL https://www.w3.org/ns/sosa. This is desirable since it allows clients to only retrieve the term of the ontology instead of retrieving ontologies the size of Western Europe every time. Currently OBO, schema.org and large open datasets work this way.

However most clients (eg: every client I know) are naive about this convention and will issue a GET https://www.w3.org/ns/sosa/host for the term which results in a 404 since the web server doesn't have that document.

This is how the W3 Server is configured at the moment.

Short term solution: Configure URL rewriting on the W3C server according to the W3C RDF... Working Group 2008 with additional information from an old (2006) post of Richard Cyganiak.

Second alternative: Generate a separate file for every term in the ontology. It's an ugly solution but it works without changing the web server configuration.

Additional notes: rdfs:isDefinedBy is suggested as a mechanism to recover the full ontology, but this is in RDFS space and not OWL space which relies on an explicit owl:import to the ontology URL. Also, its rdfs definition reads as "may be used to indicate an RDF vocabulary in which a resource is described". While I think it is a good idea, it is not guaranteed to work.

maximelefrancois86 commented 9 months ago

Hi, What you're looking for is probably https://www.w3.org/ns/sosa/hosts (There is a typo) And I assure you the server is properly configured to redirect to the ontology file, or to the relevant section in the HTML documentation (at least in 2017 it was)

oldskeptic commented 9 months ago

(There is a typo)

I cut and pasted that from the document in front of me, so now I have to track that down. :/

However, content negotiation isn't working on https://www.w3.org/ns/sosa, I just get the raw turtle file instead of a redirect to the documentation.

maximelefrancois86 commented 9 months ago

There deliberately isn't a redirection from the namespace to the HTML. We could decide to change that in the future, but my point is: The server has been configured with care, with the help of the W3C staff

oldskeptic commented 9 months ago

I agree that the server has been configured with care. There was confusion about this point yesterday in the meeting. Compounded by the host typo.

I request that there be a negotiated redirection from the namespace to the HTML for the ontology like there is for terms.

oldskeptic commented 1 week ago

@bert-github can I have help moving this forward?