relative base URI reference defined circularly

This appears to be circular:

	The base URI specified by xml:base sets the base URI information set
	property of the element on which this attribute occurs, and to its
	descendants except where further xml:base attributes are applied.
	The value of the xml:base attribute may itself be a relative URI,
	in which case it must itself be resolved against the base URI of
	the element it appears on.

	-- http://www.w3.org/TR/2000/WD-xmlbase-20000221


That seems circular. For example, consider:

	<aDoc xml:base="http://example.net/dir1/dir2/">

		<anElt xml:base="../"/>

	</aDoc>

What's the value of the [base URI] property of the anElt element?
Going one step at a time:

	The value of the xml:base attribute may itself be a relative URI
i.e. "../"
	in which case it must itself be resolved against the
	base URI of the element it appears on
er... is that "http://example.net/dir1/dir2/"? then
the result of resolving is "http://example.net/dir1/". So that's
the [base URI] property of the anElt element. Oops... then
I used the wrong base URI. wheeeee!

I suggest:

	1. The value of the xml:base attribute denotes a
	URI with respect to the [base URI] property of the *parent* of
	the element on which it appears, provided the parent
	element starts and ends in the same external entity;
	otherwise (e.g. if the xml:base attribute occurs on the root element
	of a document) it denotes
	a URI with respect to the base URI of the enclosing external entity.

This is a little bit subtle, so I strongly suggest you include
the above explicit example of the use of relative URI references
in xml:base, noting that the [base URI] property of
the anElt element is http://example.net/dir1/ .


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Friday, 14 April 2000 01:10:04 UTC