}
//-- process all top level attribute declarations
enumeration = schema.getAttributes();
while (enumeration.hasMoreElements()) {
AttributeDecl temp = (AttributeDecl) 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.getAttribute(temp.getName())!= null);
}
if (!found)
processAttribute(temp,schemaPrefix);
}
//-- process all top level element declarations
enumeration = schema.getElementDecls();
while (enumeration.hasMoreElements()) {
ElementDecl temp = (ElementDecl) 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.getElementDecl(temp.getName())!= null);
}
if (!found)
processElement(temp,schemaPrefix);
}
//-- process all top level complex types
enumeration = schema.getComplexTypes();
while (enumeration.hasMoreElements()) {
ComplexType temp = (ComplexType) 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.getComplexType(temp.getName())!= null);
}
if (!temp.isRedefined() && !found)
processComplexType(temp, schemaPrefix);
}
//-- 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);