You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/01/02 16:20:22 UTC

cvs commit: xml-xerces/c/src/validators/schema ComplexTypeInfo.cpp SchemaElementDecl.cpp SchemaGrammar.cpp

tng         02/01/02 07:20:22

  Modified:    c/src/validators/schema ComplexTypeInfo.cpp
                        SchemaElementDecl.cpp SchemaGrammar.cpp
  Log:
  Schema Fix: should not store a temp value as the key in the element pool and the attribute pool.
  
  Revision  Changes    Path
  1.26      +4 -1      xml-xerces/c/src/validators/schema/ComplexTypeInfo.cpp
  
  Index: ComplexTypeInfo.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/validators/schema/ComplexTypeInfo.cpp,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ComplexTypeInfo.cpp	17 Dec 2001 21:38:59 -0000	1.25
  +++ ComplexTypeInfo.cpp	2 Jan 2002 15:20:22 -0000	1.26
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: ComplexTypeInfo.cpp,v $
  + * Revision 1.26  2002/01/02 15:20:22  tng
  + * Schema Fix: should not store a temp value as the key in the element pool and the attribute pool.
  + *
    * Revision 1.25  2001/12/17 21:38:59  tng
    * Fix dangling pointer.
    *
  @@ -285,7 +288,7 @@
           // And add a default attribute for this name
           retVal = new SchemaAttDef(prefix, baseName, uriId);
           retVal->setElemId(getElementId());
  -        fAttDefs->put((void*)baseName, uriId, retVal);
  +        fAttDefs->put((void*)retVal->getAttName()->getLocalPart(), uriId, retVal);
   
           wasAdded = true;
       }
  
  
  
  1.18      +4 -1      xml-xerces/c/src/validators/schema/SchemaElementDecl.cpp
  
  Index: SchemaElementDecl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/validators/schema/SchemaElementDecl.cpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SchemaElementDecl.cpp	2 Nov 2001 14:13:45 -0000	1.17
  +++ SchemaElementDecl.cpp	2 Jan 2002 15:20:22 -0000	1.18
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SchemaElementDecl.cpp,v $
  + * Revision 1.18  2002/01/02 15:20:22  tng
  + * Schema Fix: should not store a temp value as the key in the element pool and the attribute pool.
  + *
    * Revision 1.17  2001/11/02 14:13:45  knoaman
    * Add support for identity constraints.
    *
  @@ -229,7 +232,7 @@
                   // And add a default attribute for this name
                   retVal = new SchemaAttDef(prefix, baseName, uriId);
                   retVal->setElemId(getId());
  -                fAttDefs->put((void*)baseName, uriId, retVal);
  +                fAttDefs->put((void*)retVal->getAttName()->getLocalPart(), uriId, retVal);
   
                   wasAdded = true;
               }
  
  
  
  1.11      +5 -2      xml-xerces/c/src/validators/schema/SchemaGrammar.cpp
  
  Index: SchemaGrammar.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/validators/schema/SchemaGrammar.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SchemaGrammar.cpp	19 Nov 2001 18:26:31 -0000	1.10
  +++ SchemaGrammar.cpp	2 Jan 2002 15:20:22 -0000	1.11
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SchemaGrammar.cpp,v $
  + * Revision 1.11  2002/01/02 15:20:22  tng
  + * Schema Fix: should not store a temp value as the key in the element pool and the attribute pool.
  + *
    * Revision 1.10  2001/11/19 18:26:31  knoaman
    * no message
    *
  @@ -175,7 +178,7 @@
       if (!retVal)
       {
           retVal = new SchemaElementDecl(prefixName, baseName, uriId, SchemaElementDecl::Any);
  -        const unsigned int elemId = fElemDeclPool->put((void*)baseName, uriId, scope, retVal);
  +        const unsigned int elemId = fElemDeclPool->put((void*)retVal->getBaseName(), uriId, scope, retVal);
           retVal->setId(elemId);
           wasAdded = true;
       }
  @@ -193,7 +196,7 @@
           , unsigned int          scope)
   {
       SchemaElementDecl* retVal = new SchemaElementDecl(prefixName, baseName, uriId, SchemaElementDecl::Any);
  -    const unsigned int elemId = fElemDeclPool->put((void*)baseName, uriId, scope, retVal);
  +    const unsigned int elemId = fElemDeclPool->put((void*)retVal->getBaseName(), uriId, scope, retVal);
       retVal->setId(elemId);
       return retVal;
   }
  
  
  

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