No, you should be able to create a Document, wrap it in a DOMResult, and supply that as the result for the transformation. There's an example of this in the TraxExamples application.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Milan Trninic
Sent: 06 October 2004 23:17
To: saxon-help@lists.sourceforge.net
Subject: [saxon] DOMResult structure

Hi,
 
Is it true that if I want to get the transformation result in a non-saxon DOM tree, I have to supply the element, like so:
 
Document doc = //obtain document//
Element element = doc.getDocumentElement();
DOMResult result = new DOMResult(element);
 
and not the document itself, like so:
 
DOMResult result = new DOMResult(doc);
 
I want to avoid the extra root element in the result because the transformation itself creates the result exactly as it should be.
 
Thanks
 
Milan