if (_binding != null) {
component.setBinding(_binding);
}
while (enumeration.hasMoreElements()) {
AttributeDecl attr = enumeration.nextElement();
component.setView(attr);
//-- if we have a new SimpleType...generate ClassInfo
SimpleType sType = attr.getSimpleType();
// look for simpleType def in base type(s)
XMLType baseXMLType = complexType.getBaseType();
while (sType == null) {
// If no simple type found: Get the same attribute of the base type.
// If base type is not complex, forget it; break out of loop now.
if (baseXMLType == null || !(baseXMLType instanceof ComplexType)) {
break;
}
// There's a base complexType; get the attribute with the same name
// as this attribute (=attr) from it
final ComplexType baseComplexType = (ComplexType) baseXMLType;
AttributeDecl baseAttribute = baseComplexType.getAttributeDecl(attr.getName());
if (baseAttribute != null) {
// See if this one has a simple-type...
sType = baseAttribute.getSimpleType();
if (sType != null) {
attr.setSimpleType(sType);
break;
}
}