> I am quite new to Xalan, and have been trying to figure out how to pipe 
> an XSL from one SAX transformer handler to another (while passing 
> different xml files to each one). Any help or code samples would be 
> very much appreciated.

You want:

/* relevant imports go here... */
SAXTransformerFactory stf = SAXTransformerFactory.newInstance();
TransformerFactory tf = TransformerFactory.newInstance();
/* This will be the first transformer. */
TransformerHandler t = tf.newTransformer();
/* This will create the second transformer. */
TransformerHandler th = stf.newTransformerHandler();
/* I assume that you already have your sources set up... */
t.transform(input,new SAXResult(th));
Transformer t2 = th.getTransformer();
t2.transform(input2,finalOutput);

Or something pretty close to that.

        -- Paul

Reply via email to