knoaman     2003/03/11 05:02:31

  Modified:    c/src/xercesc/validators/schema TraverseSchema.cpp
  Log:
  Fix for circular substitution group check.
  
  Revision  Changes    Path
  1.66      +6 -2      xml-xerces/c/src/xercesc/validators/schema/TraverseSchema.cpp
  
  Index: TraverseSchema.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/TraverseSchema.cpp,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- TraverseSchema.cpp        11 Mar 2003 00:36:58 -0000      1.65
  +++ TraverseSchema.cpp        11 Mar 2003 13:02:31 -0000      1.66
  @@ -2386,7 +2386,7 @@
                   , noErrorFound
               );
   
  -            if (subsElemDecl && (subsElemDecl != elemDecl)) {
  +            if (subsElemDecl) {
   
                   if (isSubstitutionGroupCircular(elemDecl, subsElemDecl)) {
                       reportSchemaError
  @@ -7819,6 +7819,10 @@
   bool TraverseSchema::isSubstitutionGroupCircular(SchemaElementDecl* const elemDecl,
                                                    SchemaElementDecl* const 
subsElemDecl)
   {
  +
  +    if (elemDecl == subsElemDecl)
  +        return true;
  +
       SchemaElementDecl* tmpElemDecl = subsElemDecl->getSubstitutionGroupElem();
   
       while (tmpElemDecl)
  
  
  

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

Reply via email to