boolean finished = false;
Iterator iterator = elementNames.iterator();
while (!finished && iterator.hasNext()) {
String element = (String) iterator.next();
Format format = findFormat(element);
if (format != null) {
// We have found a format so obtain its attributes and
// update the intersection list accordingly.
List attributeList = Arrays.asList(format.getUserAttributes());
intersection = updateIntersection(intersection, attributeList);
} else {
// No format found so determine whether this is a grid row
// or grid column element. If it is then update the intersection
// accordingly. If it isn't then the intersection must be