public void add(Attribute attribute) {
if (attribute.getParent() != null) {
String message = "The Attribute already has an existing parent \""
+ attribute.getParent().getQualifiedName() + "\"";
throw new IllegalAddException(this, attribute, message);
}
if (attribute.getValue() == null) {
// try remove a previous attribute with the same
// name since adding an attribute with a null value