private void onVisitAttributes(XSObjectList attributeUsesList, XSObject parent) {
for (int i = 0; i < attributeUsesList.getLength(); ++i) {
XSAttributeUse xsAttribute = (XSAttributeUse) attributeUsesList.item(i);
// attribute declaration contains interesting properties of the
// attribute
XSAttributeDeclaration xsAttributeType = xsAttribute.getAttrDeclaration();
XsModelWalker.logger.debug("--> Attribute [{" + xsAttributeType.getNamespace() + "}:" + xsAttributeType.getName() + "]");
executeWorker(xsAttributeType, parent);
// handle
/*
* TODO check if we really need this...
*
* A {scope} of global identifies attribute declarations available for use in complex type definitions
* throughout the schema. Locally scoped declarations are available for use only within the complex type
* definition identified by the {scope} property. This property is ·absent· in the case of declarations
* within attribute group definitions: their scope will be determined when they are used in the construction
* of complex type definitions.
*/
XSComplexTypeDefinition ctypedef = xsAttributeType.getEnclosingCTDefinition();
if (null != ctypedef) {
visitComponent(ctypedef, parent);
}
visitComponent(xsAttributeType.getTypeDefinition(), parent);
}
}