[proto-wd] determining the base IRI

Hi everyone,

Re: ACTION: Lee to adapt text from 4.1.1 to specify how the protocol can 
contribute to the base IRI for query evaluation as per #relIRIs in the QL 
spec

At the end of this week's teleconference, Eric and I discussed whether the 
protocol specification should discuss how it contributes to determination 
of the base IRI used for resolving relative IRIs when parsing/executing a 
SPARQL query.

Currently, rq25 already contains this text in 4.1.1 Syntax for IRIs > 
Relative IRIs:

"""
The BASE keyword defines the Base IRI used to resolve relative IRIs per 
RFC3986 section 5.1.1, "Base URI Embedded in Content". Section 5.1.2, 
"Base URI from the Encapsulating Entity" defines how the Base IRI may come 
from an encapsulating document, such as a SOAP envelope with an xml:base 
directive, or a mime multipart document with a Content-Location header. 
The "Retrieval URI" identified in 5.1.3, Base "URI from the Retrieval 
URI", is the URL from which a particular SPARQL query was retrieved. If 
none of the above specifies the Base URI, the default Base URI (section 
5.1.4, "Default Base URI") is used.
"""

(Aside: Eric, can you add in the anchor point here that we discussed? 
#relIRIs)

I took a stab at editing the protocol document (not yet checked into CVS) 
and came up with something almost identical but a bit different:

"""
Determining the Base IRI

Relative IRIs that appear in a [SPARQL] query are resolved against a base 
IRI as per [RFC3986] section 5.1, "Establishing a Base URI". If present in 
the query, the BASE keyword defines the Base IRI used to resolve relative 
IRIs per RFC3986 section 5.1.1, "Base URI Embedded in Content". Otherwise, 
Section 5.1.2, "Base URI from the Encapsulating Entity", defines how the 
Base IRI may come from an encapsulating document, such as a SOAP envelope 
with an xml:base directive. (See 2.3 SOAP Envelope. Otherwise, the 
"Retrieval URI" identified in 5.1.3, Base "URI from the Retrieval URI", is 
the URL of the SPARQL protocol service implementing the SparqlQuery 
interface. If none of the above specifies the Base URI, the default Base 
URI (section 5.1.4, "Default Base URI") is used.
"""

In particular, note the difference in how to intepret 5.1.3 of RFC3986 - 
the query spec. talks about the "retrieval URI" as "the URL from which a 
particular SPARQL query was retrieved" whereas (following the discussion 
with EricP) whereas the text I came up with for the protocol spec says 
that the "retrieval URI" corresponds to the URL of the SPARQL service 
endpoint. I'm not sure which is more correct (if either), but I am pretty 
sure that the two documents should agree on their recommendation for 
interpreting RFC3986 5.1.3.

thoughts?

Lee

Received on Thursday, 8 February 2007 21:06:17 UTC