throws SAXException {
try {
TransformerHandler th
= transformerFactory.newTransformerHandler(templates);
// XML header is output despite xsl:output settings
th.setResult(new SAXResult(new BodyFilter(handler)));
((SAXEventBuffer)object).emit (th);
} catch (TransformerConfigurationException e) {
logger.error ("Cannot create transformer: " + e.getMessage(), e);
throw (IllegalStateException)
new IllegalStateException(e.getMessage()).initCause(e);