You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by jb...@apache.org on 2001/06/04 22:59:30 UTC

cvs commit: xml-xerces/c/src/internal XMLScanner.cpp XMLScanner.hpp XMLScanner2.cpp

jberry      01/06/04 13:59:30

  Modified:    c/src/internal XMLScanner.cpp XMLScanner.hpp XMLScanner2.cpp
  Log:
  Add method incrementErrorCount for use by validator. Make sure to reset error count in _both_ the scanReset methods.
  
  Revision  Changes    Path
  1.44      +5 -5      xml-xerces/c/src/internal/XMLScanner.cpp
  
  Index: XMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner.cpp,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- XMLScanner.cpp	2001/06/04 13:27:26	1.43
  +++ XMLScanner.cpp	2001/06/04 20:59:29	1.44
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLScanner.cpp,v 1.43 2001/06/04 13:27:26 tng Exp $
  + * $Id: XMLScanner.cpp,v 1.44 2001/06/04 20:59:29 jberry Exp $
    */
   
   
  @@ -948,7 +948,7 @@
   void XMLScanner::emitError(const XMLErrs::Codes toEmit)
   {
       //	Bump the error count
  -    ++fErrorCount;
  +    incrementErrorCount();
   
       if (fErrorReporter)
       {
  @@ -999,8 +999,8 @@
                               , const XMLCh* const        text4)
   {
       //	Bump the error count
  -    ++fErrorCount;
  -
  +    incrementErrorCount();
  +    
       if (fErrorReporter)
       {
           //
  @@ -1053,7 +1053,7 @@
                               , const char* const         text4)
   {
       //	Bump the error count
  -    ++fErrorCount;
  +    incrementErrorCount();
   
       if (fErrorReporter)
       {
  
  
  
  1.21      +17 -0     xml-xerces/c/src/internal/XMLScanner.hpp
  
  Index: XMLScanner.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner.hpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- XMLScanner.hpp	2001/06/03 19:21:40	1.20
  +++ XMLScanner.hpp	2001/06/04 20:59:29	1.21
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: XMLScanner.hpp,v $
  + * Revision 1.21  2001/06/04 20:59:29  jberry
  + * Add method incrementErrorCount for use by validator. Make sure to reset error count in _both_ the scanReset methods.
  + *
    * Revision 1.20  2001/06/03 19:21:40  jberry
    * Add support for tracking error count during parse; enables simple parse without requiring error handler.
    *
  @@ -409,6 +412,11 @@
       void setDoSchema(const bool doSchema);
   
       // -----------------------------------------------------------------------
  +    //  Mutator methods
  +    // -----------------------------------------------------------------------
  +    void incrementErrorCount(void);			// For use by XMLValidator
  +
  +    // -----------------------------------------------------------------------
       //  Deprecated methods as of 3.2.0. Use getValidationScheme() and
       //  setValidationScheme() instead.
       // -----------------------------------------------------------------------
  @@ -1061,6 +1069,15 @@
   inline void XMLScanner::setDoSchema(const bool doSchema)
   {
       fDoSchema = doSchema;
  +}
  +
  +
  +// ---------------------------------------------------------------------------
  +//  XMLScanner: Mutator methods
  +// ---------------------------------------------------------------------------
  +inline void XMLScanner::incrementErrorCount()
  +{
  +    ++fErrorCount;
   }
   
   
  
  
  
  1.33      +2 -1      xml-xerces/c/src/internal/XMLScanner2.cpp
  
  Index: XMLScanner2.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner2.cpp,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- XMLScanner2.cpp	2001/05/28 20:55:02	1.32
  +++ XMLScanner2.cpp	2001/06/04 20:59:29	1.33
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLScanner2.cpp,v 1.32 2001/05/28 20:55:02 tng Exp $
  + * $Id: XMLScanner2.cpp,v 1.33 2001/06/04 20:59:29 jberry Exp $
    */
   
   
  @@ -810,6 +810,7 @@
       // Reset some status flags
       fInException = false;
       fStandalone = false;
  +    fErrorCount = 0;
   
       //
       //  Handle the creation of the XML reader object for this input source.
  
  
  

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