Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 25864 invoked by uid 500); 13 Aug 2001 05:31:49 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 25853 invoked from network); 13 Aug 2001 05:31:49 -0000 Date: 13 Aug 2001 05:28:50 -0000 Message-ID: <20010813052850.29244.qmail@icarus.apache.org> From: garyp@apache.org To: xml-xalan-cvs@apache.org Subject: cvs commit: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N garyp 01/08/12 22:28:50 Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java Log: Fix bugzilla bug 3056 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3056). SAX2DTM now keeps track if it is receiving events inside a DTD and ignores comment events when inside the DTD. Revision Changes Path 1.16 +8 -2 xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java Index: SAX2DTM.java =================================================================== RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- SAX2DTM.java 2001/08/09 17:13:15 1.15 +++ SAX2DTM.java 2001/08/13 05:28:50 1.16 @@ -142,6 +142,9 @@ /** The SAX Document locator */ transient private Locator m_locator = null; + /** We are inside the DTD. This is used for ignoring comments. */ + transient private boolean m_insideDTD = false; + /** Tree Walker for dispatchToEvents. */ protected DTMTreeWalker m_walker = new DTMTreeWalker(); @@ -2096,7 +2099,7 @@ throws SAXException { - // no op + m_insideDTD = true; } /** @@ -2108,7 +2111,7 @@ public void endDTD() throws SAXException { - // no op + m_insideDTD = false; } /** @@ -2192,6 +2195,9 @@ */ public void comment(char ch[], int start, int length) throws SAXException { + + if (m_insideDTD) // ignore comments if we're inside the DTD + return; charactersFlush(); --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xalan-cvs-help@xml.apache.org