W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > May 2011

Re: Reserved XML names and namespaces

From: Michael Schäfer <michael.schaefer@destatis.de>
Date: Tue, 17 May 2011 03:10:39 +0200
Message-ID: <4DD0E674.2090206@destatis.de>
To: public-xml-core-wg@w3.org
CC: Jirka Kosek <jirka@kosek.cz>, liam@w3.org, Innovimax W3C <innovimax+w3c@gmail.com>, ht@inf.ed.ac.uk
 > It cannot do so.  If it did, then e.g. <foo xmlns="..."/> would be
 > invalid, because 'xmlns' would not be a Name.  It is _necessary_  that
 > the reservation of xml... is not expressed in a production.

My mistake, thanks for making this clear. Using "xml..." must still be
legal for the XML spec itself.

 > Actually XML spec doesn't forbid them but reserves them for future use
 > by W3C. So reasonable application shouldn't choke on such element names,

If this distinction makes no difference in terms of conformance, I expect
a decent XML schema editor to at least warn me about this, if not declare
the schema invalid.

Just to summarise what I've learnt/understood so far:

- XML names in namespaces are subject to the same naming rules that apply
to non-namespaced names (except for the use of ':').

- A technical reason is that when using a default namespace, names
starting with "xml" will be interpreted as syntactically wrong
(presence of namespace doesn't make any difference?).

- Names beginning with "xml" are not forbidden but just reserved because
if they were forbidden the XML spec couldn't use such names itself (see
above), but for the rest of the world this distinction doesn't make any
difference as to conformance.

Michael
Received on Tuesday, 17 May 2011 01:10:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:43 UTC