[OK?] Re: SPARQL: BASE IRI resolution

Thank you for the comment on BASE IRI resolution
Please check that this text meets your requirements:
[[
SPARQL provides a two abbreviation mechanisms for IRIs, namespace
prefixes and relative IRIs.

The PREFIX keyword binds a prefix to a namespace IRI [NAMESPACE]. A
prefix binding applies to any QNames in the query with that prefix; a
prefix may be defined only once. A QName is mapped to an IRI by
appending the local name to the namespace IRI corresponding to the
prefix.

Relative IRIs are combined with base IRIs as per Uniform Resource
Identifier (URI): Generic Syntax [RFC3986] using only the basic
algorithm in Section 5.2 . Neither Syntax-Based Normalization nor
Scheme-Based Normalization (described in sections 6.2.2 and 6.2.3 of
RFC3986) is performed. Characters additionally allowed in IRI
references are treated in the same way that unreserved characters are
treated in URI references, per section 6.5 of Internationalized
Resource Identifiers (IRIs) [RFC3987].

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 a 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 it does, you might try responding with [CLOSED] in the
subject to allow the issue tracking scripts to close this issue.

On Wed, Sep 07, 2005 at 05:24:57AM +0200, Bjoern Hoehrmann wrote:
> 
> * Dan Connolly wrote:
> >In what way is the same document reference not allowed? Is that
> >something special to SVG?  I don't see how it's relevant to SPARQL.
> 
> For a query at http://example.org/foo.rq my understanding is that
> there is no difference between
> 
>   BASE <http://example.org/bar.rdf>
>   SELECT ...
>   FROM <http://example.org/bar.rdf>
> 
> and
> 
>   BASE <http://example.org/bar.rdf>
>   SELECT ...
>   FROM <bar.rdf>
> 
> and
> 
>   BASE <http://example.org/bar.rdf>
>   SELECT ...
>   FROM <>
> 
> and
> 
>   SELECT ...
>   FROM <http://example.org/foo.rq>
> 
> and
> 
>   BASE <http://example.org/foo.rq>
>   SELECT ...
>   FROM <http://example.org/foo.rq>
> 
> All refer to the same RDF dataset in the FROM clause, since in each
> case the resolved reference in the FROM clause is equivalent to the
> base resource identifier, which means all of them are same document
> references, so these are queries against the SPARQL document rather
> than some external document. Such a query cannot yield in results.
> 
> >All of the whole RFC must be considered; it's cited normatively.
> >Aren't the implications of 5.1.2 and 5.1.3 clear enough with the text
> >as is? The SPARQL QL spec is just saying "if the BASE isn't
> >given explicitly, it's taken from somewhere else; somewhere that's
> >not constrained by this specification."
> >
> >If it's not clear enough as is, we'd appreciate it if you would
> >suggest some wording that you might find acceptable.
> 
> I think the note
> 
>   This specification does not define the value of the base IRI
>   for SPARQL queries with no BASE directive.
> 
> is redundant; removing it would address my concern. Changing it
> to something like
> 
>   For SPARQL queries with no BASE directive the base resource
>   identifier is established according to section 5.1/RFC 3986.
> 
> would, too; Something like
> 
>   Base resource identifiers are established per 5.1/RFC 3986,
>   where the base resource identifier embedded in content is
>   determined by the BASE declaration.
> 
> instead of some of the current text might also work. The main
> problem with the current
> 
>   This specification does not define the value of the base IRI
>   for SPARQL queries with no BASE directive.
> 
> is that it leaves open where this is defined; I read it as if base
> resource identifiers are implementation-defined if there is no BASE
> declaration (which is not true if RFC 3986 5.1.2/5.1.3 apply).

-- 
-eric

office: +81.466.49.1170 W3C, Keio Research Institute at SFC,
                        Shonan Fujisawa Campus, Keio University,
                        5322 Endo, Fujisawa, Kanagawa 252-8520
                        JAPAN
        +1.617.258.5741 NE43-344, MIT, Cambridge, MA 02144 USA
cell:   +81.90.6533.3882

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

Received on Tuesday, 18 October 2005 11:14:39 UTC