cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Bug 17763 (comments from external DTD cause serializer problems) solution
Date Wed, 30 Apr 2003 13:46:09 GMT
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.

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

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message