[ 
https://issues.apache.org/jira/browse/XERCESJ-1681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078699#comment-16078699
 ] 

Elliotte Rusty Harold commented on XERCESJ-1681:
------------------------------------------------

This is a very subtle point. Your user is correct. You should not use the 
element name xml-root, though the sky won't fall if you do.

However this is not an error that Xerces should report. Names like xml-root can 
be defined by a future version of the XML specification, and they are not 
malformed or inherently invalid. Thus, no error. At most it should report a 
non-fatal warning. 

> Report parse error when element names begin with "xml"
> ------------------------------------------------------
>
>                 Key: XERCESJ-1681
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1681
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: SAX
>            Reporter: Radu Coravu
>
> One of our users suggested us that an XML like this:
> {code:xml}
> <xml-root></xml-root>
> {code}
> is not valid because the specs:
> https://www.w3.org/TR/2006/REC-xml11-20060816/#sec-common-syn
> says that the name of an XML element should not start with XML:
> {code}
> A Name is a token beginning with a letter or one of a few punctuation 
> characters, and continuing with letters, digits, hyphens, underscores, 
> colons, or full stops, together known as name characters.] Names beginning 
> with the string "xml", or with any string which would match (('X'|'x') 
> ('M'|'m') ('L'|'l')), are reserved for standardization in this or future 
> versions of this specification.
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to