[rfc-i] The xml:base attribute in the v3 format

paul.hoffman at vpnc.org (Paul Hoffman) Mon, 23 February 2015 23:34 UTC

From: "paul.hoffman at vpnc.org"
Date: Mon, 23 Feb 2015 15:34:37 -0800
Subject: [rfc-i] The xml:base attribute in the v3 format
Message-ID: <E803DBBC-A482-4818-8847-91C86D353B26@vpnc.org>

The xml:base attribute can be introduced into an XML document when doing XML-to-XML processing to remove XInclude elements. Given this processing, the xml:base attribute could appear in nearly any element in the vocabulary. There is a question about whether or not xml:base should be allowed in valid v3 documents.

The main advantage of allowing xml:base in the grammar, instead of the processor stripping them out after they are added, is that the information is valuable for document authors (to know where the included information came from), and possibly for processors (which might be configured to refresh based on the xml:base value).

The main disadvantage to allowing xml:base in the grammar is that it makes the grammar much harder to read, since every element has to specify that xml:base is allowed. There appears to be no easy way to say "allow this attribute in all elements in this grammar".

There are a few ways forward:

a) Disallow xml:base in the vocabulary, and strip it when doing XML-to-XML processing

b) Have two v3 vocabularies: a complex one with xml:base in every element, and and simplified one for documentation that doesn't show xml:base

c) Allow xml:base in the vocabulary, and show it in the documentation

On a related topic, the xml:lang attribute is currently allowed in a few elements in the grammar, but could also make sense in many more places in the future. If it is desired to allow it everywhere, choice (b) and (c) above could be amended to include xml:lang as well.

Thoughts?

--Paul Hoffman