Re: Fwd: Question about Gobo xml parsing library

"Alexander Kogtenkov" <[email protected]> Wed, 7 Sep 2011 07:08:50 +0400
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <0C9DEB6A2FB84098A4B35D428C40FD2D@alexander>
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" <[email protected]>
To: "Gobo Developers Mailing List" <[email protected]>
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: <[email protected]>
To: <[email protected]>



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 


------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/