public void set(Object target, Object value, SessionFactoryImplementor factory)
throws HibernateException {
Element owner = ( Element ) target;
Attribute attribute = owner.attribute(attributeName);
if (value==null) {
if (attribute!=null) attribute.detach();
}
else {
if (attribute==null) {
owner.addAttribute(attributeName, "null");
attribute = owner.attribute(attributeName);