// test that the competing elements also has the same default values.
itr = elements.iterator();
while(itr.hasNext()) {
final ElementExp eexp = (ElementExp)itr.next();
NameClass nc = eexp.getNameClass();
if(!(nc instanceof SimpleNameClass)) {
// if the element has a complex name class,
// it cannot have a default attribute value.
// (this is checked within the first pass.
// so in this case, we just need to make sure that
// any competing elements do not have defaulted attributes.
Iterator jtr = name2value.entrySet().iterator();
while(jtr.hasNext()) {
Map.Entry e = (Map.Entry)jtr.next();
if(nc.accepts((StringPair)e.getKey())) {
// this element competes with this eexp.
DefAttMap defAtts = (DefAttMap)e.getValue();
if(defAtts.defaultAttributes.size()>0) {
// TODO: what should the error message be?
reportCompError(