Re: [xml] ATTRIBUTE NAME validation problem

On Mon, Jan 28, 2008 at 01:55:01PM +0100, Stefan Behnel wrote:

murali wrote:

is a valid declaration of attribute ":" for element doc.

But , currently LIBXML2 generates a error when it encounters this.

well, that's just because ':' isn't really a well-formed attribute name. So
you're actually lucky libxml2 tells you that, otherwise you'd generate XML
that no parser can parse.

        Are you sure?

        In W3c XML 1.0 Recommendation (4th edition), "2.3 Common 
Syntactic Constructs", i read

        Note: The Namespaces in XML Recommendation [XML Names] assigns a
meaning to names containing colon characters. Therefore, authors should
not use the colon in XML names except for namespace purposes, but XML
processors must accept the colon as a name character.

        ":" is surely a censurable attribute name, but why you say that 
isn't well-formed?

                massimo morara

"I have yet to see any problem, however complicated, which, when
 looked at in the right way, did not become still more complicated."
-- Poul Anderson 

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