Since the real root of our tree may be a DocumentFragment, we need to use getParent to find the root, instead of getOwnerDocument. Otherwise DOM2DTM#getHandleOfNode will be very unhappy. Result of report via private mail by Carsten Ziegeler of breakage in Cocoon.