case SchemaBase.EXTENSION_TYPE:
{
if (childcomp instanceof SimpleExtensionElement) {
// replace empty simple type extension with base type
SimpleExtensionElement extend = (SimpleExtensionElement)childcomp;
if (extend.getAttributeList().size() == 0 && extend.getAnyAttribute() == null) {
modified = substituteTypeDerivation(lead, topcomp, childcomp, extend);
}
} else {
// replace empty complex type extension with base type
ComplexExtensionElement extend = (ComplexExtensionElement)child;
if (extend.getContentDefinition() == null && extend.getAttributeList().size() == 0 &&
extend.getAnyAttribute() == null) {
modified = substituteTypeDerivation(lead, topcomp, childcomp, extend);
}
}
break;