private void findElementType(XSComplexType xtype) {
XSContentType xsContentType = xtype.getContentType();
XSParticle particle = xsContentType.asParticle();
if(particle != null){
XSTerm term = particle.getTerm();
if(term.isModelGroup()){
XSModelGroup xsModelGroup = term.asModelGroup();
XSParticle[] particles = xsModelGroup.getChildren();
for(XSParticle p : particles ){
XSTerm pterm = p.getTerm();
if(pterm.isElementDecl()){
XSElementDecl element = pterm.asElementDecl();
String name = element.getName();
log.debug(name);
XSType type = element.getType();
while(type != null) {