Re: Invalid attribute names
> >>>Furthermore, a name starting with > >>>a colon isn't a legal "name" token in XML, so they syntax doesn't > >>>allow that either. > >> > >>In fact it is: colon is a NameStart character. > > > > And in a namespace-aware XML parser, Name is not used for elements or attributes, > > QName is (from XML Namespaces). Isn't it a mess? > > It's a mess in theory but not in practice: whether they actually use > Namespaces or not, everyone follows the rules of XML+Namespaces rather than > just XML. I have yet to see one serious XML-related specification or > application that uses colons in a way not allowed by the Namespaces spec, > and it's unlikely that anyone would ever write one now, or that anyone else > would accept such an application or specification. Mess has no probability, even it happens once, it can crash everything. If an application which checks for well-formedness in terms of XML 1.0 is followed by an application that relies on well-formedness in terms of XML+namespaces, then failure happens at the most unexpected instance (As the original post indicated, by the way -- one tool in the tool chain was in its own right to accept attribute names matching 'Name' production, another was in its own right to reject it because it used another notion of acceptability -- imagine a person who decided to develop an application that maps Common Lisp structures to an XML grammar, and decided to map field names with leading colons to attributes or elements). What I am saying is not news at all, namely, that XML Namespaces is one big bug. No doubt, it was a well-intended design bug, but it does not change the fact that it is a fault. Having multiple levels of well-formedness does a very bad job, namely, that instead of relying on the fact that a document is well-formed and thus should be accepted by a conforming XML parser, one has to check that a document is well-formed in the same sense that particular parser understands it. Moreover, identically named basic productions (NOTATION, for example) are not the same in XML and XML+Namespaces, thus adding even more confusion. Is a parser that assesses well-formedness according to the XML Namespaces specification still a conforming XML 1.0 parser? David Tolpin http://davidashen.net/
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format