XSObjectList baseAttributeUses = (baseType != null) ? baseType.getAttributeUses() : null;
for (int i = 0; i < attributeUses.getLength(); ++i)
{
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);