amassari    2003/12/29 08:07:55

  Modified:    c/src/xercesc/internal DGXMLScanner.cpp IGXMLScanner.cpp
                        SGXMLScanner.cpp
  Log:
  When parsing a new element, clear the maps holding the unparsed attribute we have 
seen.
  This because these maps keep pointers to the name of the attributes object that gets 
recycled
  for every element (and their name is deallocated when recycled)
  
  Revision  Changes    Path
  1.37      +4 -1      xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp
  
  Index: DGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- DGXMLScanner.cpp  17 Dec 2003 00:18:34 -0000      1.36
  +++ DGXMLScanner.cpp  29 Dec 2003 16:07:54 -0000      1.37
  @@ -1179,6 +1179,9 @@
       unsigned int    attCount = 0;
       unsigned int    curAttListSize = fAttrList->size();
       wasAdded = false;
  +    // clear the map used to detect duplicate attributes
  +    fUndeclaredAttrRegistry->removeAll();
  +
       fElemCount++;
   
       while (true)
  
  
  
  1.54      +9 -1      xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp
  
  Index: IGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- IGXMLScanner.cpp  20 Dec 2003 06:29:00 -0000      1.53
  +++ IGXMLScanner.cpp  29 Dec 2003 16:07:55 -0000      1.54
  @@ -1733,6 +1733,10 @@
       unsigned int    attCount = 0;
       unsigned int    curAttListSize = fAttrList->size();
       wasAdded = false;
  +    // clear the map used to detect duplicate attributes
  +    fUndeclaredAttrRegistry->removeAll();
  +    fUndeclaredAttrRegistryNS->removeAll();
  +
       fElemCount++;
   
       while (true)
  @@ -2196,6 +2200,10 @@
   
       // Skip any whitespace after the name
       fReaderMgr.skipPastSpaces();
  +
  +    // clear the map used to detect duplicate attributes
  +    fUndeclaredAttrRegistry->removeAll();
  +    fUndeclaredAttrRegistryNS->removeAll();
   
       //  First we have to do the rawest attribute scan. We don't do any
       //  normalization of them at all, since we don't know yet what type they
  
  
  
  1.71      +4 -1      xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp
  
  Index: SGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- SGXMLScanner.cpp  20 Dec 2003 06:29:00 -0000      1.70
  +++ SGXMLScanner.cpp  29 Dec 2003 16:07:55 -0000      1.71
  @@ -1727,6 +1727,9 @@
           fElemStack.addChild(elemDecl->getElementName(), true);
       }
   
  +    // clear the map used to detect duplicate attributes
  +    fUndeclaredAttrRegistryNS->removeAll();
  +
       //  Now lets get the fAttrList filled in. This involves faulting in any
       //  defaulted and fixed attributes and normalizing the values of any that
       //  we got explicitly.
  
  
  

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

Reply via email to