//XSDTypeDefinition type = schema.resolveTypeDefinition(typeName.getNamespaceURI(),
// typeName.getLocalPart());
XSDTypeDefinition type = resolveTypeInSchema(schema, typeName);
element.setTypeDefinition(type);
XSDParticle particle = factory.createXSDParticle();
particle.setMinOccurs(attribute.getMinOccurs());
particle.setMaxOccurs(attribute.getMaxOccurs());
particle.setContent(element);
group.getContents().add(particle);
}
}
XSDParticle particle = factory.createXSDParticle();
particle.setContent(group);
xsdComplexType.setContent(particle);
schema.getContents().add(xsdComplexType);
return xsdComplexType;