XML Base - discussion + test cases

Well, I bet everyone hoped that xml:base was over!
It isn't.

Summary issues:
===============

#1: (raised by Stuart Williams of the TAG).
   RFC2396 refers to same document references.
   rdf:ID is a same document reference.
   A close reading of the RFC suggests that xml:base *does not*
   apply to same document references.
   I do not believe that this was the intent of the WG, and have
   used a different algorithm (that in ARP) which *does* apply 
   xml:base to same document references.

#2: (first raised as an ARP defect, solved by 
   There is a minor bug in the algorithm of RFC 2396 which 
   I explicitly correct. I follow Mark Birbeck:

http://lists.w3.org/Archives/Public/www-rdf-interest/2001Dec/0021.html

#3: It is possible to construct an RDF/XML document which uses
    the same ID to represent two different URIs. I allow this.

#4: The XML Base spec and RFC 2396 are silent about using a
    URI of non-generic syntax (e.g. a mailto or a urn) as the base.
    I think this is broken and have created test cases showing that.

Contents
========

Background.

Issues.

Test cases overview.

=======================================================

Background
----------

RFC 2396 is primarily concerned with URLs in a web browser 
or web server. While the intent is to be more general, at
times that intent is not fulfilled.

RDF uses absolute URI refs as the labels on nodes in the
RDF graph.

The XML base standard assumes (incorrectly) that RFC 2396 
is unproblematic.

Issue #1 - Same Document References
-----------------------------------

RFC 2396 section 4.2 defines same document references.
These are URI references of the form "#foo" and "".

The algorithm in section 5.2 terminates in step 2 for
same document references.

Since the base URI is only used from steps 3 onwards, 
RFC 2396 *does not* license the use of a base URI to resolve
same document references.

Since rdf:ID is a same document reference, and central to
RDF, any use of xml:base within RDF requires it to apply
to same document references.

Impacts test cases 001, 004, 008, 014

Issue #2 - Minor bug when base has no path component.
-----------------------------------------------------

See:

test case 011 and

http://lists.w3.org/Archives/Public/www-rdf-interest/2001Dec/0021.html

RFC 2396 section 5.2 does not insert a "/" when the base 
path is missing and the relative URI is a relative
path.


Issue #3 - Duplicate rdf:ID with different bases
------------------------------------------------

See test case 014.

This is a straight call: is test case 014 legal or an error.

I prefer legal primarily because it makes reification 
syntax easier. (I will expand on that if there is interest 
in this topic).


Issue #4 - Non-generic syntax for base URI
------------------------------------------

I have created the error cases that illustrate my beliefs.
These are not backed up by any chapter and verse from RFC 2396
and/or XML Base.
In particular RFC 2396 (appendix A) would permit a URI
   mailto:Jeremy_Carroll@hp.com#foo
and hence provide a plausible meaning to error001



Test Case Overview
==================

The test cases are intended to be stored in:
  http://www.w3.org/2000/10/rdf-tests/rdfcore/xmlbase/
this impacts test005.nt

Test cases 001 - 004
    various RDF syntactic elements impacted by xml:base
    (rdf:ID, rdf:about, rdf:resource, rdf:ID for
     reification).

Test case 005 - 006
    scoping of xml:base

Test case 007 - 013
    examples of the combination of a base URI and a
    relative URI or same document reference, showing
    various different cases.

Test case 014 - see issue #3 above

Error cases - see issue #4 above.




Jeremy

Received on Tuesday, 19 February 2002 06:06:47 UTC