cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <vadim.gritse...@verizon.net>
Subject Re: Bug 17763 (comments from external DTD cause serializer problems) solution
Date Wed, 30 Apr 2003 16:15:55 GMT
Bruno Dumon wrote:

>I'm looking into solving bug 17763:
>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17763
>
>The problem is that the parser (Xerces) will produce SAX comment()
>events for comments occuring in the DTD, and that in this case the
>serializer (which is based on Xalan) will serialize invalid XML.
>
>The invalid XML itself is a problem with Xalan, however I think there's
>no use in preserving the comments from the (external) DTD.
>
>The SAX documentation for comment() says:
>This callback will be used for comments inside or outside the document
>element, including comments in the external DTD subset (if read).
>Comments in the DTD must be properly nested inside start/endDTD and
>start/endEntity events (if used).
>
>So this is not a Xerces problem, Xerces is allowed to generate these
>comment() events. As a solution, I propose we throw all events between
>start/endDTD away in the avalon parser component.
>

Should this be configurable behavior - is there a usecase to have these 
events in the pipeline?

Another option to solve it is to ignore these events in the serializer 
itself. But ignoring them in the parser will give better performance.

Vadim


>If nobody sees a problem with this solution, I'll go ahead and prepare a
>patch.
>



Mime
View raw message