XSComplexType lastType = getLastRestrictedType(baseType);
if (lastType == null) {
return true; // no restriction in derivation chain
}
NameClass anc = NameClass.NULL;
// build name class for attributes in new complex type
Iterator itr = thisType.iterateDeclaredAttributeUses();
while (itr.hasNext()) {
anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl()));
}
// TODO: attribute wildcard
NameClass enc = getNameClass(thisType.getExplicitContent());
// check against every base type ... except the root anyType
while (lastType != lastType.getBaseType()) {
if (checkCollision(anc, enc, lastType)) {
return false;