diff --git a/src/framework/XMLValidator.cpp b/src/framework/XMLValidator.cpp index 973da65040f5e066abc1a441fc2c1024ca939586..3db7011ab856342d3908ac27861f66f780e48137 100644 --- a/src/framework/XMLValidator.cpp +++ b/src/framework/XMLValidator.cpp @@ -56,6 +56,9 @@ /** * $Log$ + * Revision 1.12 2001/11/28 20:32:49 tng + * Do not increment the error count if it is a warning. + * * Revision 1.11 2001/10/24 23:46:52 peiyongz * [Bug 4342] fix the leak. * @@ -176,9 +179,10 @@ static XMLMsgLoader& getMsgLoader() // void XMLValidator::emitError(const XMLValid::Codes toEmit) { - // Track our error count - fScanner->incrementErrorCount(); - + // Bump the error count if it is not a warning + if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning) + fScanner->incrementErrorCount(); + // Call error reporter if we have one if (fErrorReporter) { @@ -233,9 +237,10 @@ void XMLValidator::emitError(const XMLValid::Codes toEmit , const XMLCh* const text3 , const XMLCh* const text4) { - // Track our error count - fScanner->incrementErrorCount(); - + // Bump the error count if it is not a warning + if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning) + fScanner->incrementErrorCount(); + // Call error reporter if we have one if (fErrorReporter) { @@ -293,9 +298,10 @@ void XMLValidator::emitError(const XMLValid::Codes toEmit , const char* const text3 , const char* const text4) { - // Track our error count - fScanner->incrementErrorCount(); - + // Bump the error count if it is not a warning + if (XMLValid::errorType(toEmit) != XMLErrorReporter::ErrType_Warning) + fScanner->incrementErrorCount(); + // Call error reporter if we have one if (fErrorReporter) { diff --git a/src/internal/XMLScanner.cpp b/src/internal/XMLScanner.cpp index 15cc568e4ef165b5319ead6a17f4579633ed7593..91e057920b4bac6607a3ab8489743ff565f74edc 100644 --- a/src/internal/XMLScanner.cpp +++ b/src/internal/XMLScanner.cpp @@ -1059,8 +1059,9 @@ void XMLScanner::resetURIStringPool() { // void XMLScanner::emitError(const XMLErrs::Codes toEmit) { - // Bump the error count - incrementErrorCount(); + // Bump the error count if it is not a warning + if (XMLErrs::errorType(toEmit) != XMLErrorReporter::ErrType_Warning) + incrementErrorCount(); if (fErrorReporter) { @@ -1110,8 +1111,9 @@ void XMLScanner::emitError( const XMLErrs::Codes toEmit , const XMLCh* const text3 , const XMLCh* const text4) { - // Bump the error count - incrementErrorCount(); + // Bump the error count if it is not a warning + if (XMLErrs::errorType(toEmit) != XMLErrorReporter::ErrType_Warning) + incrementErrorCount(); if (fErrorReporter) { @@ -1164,8 +1166,9 @@ void XMLScanner::emitError( const XMLErrs::Codes toEmit , const char* const text3 , const char* const text4) { - // Bump the error count - incrementErrorCount(); + // Bump the error count if it is not a warning + if (XMLErrs::errorType(toEmit) != XMLErrorReporter::ErrType_Warning) + incrementErrorCount(); if (fErrorReporter) {