.toExternalForm());
Transformer transformer = transformerFactory
.newTransformer(source);
if (!getLog().isDebugEnabled()) {
Controller controller = (Controller) transformer;
try {
controller.makeMessageEmitter();
controller.getMessageEmitter().setWriter(new NullWriter());
} catch (TransformerException te) {
getLog()
.error("Failed to redirect xsl:message output.", te);
}
}