Collection<ValidationMessage> errors = new ArrayList<ValidationMessage>();
Object beanclass = tag.getAttribute("beanclass");
Object binding = tag.getAttribute("binding");
if (!(beanclass != null ^ binding != null)) {
errors.add(new ValidationMessage(tag.getId(), "Exactly one of 'beanclass' or 'binding' must be supplied."));
}
String var = tag.getAttributeString("var");
String id = tag.getAttributeString("id");
if (!(var != null ^ id != null)) {
errors.add(new ValidationMessage(tag.getId(), "Exactly one of 'var' or 'id' must be supplied."));
}
return errors.toArray(new ValidationMessage[errors.size()]);
}