}
}
private void parseXSDElement(List<TagInfo> tagList, XSElementDeclaration element) {
TagInfo tagInfo = new TagInfo(element.getName(), true);
if (tagList.contains(tagInfo)) {
return;
}
tagList.add(tagInfo);
XSTypeDefinition type = element.getTypeDefinition();
if (type instanceof XSComplexTypeDefinition) {
XSParticle particle = ((XSComplexTypeDefinition) type).getParticle();
if (particle != null) {
XSTerm term = particle.getTerm();
if (term instanceof XSElementDeclaration) {
parseXSDElement(tagList, (XSElementDeclaration) term);
tagInfo.addChildTagName(((XSElementDeclaration) term).getName());
}
if (term instanceof XSModelGroup) {
parseXSModelGroup(tagInfo, tagList, (XSModelGroup) term);
}
}
XSObjectList attrs = ((XSComplexTypeDefinition) type).getAttributeUses();
for (int i = 0; i < attrs.getLength(); i++) {
XSAttributeUse attrUse = (XSAttributeUse) attrs.item(i);
XSAttributeDeclaration attr = attrUse.getAttrDeclaration();
AttributeInfo attrInfo = new AttributeInfo(attr.getName(), true, AttributeInfo.NONE, attrUse.getRequired());
tagInfo.addAttributeInfo(attrInfo);
}
}
}