You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2001/11/02 21:54:04 UTC

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

knoaman     01/11/02 12:54:04

  Modified:    c/src/internal XMLScanner2.cpp
  Log:
  Add check for grammar type when processing ic.
  
  Revision  Changes    Path
  1.64      +14 -8     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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- XMLScanner2.cpp	2001/11/02 14:20:14	1.63
  +++ XMLScanner2.cpp	2001/11/02 20:54:04	1.64
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLScanner2.cpp,v 1.63 2001/11/02 14:20:14 knoaman Exp $
  + * $Id: XMLScanner2.cpp,v 1.64 2001/11/02 20:54:04 knoaman Exp $
    */
   
   
  @@ -1182,10 +1182,13 @@
        else
       {
           // call all active identity constraints
  -        unsigned int count = fMatcherStack->getMatcherCount();
  +        if (fGrammarType == Grammar::SchemaGrammarType) {
   
  -        for (unsigned int i = 0; i < count; i++) {
  -            fMatcherStack->getMatcherAt(i)->docCharacters(toSend.getRawBuffer(), toSend.getLen());
  +            unsigned int count = fMatcherStack->getMatcherCount();
  +
  +            for (unsigned int i = 0; i < count; i++) {
  +                fMatcherStack->getMatcherAt(i)->docCharacters(toSend.getRawBuffer(), toSend.getLen());
  +            }
           }
   
           // Always assume its just char data if not validating
  @@ -2128,11 +2131,14 @@
           //
           if (nextCh == chCloseSquare && fReaderMgr.skippedString(CDataClose))
           {
  -            // call all active identity constraints
  -            unsigned int count = fMatcherStack->getMatcherCount();
  +            if (fGrammarType == Grammar::SchemaGrammarType) {
   
  -            for (unsigned int i = 0; i < count; i++) {
  -                fMatcherStack->getMatcherAt(i)->docCharacters(bbCData.getRawBuffer(), bbCData.getLen());
  +                // call all active identity constraints
  +                unsigned int count = fMatcherStack->getMatcherCount();
  +
  +                for (unsigned int i = 0; i < count; i++) {
  +                    fMatcherStack->getMatcherAt(i)->docCharacters(bbCData.getRawBuffer(), bbCData.getLen());
  +                }
               }
   
               // If we have a doc handler, call it
  
  
  

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