{
XSAttributeUse attr = (XSAttributeUse)attributeUses.item(i);
if (!contains(baseAttributeUses, attr))
{
XSAttributeDeclaration attrDecl = attr.getAttrDeclaration();
String sName = attrDecl.getName();
PrimitiveMessagePart part = new PrimitiveMessagePart(sName);
if (!addPart(parent, part))
{
if (s_logger.isWarnEnabled())
{
s_logger.warn("Ignoring duplicate XSD attribute definition \"" + attr.getName() +
"\" in element type \"" + def.getName() + "\"");
}
continue;
}
part.setParent(parent);
if (attr.getRequired())
{
part.setMinCount(1);
}
part.setMaxCount(1);
part.setDescription(parseDescription(attrDecl.getAnnotation()));
XMLMessagePartMapping mapping = new XMLMessagePartMapping();
mapping.setNodeName(sName);
initMapping(mapping, part, XMLMessagePartMapping.ATTRIBUTE, attrDecl.getNamespace(), attrDecl.getTypeDefinition());
String[] enumerations = XSDUtil.getEnumeration(attrDecl);
for (int nEnumIndex = 0; nEnumIndex < enumerations.length; ++nEnumIndex)
{