Re: [xml] ATTRIBUTE NAME validation problem



Hi,

Mike Hommey wrote:
But that's still true that the XML declaration spec tells : is a valid
attribute name in an ATTLIST. ::::::::::: is, too.

http://www.w3.org/TR/xml/#NT-Name

That's puzzling.

Hmm, interesting. Even the errata list this as a valid production for a Name.

http://www.w3.org/XML/xml-V10-4e-errata#E09

There, it even says:

"""
Document authors are encouraged to use names which are meaningful words or
combinations of words in natural languages, and to avoid symbolic or white
space characters in names. Note that COLON, HYPHEN-MINUS, FULL STOP (period),
LOW LINE (underscore), and MIDDLE DOT are explicitly permitted.
"""

However, I assume that the reason is simply the support for XML namespaces,
which explicitly exclude the ':' in their NCName production:

http://www.w3.org/TR/REC-xml-names/#ns-decl
http://www.w3.org/TR/REC-xml-names/#ns-qualnames

So, a namespace aware parser is absolutely allowed to treat "::::::" names as
an error.

Stefan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]