GNOME Bugzilla – Bug 135204
SAX push parser ignores linebreaks in CDATA for line count
Last modified: 2009-08-15 18:40:50 UTC
Line breaks in a CDATA section when using a push parser do not increment line count. A patch which seems to correct this can be found at http://mail.gnome.org/archives/xml/2003-December/msg00170.html Using the following data, I was able to reproduce this with testSAX. I added the line numbers within the Debug callbacks. Run normally, the line numbers were correct. When ran with --push, the line numbers were wrong as the linebreaks within the CDATA were ignored. <?xml version="1.0"?> <data> <![CDATA[ multi line CDATA block ]]> <data> With the patch the difference I see is that using push parser, the line count is not incremented until after the cdata callback, while it seems to be incremeneted before the callback otherwise.
Dave Beckett provided a patch which seems to fix this, and is commited into CVS, thanks, Daniel
This should be closed by release 2.6.9, thanks, Daniel