Description

However, OMNodeImpl.detach doesn't inform the document that the element has been removed, and the OMDocumentImpl.documentElement still points at the one being detached. When subsequently attempting to add in the newly decrypted form of the element, it fails, asserting that the document already has an element.

The work-around here is to specifically check in the case of doing a detach on the element of a document, to set the document element of a document to null. Unfortunately, but do-able without resorting to implementation details.

Activity

Fixed various issues with getOMDocumentElement and setOMDocumentElement, in particular AXIOM-361.

Make sure that the behavior of setOMDocumentElement is well defined and doesn't violate encapsulation (i.e. that it doesn't allow application code to put the OMDocument instance into an inconsistent state).