if (elementTypeInfo instanceof XSComplexTypeDecl) {
XSComplexTypeDecl typeInfo = (XSComplexTypeDecl) elementTypeInfo;
baseType = typeInfo.getBaseType();
annotations = typeInfo.getAnnotations();
} else {
XSSimpleTypeDecl typeInfo = (XSSimpleTypeDecl) elementTypeInfo;
baseType = typeInfo.getBaseType();
annotations = ((XSSimpleTypeDecl) elementTypeInfo).getAnnotations();
}
for (int i = 0; i < annotations.getLength(); i++) {
ta = readTypeInfoAnnotation((XSAnnotation) annotations.item(i));