processor.setOutputMethodHandler(outputMethodHandler);
Destination dest;
OutputStream ostream = sr.getOutputStream();
if (ostream != null) {
dest = new OutputStreamDestination(ostream);
} else {
// FIXME: we need to handle a characterWriter
throw new TransformerException("cannot use Writer result");
}