/**
* Adds the specified {@code Attribute}.
*/
public void add(final Attribute attr) {
AttributeName key = new AttributeName(attr.getNamespace(), attr.getName());
if (namesToAttrs.containsKey(key)) {
alertSink.add(new MultiValueAttributeError(forNode, attr));
} else {
namesToAttrs.put(key, attr);
}