final InputStream in;
InputStream rawIn;
if (body instanceof InputStream) {
rawIn = (InputStream) body;
} else {
rawIn = new ReaderInputStream((Reader) body);
}
in = new GreedyPreReadingInputStream(rawIn);
final TransformerFactory tf = TransformerFactory.newInstance();
// this is no good because te stylesheet is relative to the xml
// document