Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 257 invoked by uid 500); 30 Apr 2003 13:46:08 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 190 invoked from network); 30 Apr 2003 13:46:07 -0000 Received: from dobit2.rug.ac.be (157.193.42.8) by daedalus.apache.org with SMTP; 30 Apr 2003 13:46:07 -0000 Received: from allserv.rug.ac.be (allserv.rug.ac.be [157.193.40.42]) by dobit2.rug.ac.be (8.12.8/8.12.8) with ESMTP id h3UDk7qk026109 for ; Wed, 30 Apr 2003 15:46:07 +0200 (MEST) Received: from otsrv1.iic.rug.ac.be (otsrv1.iic.rug.ac.be [157.193.121.51]) by allserv.rug.ac.be (8.12.8/8.12.8) with ESMTP id h3UDk7aU002019 for ; Wed, 30 Apr 2003 15:46:07 +0200 (MEST) Received: from [192.168.123.102] (host102 [192.168.123.102]) by otsrv1.iic.rug.ac.be (8.11.6/8.11.6) with ESMTP id h3UDk7x20625 for ; Wed, 30 Apr 2003 15:46:07 +0200 Subject: Bug 17763 (comments from external DTD cause serializer problems) solution From: Bruno Dumon To: cocoon-dev@xml.apache.org Content-Type: text/plain Organization: Outerthought Message-Id: <1051710368.6841.10.camel@yum.ot> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Apr 2003 15:46:09 +0200 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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