On Tue, 9 Jul 2002, Vadim Gritsenko wrote:
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >
> > stephan 2002/07/02 15:01:45
> >
> > Modified: src/java/org/apache/cocoon/xml IncludeXMLConsumer.java
> > Log:
> > Patch applied from Sven Kitschke <[EMAIL PROTECTED]>, 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: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]