}
public void updateSubstitutabilityMap() {
ElementDecl parent = this;
XSType type = this.getType();
boolean rused = false;
boolean eused = false;
while( (parent=(ElementDecl)parent.getSubstAffiliation())!=null ) {
if(parent.isSubstitutionDisallowed(XSType.SUBSTITUTION))
continue;
boolean rd = parent.isSubstitutionDisallowed(XSType.RESTRICTION);
boolean ed = parent.isSubstitutionDisallowed(XSType.EXTENSION);
if( (rd && rused) || ( ed && eused ) ) continue;
XSType parentType = parent.getType();
while(type!=parentType) {
if(type.getDerivationMethod()==XSType.RESTRICTION) rused = true;
else eused = true;
type = type.getBaseType();