cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From step...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/xml IncludeXMLConsumer.java
Date Tue, 02 Jul 2002 22:01:45 GMT
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.
  
  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);
       }
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message