You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/01/24 17:30:35 UTC

cvs commit: xml-xerces/c/src/parsers SAX2XMLReaderImpl.cpp SAX2XMLReaderImpl.hpp

tng         02/01/24 08:30:35

  Modified:    c/src/parsers SAX2XMLReaderImpl.cpp SAX2XMLReaderImpl.hpp
  Log:
  [Bug 3111] Problem with LexicalHandler::startDTD() and LexicalHandler::endDTD() .
  
  Revision  Changes    Path
  1.22      +10 -0     xml-xerces/c/src/parsers/SAX2XMLReaderImpl.cpp
  
  Index: SAX2XMLReaderImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/SAX2XMLReaderImpl.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- SAX2XMLReaderImpl.cpp	21 Dec 2001 18:03:25 -0000	1.21
  +++ SAX2XMLReaderImpl.cpp	24 Jan 2002 16:30:34 -0000	1.22
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2XMLReaderImpl.cpp,v $
  + * Revision 1.22  2002/01/24 16:30:34  tng
  + * [Bug 3111] Problem with LexicalHandler::startDTD() and LexicalHandler::endDTD() .
  + *
    * Revision 1.21  2001/12/21 18:03:25  tng
    * [Bug 1833] LexicalHandler::startDTD not called correctly.
    *
  @@ -366,6 +369,7 @@
       , fAdvDHListSize(32)
       , fParseInProgress(false)
       , fScanner(0)
  +    , fHasExternalSubset(false)
   {
       //
       //  Create a scanner and tell it what validator to use. Then set us
  @@ -1156,6 +1160,10 @@
   
   void SAX2XMLReaderImpl::endIntSubset()
   {
  +   // Call the installed LexicalHandler.
  +   if (!fHasExternalSubset && fLexicalHandler)
  +        fLexicalHandler->endDTD();
  +
       // Unused by SAX DTDHandler interface at this time
   }
   
  @@ -1196,6 +1204,7 @@
   
   void SAX2XMLReaderImpl::resetDocType()
   {
  +    fHasExternalSubset = false;
       // Just map to the DTD handler
       if (fDTDHandler)
           fDTDHandler->resetDocType();
  @@ -1231,6 +1240,7 @@
   
   void SAX2XMLReaderImpl::startExtSubset()
   {
  +    fHasExternalSubset = true;
       // Unused by SAX DTDHandler interface at this time
   }
   
  
  
  
  1.19      +11 -2     xml-xerces/c/src/parsers/SAX2XMLReaderImpl.hpp
  
  Index: SAX2XMLReaderImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/SAX2XMLReaderImpl.hpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- SAX2XMLReaderImpl.hpp	18 Jan 2002 16:31:38 -0000	1.18
  +++ SAX2XMLReaderImpl.hpp	24 Jan 2002 16:30:34 -0000	1.19
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2XMLReaderImpl.hpp,v $
  + * Revision 1.19  2002/01/24 16:30:34  tng
  + * [Bug 3111] Problem with LexicalHandler::startDTD() and LexicalHandler::endDTD() .
  + *
    * Revision 1.18  2002/01/18 16:31:38  tng
    * Break program.xml which takes too long to load, into program-sax.xml, program-sax2.xml, program-dom.xml, program-idom.xml.
    *
  @@ -1411,6 +1414,9 @@
       //      The scanner being used by this parser. It is created internally
       //      during construction.
       //
  +    //  fHasExternalSubset
  +    //      Indicate if the document has external DTD subset.
  +    //
       // -----------------------------------------------------------------------
   	VecAttributesImpl		   fAttrList ;
   	ContentHandler*			   fDocHandler ;
  @@ -1435,9 +1441,12 @@
       unsigned int               fAdvDHListSize;
       bool                       fParseInProgress;
       XMLScanner*                fScanner;
  +    bool                       fHasExternalSubset;
   	
  -	// internal function used to set the state of validation: always, never, or auto
  -	void setValidationScheme(const ValSchemes newScheme);
  +    // -----------------------------------------------------------------------
  +    // internal function used to set the state of validation: always, never, or auto
  +    // -----------------------------------------------------------------------
  +    void setValidationScheme(const ValSchemes newScheme);
       void setDoNamespaces(const bool newState);
       bool getDoNamespaces() const;
       void setDoSchema(const bool newState);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org