From 1712fffdf3eb8568230b122d01ba8a2337c6ee0b Mon Sep 17 00:00:00 2001 From: Khaled Noaman <knoaman@apache.org> Date: Mon, 1 Apr 2002 16:43:14 +0000 Subject: [PATCH] Fix for bug 7297. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173599 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/internal/XMLScanner.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/xercesc/internal/XMLScanner.cpp b/src/xercesc/internal/XMLScanner.cpp index 2b6fb05cd..888e28423 100644 --- a/src/xercesc/internal/XMLScanner.cpp +++ b/src/xercesc/internal/XMLScanner.cpp @@ -2382,19 +2382,11 @@ bool XMLScanner::scanStartTag(bool& gotData) , elemDecl->getFullName() ); } - - // - // If we are not validating, then mark it as declared since it makes - // things simpler and we aren't going to do do the validation checks - // that need to know if it was really declared or not anyway. - // - if (!fValidate) - elemDecl->setCreateReason(XMLElementDecl::Declared); } else { // If its not marked declared and validating, then emit an error - if (!elemDecl->isDeclared() && fValidate) + if (fValidate && !elemDecl->isDeclared()) { fValidator->emitError ( @@ -3272,14 +3264,6 @@ bool XMLScanner::scanStartTagNS(bool& gotData) , elemDecl->getFullName() ); } - - // - // If we are not validating, then mark it as declared since it makes - // things simpler and we aren't going to do do the validation checks - // that need to know if it was really declared or not anyway. - // - if (!fValidate) - elemDecl->setCreateReason(XMLElementDecl::Declared); } else { -- GitLab