W3C home > Mailing lists > Public > uri@w3.org > April 2002

Resolving references against base URIs

From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
Date: Wed, 10 Apr 2002 19:42:33 +0200
To: <uri@w3.org>
Cc: <www-xml-linking-comments@w3.org>
Message-ID: <MABBLGKMPIJFCKFGDBEPIEKDCAAA.jjc@hplb.hpl.hp.com>

This is a comment about RFC 2396 that I have been actioned to send on behalf
of the W3C RDF Core Working Group [1]

The key issue concern resolving same document references and/or resolving
against non-hierarchical URIs.

These have been causing us difficulty in using xml:base

As one of our deliverables we produce test cases [2].

A summary table of our URI resolution problems is as follows;
the answers we have agreed are in the attached HTML file.

a "http://example.org/dir/file"      "../relfile"
b "http://example.org/dir/file"      "/absfile"
c "http://example.org/dir/file"      "//another.example.org/absfile"

d "http://example.org/dir/file"      "../../../relfile"
e "http://example.org/dir/file"      ""
f "http://example.org/dir/file"      "#frag"

g "http://example.org"               "relfile"

h "http://example.org/dir/file#frag" "relfile"
i "http://example.org/dir/file#frag" "#foo"
j "http://example.org/dir/file#frag" ""

k "mailto:Jeremy_Carroll@hp.com"     "#foo"
l "mailto:Jeremy_Carroll@hp.com"     ""
m "mailto:Jeremy_Carroll@hp.com"     "relfile"

We have reached consensus on and approved all these tests except for the
last which some of us consider an error and others resolve as indicated in
the html file.

The rationales for our views are approximately as follows:

d "http://example.org/dir/file"      "../../../relfile"

   In practice, some implementations strip leading relative symbolic
   elements (".", "..") after applying a relative URI calculation, based
   on the theory that compensating for obvious author errors is better
   than allowing the request to fail.
Not permitted in RDF/XML.

Base does apply to same document references in RDF/XML

Failure to insert / is a bug with RFC 2396

Strip frag id from base uri ref before resolving.
Notice j is particularly surprising.

Same document reference resolution even works for non-hierarchical uris.

- no consensus

The test suite is structured as follows:

The positive tests on the test cases web site show a usage of xml:base in
RDF/XML and the resolution of that usage in terms of the RDF graph produced
(with absolute URI ref labels). Each test consists of two files, an RDF/XML
document and an n-triple file (substitute .rdf with .nt in the URL), being a
list of the edges of the graph.

The negative test case shows possibly illegal usage of xml:base in RDF/XML.

Our intent is that these tests will be part of a normative revision of the
RDF recommendation.

Jeremy Carroll
HP Rep W3C RDF Core WG

2002-03-22#4:  jeremy Send mailto:uri@w3.org with appropriate tests


Received on Wednesday, 10 April 2002 13:35:58 UTC

This archive was generated by hypermail 2.4.0 : Sunday, 10 October 2021 22:17:40 UTC