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);
} else if (restrictedSimpleType.isUnion()) {
simpleType = factory.newXSUnionType(this, restrictedType, pRestriction);
}