Just took a lok at our DOMBuilder. It's set up to append to a Document (it makes the unwarranted assumption that one _can_ append an Element to a Document, which existing versions of the DOM don't guarantee) or to a DocumentFragment, but not to an Element.
I'm not sure whether this is related to the problem that was being reported, but it suggests that one solution might be to build your DOMResult around a DocumentFragment node rather than an Element node, then append the DocumentFragment to your Element after transformation ends (which the DOM API will understand as a request to move the DocumentFragment's contents to the Element).
Worth trying. If it helps, that'll confirm that we want to think about improving DOMBuilder.
______________________________________
Joe Kesselman / IBM Research
