Re: RDF's relative IRI resolution is ambiguous

* Gregg Kellogg <gregg@greggkellogg.net> [2015-09-03 09:57-0700]
> > On Sep 3, 2015, at 1:52 AM, Ruben Verborgh <ruben.verborgh@ugent.be> wrote:
> > 
> > Hi Gregg,
> > 
> >> As @base may have a relative IRI, it seems reasonable to always attempt to make it absolute by resolving it to the document location, yet this is at odds with your interpretation
> > 
> > Upon further inspection, I found this:
> > while RFC3986 indeed would resolve this way,
> > the Turtle spec says that:
> > 
> >    Relative IRIs are resolved with base IRIs as per Uniform Resource Identifier (URI): Generic Syntax [RFC3986] 
> > 
> > So apparently, only relative IRIs may follow the algorithm in RFC3986.
> 
> Yes, it seems that all the various specs (Turtle, RDFa, SPARQL, JSON-LD) are written this way, which in retrospect is not surprising, as why would you talk about resolving absolute URIs. What confuses this, and where my implementation decision was based, is that RFC 3986 specifically describes resolving using an absolute URI, giving the impression that it should be used in general. However, the referencing specs have the final say. While I think it is cleaner to always perform such resolution, it does mean that an absolute URI having dot segments will always be normalized, so expressivity is lost (however dubious such use may be).
> 
> What’s even more surprising is that no spec ever wrote tests for this, so kudos to Ruben for pointing this out.
> 
> This really calls for the need for longer-term curation of test suites (and implementation reports) beyond what is frozen when the specs are finished. An RDF testing CG could create forks of the various tests, and maintain them indefinitely on GitHub, or some similar infrastructure. I know that several people of suggested updating the SPARQL specs to consider the RDF 1.1 data model, as well as correct other deficiencies. This would need to consider WGs re-chartering (e.g., SPARQL 1.2) and reclaiming such test suites. It really needs more consideration by W3C staff.

Yeah, I have an action item to migrate the Turtle tests to github. Can you comment on this list of errata/missing tests? http://www.w3.org/mid/20150719141712.GA9165@w3.org


> Obviously, adding some of Ruben’s tests to the various test suites would be useful.

Agreed.


> Gregg
> 
> >> Here the scheme is missing from @base, so it clearly needs to be resolved, but will yield different results from <http://a/bb/ccc/../d;p?q> (assuming file location/previous base used http scheme), which would be pretty odd. 
> > 
> > So while it is certainly odd, I'm afraid it is the correct way,
> > because <http://a/bb/ccc/../d;p?q> is not relative and should thus not be resolved,
> > if we follow what the Turtle spec says.
> > 
> > That is, if I interpret correctly. What do you think?
> > 
> > Best,
> > 
> > Ruben
> 
> 

-- 
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.

Received on Thursday, 3 September 2015 17:38:57 UTC