if(simpleType!=null) {
simpleTypeQName = XmlSchemaUtils.getSimpleTypeQName(simpleType);
}
AttributeEvent event = new AttributeEvent();
event.setAttribute(attribute);
event.setJavaQName(JavaSourceUtils.toJavaQName(simpleTypeQName));
event.setName(attribute.getName());
event.setRequired(event.getAttribute().getUse().getValue().equals("required"));
event.setSimpleType(simpleTypeQName);
return event;
}