private bool IsValidGroupRedefine(XmlSchemaObject existingObject, XmlSchemaObject item) {
XmlSchemaGroup group = item as XmlSchemaGroup;
if (existingObject == group.Redefined) { //group is the redefinition of existingObject
XmlSchemaGroup existingGroup = existingObject as XmlSchemaGroup;
if (existingGroup.CanonicalParticle == null) { //If the existing one is not already compiled, then replace.
return true;
}
}
return false;
}