elena       2002/08/26 11:17:35

  Modified:    java/src/org/apache/xerces/impl XMLDTDScannerImpl.java
  Log:
  Fix bug: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11156
  If the document does not have any data after doctype, we receive endEntity call.
  In this case we should just exit, since DTD scanner should be replaced with Document 
scanner
  
  Revision  Changes    Path
  1.27      +7 -2      
xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java
  
  Index: XMLDTDScannerImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLDTDScannerImpl.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XMLDTDScannerImpl.java    1 Aug 2002 17:48:07 -0000       1.26
  +++ XMLDTDScannerImpl.java    26 Aug 2002 18:17:35 -0000      1.27
  @@ -502,6 +502,11 @@
   
           super.endEntity(name);
   
  +        // if there is no data after the doctype
  +        //  
  +        if (fScannerState == SCANNER_STATE_END_OF_INPUT)
  +            return;
  +
           // Handle end of PE
           boolean reportEntity = fReportEntity;
           if (name.startsWith("%")) {
  @@ -1834,7 +1839,7 @@
                       }
                       else if (fEntityScanner.skipString("ATTLIST")) {
                           scanAttlistDecl();
  -                    }
  +                    }                                               
                       else if (fEntityScanner.skipString("ENTITY")) {
                           scanEntityDecl();
                       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to