neilg       2003/12/09 21:14:00

  Modified:    c/src/xercesc/internal XSObjectFactory.cpp
  Log:
  fix seg fault caused when a complex type had simple content; we were not processing 
the complex type itself, only its base
  
  Revision  Changes    Path
  1.9       +7 -3      xml-xerces/c/src/xercesc/internal/XSObjectFactory.cpp
  
  Index: XSObjectFactory.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XSObjectFactory.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSObjectFactory.cpp       1 Dec 2003 20:41:25 -0000       1.8
  +++ XSObjectFactory.cpp       10 Dec 2003 05:14:00 -0000      1.9
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.9  2003/12/10 05:14:00  neilg
  + * fix seg fault caused when a complex type had simple content; we were not 
processing the complex type itself, only its base
  + *
    * Revision 1.8  2003/12/01 20:41:25  neilg
    * fix for infinite loop between XSComplexTypeDefinitions and 
XSElementDeclarations; from David Cargill
    *
  @@ -437,9 +440,10 @@
           if (elemDecl->getSubstitutionGroupElem())
               xsSubElem = addOrFind(elemDecl->getSubstitutionGroupElem(), xsModel);
   
  -        // defer checking for complextypeinfo until later as it could
  +        // defer checking for complexTypeInfo until later as it could
           // eventually need this elemement
  -        if (elemDecl->getDatatypeValidator())
  +        // but don't check simple type unless no complexTypeInfo present
  +        if (!elemDecl->getComplexTypeInfo() && elemDecl->getDatatypeValidator())
               xsType = addOrFind(elemDecl->getDatatypeValidator(), xsModel);
   
           unsigned int count = elemDecl->getIdentityConstraintCount();
  @@ -495,7 +499,7 @@
           );
           putObjectInMap(elemDecl, xsObj, xsModel);
   
  -        if (!xsType && elemDecl->getComplexTypeInfo())
  +        if (elemDecl->getComplexTypeInfo())
           {
               xsType = addOrFind(elemDecl->getComplexTypeInfo(), xsModel);
               xsObj->setTypeDefinition(xsType);
  
  
  

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

Reply via email to