W3C home > Mailing lists > Public > www-xml-linking-comments@w3.org > January to March 2007

XML Base and "valid XML Resource Identifiers"

From: Michael Kay <mike@saxonica.com>
Date: Tue, 6 Feb 2007 22:15:17 -0000
To: <www-xml-linking-comments@w3.org>
Message-ID: <01df01c74a3c$48c8f090$6401a8c0@turtle>

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
Received on Tuesday, 6 February 2007 22:15:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:17 UTC