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;
}
}
}
}
}
it = elements.iterator();
while( it.hasNext() ) {
Object o = it.next();
if (o instanceof ElementTypeHandler) {
ElementTypeHandler sst = (ElementTypeHandler) o;
if (localName.equalsIgnoreCase(sst.getName())) {
return (Element) sst.compress(this);
}
} else {
Element sst = (Element) o;
if (localName.equalsIgnoreCase(sst.getName())) {
return sst;
}
}
}
return null;