knoaman 2003/01/14 13:29:56 Modified: c/src/xercesc/validators/schema TraverseSchema.cpp Log: Fix for substitution group constraint checking. Revision Changes Path 1.55 +10 -7 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.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- TraverseSchema.cpp 14 Jan 2003 19:12:20 -0000 1.54 +++ TraverseSchema.cpp 14 Jan 2003 21:29:56 -0000 1.55 @@ -5003,17 +5003,19 @@ // be modified as this element desires. // if substitution element has any as content model type, return true - ComplexTypeInfo* subsTypeInfo = subsElemDecl->getComplexTypeInfo(); - if (subsElemDecl->getModelType() == SchemaElementDecl::Any) { - return true; - } - bool subsRestricted = false; + if (subsElemDecl->getModelType() == SchemaElementDecl::Any) { + if ((subsElemDecl->getFinalSet() & SchemaSymbols::XSD_RESTRICTION) == 0 + || (typeInfo == 0 && validator == 0)) + return true; + else + subsRestricted = true; + } // Check for type relationship; // that is, make sure that the type we're deriving has some relatoinship // to substitutionGroupElt's type. - if (typeInfo) { // do complexType case ...need testing + else if (typeInfo) { // do complexType case ...need testing int derivationMethod = typeInfo->getDerivedBy(); @@ -5033,6 +5035,7 @@ } else { // complex content + ComplexTypeInfo* subsTypeInfo = subsElemDecl->getComplexTypeInfo(); const ComplexTypeInfo* elemTypeInfo = typeInfo; for (; elemTypeInfo && elemTypeInfo != subsTypeInfo;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]