Added support for replacing the value of an attribute.