// check whether there is conflict between any two leaves
for (int i = 0; i < fNumElements; i++) {
for (int j = i+1; j < fNumElements; j++) {
if (xsConstraints.overlapUPA((XSElementDecl)fAllDecls[i], (XSElementDecl)fAllDecls[j], subGroupHandler)) {
// REVISIT: do we want to report all errors? or just one?
throw new XMLSchemaException("cos-nonambig", new Object[]{fAllDecls[i].toString(),
fAllDecls[j].toString()});
}
}
}
for (int i = fNumElements; i < fNumDecls; i++) {
for (int j = i+1; j < fNumDecls; j++) {
if (xsConstraints.overlapUPA((XSWildcardDecl)fAllDecls[i], (XSWildcardDecl)fAllDecls[j])) {
// REVISIT: do we want to report all errors? or just one?
throw new XMLSchemaException("cos-nonambig", new Object[]{fAllDecls[i].toString(),
fAllDecls[j].toString()});
}
}
}
return false;