XML Base and "valid XML Resource Identifiers"

The PER for XML Base states

The base URI of an element bearing an xml:base attribute with a value that
is not a valid XML Resource Identifier is application dependent.

[XML Resource Identifier] is defined by reference to XLink. But XLink
nowhere states any constraints on what constitutes a valid XML Resource
Identifier - the concept appears to be even more soggily defined than URLs,
URIs, or IRIs. The definition (look it up if you don't believe me) is:

[Definition: XML resource identifier is a character string meant to be used
as an IRI reference or URI reference.]

In other words, the only way to tell whether something is a valid XRI is to
read the mind of the person who composed it. There's no supplementary
definition in terms of a grammar or regular expression; the only additional
information provided is that it may contain characters which would need to
be escaped in an IRI.

Please can we stop building our specifications on sand? To write software,
we need to know what can and what can't appear in an xml:base attribute. I
don't mind it being implementation-defined what happens if the value is not
a valid XRI, so long as I know how to test whether it is a valid XRI.

I got here by studying an XSLT test case, in which the character string
xml:base="{@xyz}" appears, and where the outcome of the test depends on
knowing the base URI of the element node that carries that attribute. I need
to know whether I'm allowed to throw that out as an error, or if not, what
I'm supposed to do with it.

Michael Kay
http://www.saxonica.com/

Received on Tuesday, 6 February 2007 22:15:32 UTC