On 9/19/06, Dave Pawson <dave.pawson@...> wrote:
> On 19/09/06, Michael Kay <mike@...> wrote:
> > I'm not sure what this has to do with Saxon!
> Simpler question then Mike.
> In your distribution, you provide in the samples directory
> an exampleContentHandler.java
> There you write out to System.out.
> Is it possible to obtain the Writer that Saxon is using
> from the ContentHandler please,
> such that output is directed to the same destination
> as would have been selected without interrupting the output stream?
I'm not too sure what you mean here - are you after setResult() on
Here the TransformerHandler is the ContentHandler, and you can supply
a stylesheet to it such that it transforms the content it receives (no
stylesheet results in the identity transform - which Saxon optimizes
out iirc). XMLFilter's can sit between the XMLReader and the
TransformerHandler to modify the content as it travels through the
filter chain. You can supply any Result you like to the
TransformerHandler - System.out or any other desination.
Maybe an explanation of the problem would help?