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

RE: Reserved XML names and namespaces

From: Grosso, Paul <pgrosso@ptc.com>
Date: Tue, 17 May 2011 09:16:56 -0400
Message-ID: <9B2DE9094C827E44988F5ADAA6A2C5DA02CB5B2B@HQ-MAIL9.ptcnet.ptc.com>
To: <public-xml-core-wg@w3.org>, Michael Schäfer <michael.schaefer@destatis.de>
I believe your summary is basically correct.

Some tools (XML editors, schema editors, XSLT processors, etc.) may 
issue a warning as you suggest might be the case, but since the spec
doesn't require it, such a warning would be optional.

paul

> -----Original Message-----
> From: public-xml-core-wg-request@w3.org [mailto:public-xml-core-wg-
> request@w3.org] On Behalf Of Michael Schäfer
> Sent: Monday, 2011 May 16 20:11
> To: public-xml-core-wg@w3.org
> Cc: Jirka Kosek; liam@w3.org; Innovimax W3C; ht@inf.ed.ac.uk
> Subject: Re: Reserved XML names and namespaces
> 
> 
>  > 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 13:18:18 UTC

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