return lookupElement(localName, schema, new TreeSet());
} else {
if (imports != null) {
it = imports.iterator();
while( it.hasNext() ) {
Schema s = (Schema) it.next();
String ns = s.getTargetNamespace().toString();
String prefixLookup = prefixCache != null ? (String) prefixCache.get(ns) : null;
if (prefix1 == null || prefixLookup == null || prefix1.equals(prefixLookup)) {
Element ct = lookupElement(localName, s, new TreeSet());
if (ct != null) {
return ct;
}
}
}
}
if (includes != null) {
it = includes.iterator();
while( it.hasNext() ) {
Schema s = (Schema) it.next();
String ns = s.getTargetNamespace().toString();
String prefixLookup = prefixCache != null ? (String) prefixCache.get(ns) : null;
if (prefix1 == null || prefixLookup == null || prefix1.equals(prefixLookup)) {
Element ct = lookupElement(localName, s, new TreeSet());
if (ct != null) {
return ct;