cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Michels <step...@apache.org>
Subject RE: cvs commit: xml-cocoon2/src/java/org/apache/cocoon/xml IncludeXMLConsumer.java
Date Tue, 09 Jul 2002 20:04:43 GMT


On Tue, 9 Jul 2002, Vadim Gritsenko wrote:

> > From: stephan@apache.org [mailto:stephan@apache.org]
> >
> > stephan     2002/07/02 15:01:45
> >
> >   Modified:    src/java/org/apache/cocoon/xml IncludeXMLConsumer.java
> >   Log:
> >   Patch applied from Sven Kitschke <kicke@web.de>, which
> >   prevents comments from a DTD.
>
> How about applying this to the 2.0.3 branch?
>
> Does this patch solve some bug from the bugzilla? If so, entry in
> changes.xml will be great.

The patch doesn't solve my problem with the comments. I don't know why
they appear. If have more time I will look into the problem.

Stephan Michels.

>
> >   Revision  Changes    Path
> >   1.8       +5 -2      xml-
> > cocoon2/src/java/org/apache/cocoon/xml/IncludeXMLConsumer.java
> >
> >   Index: IncludeXMLConsumer.java
> >   ===================================================================
> >   RCS file: /home/cvs/xml-
> > cocoon2/src/java/org/apache/cocoon/xml/IncludeXMLConsumer.java,v
> >   retrieving revision 1.7
> >   retrieving revision 1.8
> >   diff -u -r1.7 -r1.8
> >   --- IncludeXMLConsumer.java	4 Jun 2002 09:27:21 -0000	1.7
> >   +++ IncludeXMLConsumer.java	2 Jul 2002 22:01:45 -0000	1.8
> >   @@ -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);
> >        }
> >    }
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message