Transformer transformer = templates.newTransformer();
doc = new XPathEvaluator().setSource(new StreamSource(new File(sourceID).toURL().toString()));
System.err.println("Source document built OK");
TinyBuilder builder = new TinyBuilder();
transformer.transform(doc, builder);
System.err.println("Transformation done OK");
// Serialize the output so we can see the transformation actually worked
Transformer serializer = tfactory.newTransformer();
serializer.transform(builder.getCurrentRoot(), new StreamResult(System.out));
return builder.getCurrentRoot();
}