W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

BASE IRI resolution: syntax-based normalization and/or scheme-based normalization?

From: Dan Connolly <connolly@w3.org>
Date: Fri, 22 Jul 2005 09:02:18 -0500
To: RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-Id: <1122040938.7049.285.camel@localhost>

A commentor points out in

that we're not explicit about whether section
6.2.2. "Syntax-Based Normalization" and/or
6.2.3. "Scheme-Based Normalization" of
http://www.ietf.org/rfc/rfc3986.txt are applied
to base IRIs in SPARQL. Consider this
input data:

  @prefix : <http://example/vocab#>.

  :s1 :p <example://a/b/c/%7Bfoo%7D#xyz>.
  :s2 :p <eXAMPLE://a/./b/../b/%63/%7bfoo%7d#xyz>.

and this query:

  PREFIX : <http://example/vocab#>
  PREFIX p1: <eXAMPLE://a/./b/../b/%63/%7bfoo%7d#>

  SELECT ?S WHERE { ?S :p p1:xyz }

It seems to me that the simplest answer is that no,
nothing gets canonicalized, and the answer is that
?S binds to :s2 only.

Then re scheme-based normalization, here's another test:

  @prefix : <http://example/vocab#>.
  :s3 :p <http://example.com:80/#abc>.
  :s4 :p <http://example.com/#abc>.
  :s5 :p <http://example.com/#abc>.

  PREFIX : <http://example/vocab#>
  PREFIX p2: <http://example.com:80/#>

  SELECT ?S WHERE { ?S :p p2:abc }

Let's see what current DawgShows say...
SPARQLer ( http://sparql.org/query.html ) binds to
s2 only in the 1st case and to s3 only in the 2nd case.

Likewise the rasqal demo

So I suggest adding those two tests to the test suites,
and clarifying the spec: after

 They stand for IRIs, either directly, or relative to a base IRI.

we add

 Relative IRIs are combined with base IRIs as per section
 6.5.  Relative IRI References of [19], using only the
 basic algorithm in section 5.  Reference Resolution
 of [rfc3986], without the optional Syntax-Based Normalization
 nor Scheme-Based Normalization.

Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Friday, 22 July 2005 14:02:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:36 UTC