From: Alexander K. <kw...@ah...> - 2011-09-07 03:08:58
|
My feeling is that the processing expectations depend on whether the XML parser is validating or not. The rule that prevents the parser from attribute normalization is All attributes for which no declaration has been read SHOULD be treated by a non-validating processor as if declared CDATA. And if attribute declarations are present we have If the attribute type is not CDATA, then the XML processor MUST further [collapse white spaces]. So, a non-validating XML parser should not collapse the white space characters, while the behaviour of the validating one depends on the associated attribute declaration. Regards, Alexander Kogtenkov ----- Original Message ----- From: "Eric Bezault" <er...@go...> To: "Gobo Developers Mailing List" <gob...@li...> Sent: Wednesday, September 07, 2011 12:34 AM Subject: [gobo-eiffel-develop] Fwd: Question about Gobo xml parsing library -------- Original Message -------- Subject: Question about Gobo xml parsing library Date: Tue, 6 Sep 2011 05:40:50 -0400 From: <mon...@em...> To: <gob...@li...> Hi, Sorry for the distribution of this mail, but I’ve no idea which person should I send to. Recently I’m get quite confused about the space normalization in Eiffel xml parsing library. I’m using nenie_mods and neniexml-01 library to parse xml, and I find the spaces inside an attribute value will be collapsed, and the leading and trailing spaces be discarded. It seems that this behavior exactly conforms with the “Attribute-Value Normalization” section in XML 1.0. However, other xml parsing libaray, like Xerces C++ and JAXB, preserve the spaces. Also, when searched on Internet, I got this diff file applied to file xm_eiffel_scanner.l: http://gobo-eiffel.git.sourceforge.net/git/gitweb.cgi?p=gobo-eiffel/gobo;a=commitdiff;h=374c3367994f573e2699e9df7ccb9e9372196097 My question is, which behavior is the right one? And why Xerces C++, JAXB, and the patched gobo xml library don’t conform with XML 1.0? Thank you very much! Regards, Wang, Monica Shanghai China Telephone: 86 021 60951100 2243 |