if (localSimpleType != null) {
restrictedType = factory.newXSType(this, localSimpleType);
} else {
restrictedType = myComplexType.getSimpleContent().getType();
}
restrictedType.validate();
XSSimpleType restrictedSimpleType = restrictedType.getSimpleType();
if (restrictedSimpleType.isAtomic()) {
simpleType = factory.newXSAtomicType(this, restrictedType, pRestriction);
} else if (restrictedSimpleType.isList()) {
simpleType = factory.newXSListType(this, restrictedType, pRestriction);