class XSLTStreamingOutput implements StreamingOutput {

    @Override
    public void write(OutputStream output) throws IOException {
        try {
            Transformer transformer = templates.newTransformer();
            transformer.transform(source, new StreamResult(output));
        } catch (TransformerException tre) {
            throw new IOException(tre.getMessage(), tre);
        }
    }

    public  XSLTStreamingOutput(Source source, Templates templates);

}