Ok, I've a patch against an actual cvs copy (cocoon_2_0_3_branch). Should i create a patch entry at bugzilla?
Sven Kitschke wrote: > Hi, > > using the cinclude or the xinclude transformer > i get everytime the comments from the source > documents DTD included. This results in ca. > 114 kB extra with the DocBook DTD. >
--- E:\cvs_cocoon\xml-cocoon2\src\java\org\apache\cocoon\xml\IncludeXMLConsumer.java 2002-03-11 12:15:26.000000000 +0100 +++ IncludeXMLConsumer.java 2002-07-02 21:58:38.000000000 +0200 @@ -82,6 +82,7 @@ private boolean ignoreEmptyCharacters = false; private boolean ignoreRootElement = false; private int ignoreRootElementCount; + private boolean inDTD = false; /** * Constructor @@ -214,10 +215,12 @@ public void startDTD(String name, String public_id, String system_id) throws SAXException { // Ignored + inDTD = true; } public void endDTD() throws SAXException { // Ignored + inDTD = false; } public void startEntity(String name) throws SAXException { @@ -242,7 +245,7 @@ public void comment(char ary[], int start, int length) throws SAXException { - if(lexicalHandler != null) + if(!inDTD && lexicalHandler != null) lexicalHandler.comment(ary,start,length); } }
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>