}
//-- process all top level groups
enumeration = schema.getModelGroups();
while (enumeration.hasMoreElements()) {
ModelGroup temp = (ModelGroup)enumeration.nextElement();
boolean found = false;
//--check if this Group is not
//-- included
Enumeration includedSchemas = schema.getCachedIncludedSchemas();
while (includedSchemas.hasMoreElements()) {
Schema tempSchema = (Schema)includedSchemas.nextElement();
found = (tempSchema.getModelGroup(temp.getName())!= null);
}
if (!temp.isRedefined() && !found)
processGroup(temp, schemaPrefix);
}
//-- process all top level simple types
enumeration = schema.getSimpleTypes();
while (enumeration.hasMoreElements()) {
SimpleType temp = (SimpleType) enumeration.nextElement();
boolean found = false;
//--check if this attributeGroup is not
//-- included
Enumeration includedSchemas = schema.getCachedIncludedSchemas();
while (includedSchemas.hasMoreElements()) {
Schema tempSchema = (Schema)includedSchemas.nextElement();
found = (tempSchema.getSimpleType(temp.getName())!= null);
}
if (!temp.isRedefined() && !found)
processSimpleType(temp, schemaPrefix);
}
_handler.endElement(ELEM_SCHEMA);