I'm trying to understand the question. You want to produce a Saxon tree as the output of the transformation? The simplest way of doing that is to do:
DocumentInfo doc = new TinyDocumentImpl();
Result result = new DOMResult(doc);
transform(source, result);
But what exactly do you want to do with the tree next? If you want to use it as input to another transformation, it's probably best to connect the two transformations using a SAX pipeline.
It would help if you could give an overall description of the processing flow.
Michael Kay
 -----Original Message-----
From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Andy Malakov
Sent: 29 April 2003 22:51
To: saxon-help@lists.sourceforge.net
Subject: [saxon] How to create Saxon representation of XML tree

Hello All,
To boost XSLT performance I want to generate transformer-friendly XML tree. Is there any API or example how to generate Saxon internal tree?
(I have a module that produces XML in any format: XML text stream/DOM/JDOM. XML is than translated into HTML via XSLT. For fairly large XML streams (10Mb) XSTL becomes a huge performance bottleneck. I would like to change output format to Saxon-specific memory structures if it will help to boost performance).
Thank you in advance,
Andy Malakov