You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Lauren Bish <lc...@developerdude.org> on 2005/10/08 02:25:36 UTC

XML Element Names and 'XML'??

According to the XML spec, Element names are not allowed to start  
with "XML" (or any case variation thereof), yet when I call  
XML11Char.isXML11ValidName(String) with "xml" as an argument, the  
method returns true where I would have expected it to return false. I  
updated to 2.7.1 and got the same result.

The method works well for other restrictions on the name.

Thoughts?

Is this a bug or do I not understand the purpose of the method?

TIA

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: XML Element Names and 'XML'??

Posted by Elliotte Harold <el...@metalab.unc.edu>.
Lauren Bish wrote:
> According to the XML spec, Element names are not allowed to start with 
> "XML" (or any case variation thereof), yet when I call 
> XML11Char.isXML11ValidName(String) with "xml" as an argument, the method 
> returns true where I would have expected it to return false. I updated 
> to 2.7.1 and got the same result.
> 

Such names are reserved but they are not malformed. It is possible 
(though unlikely at this point) that the W3C will choose to define such 
names in the future with specific meanings. If you define such names 
yourself, you do so at your own risk that the W3C may come along later 
and use that same name for something completely different. However this 
was all set up before namespaces were invented, and I doubt the W3C will 
ever take advantage of this now.

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org