TransformerHandler handler = getSAXTransformer().getSaxTransformerHandler().newTransformerHandler();
handler.setResult(result);
XMLReader reader = XMLReaderFactory.createXMLReader();
XMLFilter xhtmlFilter = new XObjectFilter(reader, getSAXTransformer(), getListableBeanFactory(), Protocol.XSL);
xhtmlFilter.setParent(reader);
xhtmlFilter.setContentHandler(handler);
InputSource is = SAXSource.sourceToInputSource(sourceXslt);
xhtmlFilter.parse(is);
} else {
Transformer transformer = getSAXTransformer().getSaxTransformerHandler().newTransformer();
transformer.transform(sourceXslt, result);
}
}