tng         2002/11/28 11:20:33

  Modified:    c/src/xercesc/validators/DTD DTDValidator.cpp
  Log:
  Performance: Move the getScanner()->getDoNamespaces() out of the loop
  
  Revision  Changes    Path
  1.10      +4 -2      xml-xerces/c/src/xercesc/validators/DTD/DTDValidator.cpp
  
  Index: DTDValidator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/DTD/DTDValidator.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DTDValidator.cpp  28 Nov 2002 17:53:28 -0000      1.9
  +++ DTDValidator.cpp  28 Nov 2002 19:20:33 -0000      1.10
  @@ -303,6 +303,8 @@
   
       XMLCh* valPtr = pszTmpVal;
   
  +    bool doNamespace = getScanner()->getDoNamespaces();
  +
       while (true)
       {
           // Reset the trigger flags
  @@ -343,7 +345,7 @@
               //  All these must be valid XMLName
               // If namespace is enabled, colon is not allowed in the first 6
   
  -            if (*valPtr == chColon && firstNameChar && 
getScanner()->getDoNamespaces())
  +            if (doNamespace && *valPtr == chColon && firstNameChar)
                   getScanner()->emitError(XMLErrs::ColonNotLegalWithNS);
   
               if (!XMLReader::isNameChar(*valPtr))
  
  
  

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

Reply via email to