public void transform(Source source, Result result)
throws TransformerException {
try {
Receiver receiver = ResultWrapper.getReceiver(
result, getConfiguration(), getOutputProperties(), null);
NamespaceReducer reducer = new NamespaceReducer();
reducer.setUnderlyingReceiver(receiver);
new Sender(getConfiguration()).send(source, reducer, true);
} catch (XPathException err) {
Throwable cause = err.getException();
if (cause != null && cause instanceof SAXParseException) {
// This generally means the error was already reported.