@Override public void setElementAttribute(E element, String name, String value) { String currentValue = getAttribute(element, name); if ((value == null && currentValue == null) || (value != null && value.equals(currentValue))) { // Redundant. Do nothing, no operation. return; } try { begin(); consume(setAttribute(name, value, at(Locator.before(doc, element)))); } finally { end(); } }