Re: Fwd: Question about Gobo xml parsing library
Colin Adams <[email protected]> Wed, 7 Sep 2011 08:56:59 +0100
| Newsgroups | gmane.comp.lang.eiffel.gobo.devel |
|---|---|
| Message-ID | <CABHqrU=fi=8F4ctoG9FyFxCn6UoJ+8_ckmjupbTk-XnKsnMoNg@mail.gmail.com> |
--===============3251776132769836450== Content-Type: multipart/alternative; boundary=bcaec520ea43f48cb004ac554902 --bcaec520ea43f48cb004ac554902 Content-Type: text/plain; charset=UTF-8 Eric can correct me if I'm wrong, but Nenie was Franck Arnaud's domain/library, and Franck was the most recent maintainer of the Gobo XML parser, so you should use the Gobo parser which has many updates. It should fully comply with XML 1.0 edition 2 (or edition 3 or edition 4, but not edition 5, which was the W3C's way of breaking with backwards-compatibility without incrementing the version number of XML - i.e. it should have been XML 1.2). On 7 September 2011 08:47, <[email protected]> wrote: > Thank you Alexander and Collin! > > My xml document is quite simple( prolog and main node ), with no DTD or > CDATA. > That means the spaces in attributes' value should always be preserved, no > matter the parser is validating or not. > > It seems that Nenie xml parser should be corrected (it collapses the spaces > and remove leading and tailing spaces unexpectedly.) > I intend to patch Nenie xml parser with the diff I find in > > gobo-eiffel.git.sourceforge.net/git/gitweb.cgi?p=gobo-eiffel/gobo;a=commitdiff;h=374c3367994f573e2699e9df7ccb9e9372196097 > > But that one is for gobo xml parser, although I find the code is almost the > same with Nenie xml parser. > Do you know the history between these two parsers? > And what's the better choice for me, patch Nenie xml parser, or replace the > Nenie with gobo xml parser? > > Thank you in advance. > > > > -----Original Message----- > From: Colin Paul Adams [mailto:[email protected]] > Sent: Wednesday, September 07, 2011 12:55 PM > To: [email protected] > Subject: Re: [gobo-eiffel-develop] Fwd: Question about Gobo xml parsing > library > > >>>>> "Alexander" == Alexander Kogtenkov <[email protected]> writes: > > Alexander> My feeling is that the processing expectations depend on > Alexander> whether the XML parser is validating or not. The rule > Alexander> that prevents the parser from attribute normalization is > > Alexander> All attributes for which no declaration has been read > Alexander> SHOULD be treated by a non-validating processor as if > Alexander> declared CDATA. > > Alexander> And if attribute declarations are present we have > > Alexander> If the attribute type is not CDATA, then the XML > Alexander> processor MUST further [collapse white spaces]. > > Alexander> So, a non-validating XML parser should not collapse the > Alexander> white space characters, while the behaviour of the > Alexander> validating one depends on the associated attribute > Alexander> declaration. > > And to spell it out, the Gobo XML parser is non-validating. > -- > Colin Adams > Preston Lancashire > () ascii ribbon campaign - against html e-mail > /\ www.asciiribbon.org - against proprietary attachments > > > ------------------------------------------------------------------------------ > 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/ > _______________________________________________ > gobo-eiffel-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop > > > > ------------------------------------------------------------------------------ > 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/ > _______________________________________________ > gobo-eiffel-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop > --bcaec520ea43f48cb004ac554902 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eric can correct me if I'm wrong, but Nenie was Franck Arnaud's dom= ain/library, and Franck was the most recent maintainer of the Gobo XML pars= er, so you should use the Gobo parser which has many updates. It should ful= ly comply with XML 1.0 edition 2 (or edition 3 or edition 4, but not editio= n 5, which was the W3C's way of breaking with backwards-compatibility w= ithout incrementing the version number of XML - i.e. it should have been XM= L 1.2).<br> <br><div class=3D"gmail_quote">On 7 September 2011 08:47, <span dir=3D"ltr= "><<a href=3D"mailto:[email protected]">[email protected]</a>></s= pan> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0= pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> Thank you Alexander and Collin!<br> <br> My xml document is quite simple( prolog and main node ), with no DTD or CDA= TA.<br> That means the spaces in attributes' value should always be preserved, = no matter the parser is validating or not.<br> <br> It seems that Nenie xml parser should be corrected (it collapses the spaces= and remove leading and tailing spaces unexpectedly.)<br> I intend to patch Nenie xml parser with the diff I find in<br> <a href=3D"http://gobo-eiffel.git.sourceforge.net/git/gitweb.cgi?p=3Dgobo-e= iffel/gobo;a=3Dcommitdiff;h=3D374c3367994f573e2699e9df7ccb9e9372196097" tar= get=3D"_blank">gobo-eiffel.git.sourceforge.net/git/gitweb.cgi?p=3Dgobo-eiff= el/gobo;a=3Dcommitdiff;h=3D374c3367994f573e2699e9df7ccb9e9372196097</a><br> <br> But that one is for gobo xml parser, although I find the code is almost the= same with Nenie xml parser.<br> Do you know the history between these two parsers?<br> And what's the better choice for me, patch Nenie xml parser, or replace= the Nenie with gobo xml parser?<br> <br> Thank you in advance.<br> <br> <br> <br> -----Original Message-----<br> From: Colin Paul Adams [mailto:<a href=3D"mailto:[email protected]">= [email protected]</a>]<br> Sent: Wednesday, September 07, 2011 12:55 PM<br> To: <a href=3D"mailto:[email protected]">gobo-eiffe= [email protected]</a><br> Subject: Re: [gobo-eiffel-develop] Fwd: Question about Gobo xml parsing lib= rary<br> <br> >>>>> "Alexander" =3D=3D Alexander Kogtenkov <<= a href=3D"mailto:[email protected]">[email protected]</a>> writes:<br> <br> =C2=A0 =C2=A0Alexander> My feeling is that the processing expectations = depend on<br> =C2=A0 =C2=A0Alexander> whether the XML parser is validating or not. Th= e rule<br> =C2=A0 =C2=A0Alexander> that prevents the parser from attribute normali= zation is<br> <br> =C2=A0 =C2=A0Alexander> =C2=A0 =C2=A0 All attributes for which no decla= ration has been read<br> =C2=A0 =C2=A0Alexander> SHOULD be treated by a non-validating processor= as if<br> =C2=A0 =C2=A0Alexander> declared CDATA.<br> <br> =C2=A0 =C2=A0Alexander> And if attribute declarations are present we ha= ve<br> <br> =C2=A0 =C2=A0Alexander> =C2=A0 =C2=A0 If the attribute type is not CDAT= A, then the XML<br> =C2=A0 =C2=A0Alexander> processor MUST further [collapse white spaces].= <br> <br> =C2=A0 =C2=A0Alexander> So, a non-validating XML parser should not coll= apse the<br> =C2=A0 =C2=A0Alexander> white space characters, while the behaviour of = the<br> =C2=A0 =C2=A0Alexander> validating one depends on the associated attrib= ute<br> =C2=A0 =C2=A0Alexander> declaration.<br> <br> And to spell it out, the Gobo XML parser is non-validating.<br> --<br> Colin Adams<br> Preston Lancashire<br> () =C2=A0ascii ribbon campaign - against html e-mail<br> /\ =C2=A0<a href=3D"http://www.asciiribbon.org" target=3D"_blank">www.ascii= ribbon.org</a> =C2=A0 - against proprietary attachments<br> <br> ---------------------------------------------------------------------------= ---<br> Using storage to extend the benefits of virtualization and iSCSI<br> Virtualization increases hardware utilization and delivers a new level of<b= r> agility. Learn what those decisions are and how to modernize your storage<b= r> and backup environments for virtualization.<br> <a href=3D"http://www.accelacomm.com/jaw/sfnl/114/51434361/" target=3D"_bla= nk">http://www.accelacomm.com/jaw/sfnl/114/51434361/</a><br> _______________________________________________<br> gobo-eiffel-develop mailing list<br> <a href=3D"mailto:[email protected]">gobo-eiffel-de= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop= " target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/gobo-eiffe= l-develop</a><br> <br> <br> ---------------------------------------------------------------------------= ---<br> Using storage to extend the benefits of virtualization and iSCSI<br> Virtualization increases hardware utilization and delivers a new level of<b= r> agility. Learn what those decisions are and how to modernize your storage<b= r> and backup environments for virtualization.<br> <a href=3D"http://www.accelacomm.com/jaw/sfnl/114/51434361/" target=3D"_bla= nk">http://www.accelacomm.com/jaw/sfnl/114/51434361/</a><br> _______________________________________________<br> gobo-eiffel-develop mailing list<br> <a href=3D"mailto:[email protected]">gobo-eiffel-de= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop= " target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/gobo-eiffe= l-develop</a><br> </blockquote></div><br> --bcaec520ea43f48cb004ac554902-- --===============3251776132769836450== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ 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/ --===============3251776132769836450== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gobo-eiffel-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop --===============3251776132769836450==--