public void compileToDestination(Source source,ItemDestination sink)
throws IOException,TransformerConfigurationException,TransformerException
{
SAXEventGenerator generator = new SAXEventGenerator();
generator.setItemConstructor(InfosetFactory.getDefaultInfoset().createItemConstructor());
generator.setItemDestination(sink);
compile(source,new SAXResult(generator));
}