Subject: Re: Saxon Serializing and COntentHandler
From: Neville Thomas <nthomas@xxxxxxxxx>
Date: Fri, 17 Dec 2004 23:38:08 -0500
|
Michael Kay wrote:
It's possible to do this entirely with JAXP interfaces, you don't need to
resort to Xalan-specific or Saxon-specific methods. This relies on the fact
that a serializer is simply an identity transformer from a SAX source to a
Stream result:
TransformerHandler serializer = TransformerFactory.getTransformerHandler();
serializer.getTransformer().setOutputProperties(properties);
serializer.setResult(new StreamResult(System.out)):
xmlFilter2.setContentHandler(serializer);
Thank you Michael that did it. Also it turns out switching to saxon
solved my earlier problem with attributes and chaining.
|