xsdVal.setMessageGenerator(messagegenerator);
List parents = new ArrayList();
parents.add(def);
parents.add(0,types);
xsdVal.validate(typeElement, parents,valinfo);
XSModel[] typesSchemas = valinfo.getSchemas();
List typesSchemaList = new ArrayList();
for(int i = 0; i < typesSchemas.length; i++)
{
typesSchemaList.add(typesSchemas[i]);