* @throws Exception
*/
public static void transform(Element xml, String styleSheetPath, Result result, Map<String, Object> params) throws Exception
{
File styleSheet = new File(styleSheetPath);
Source srcXml = new JDOMSource(new Document((Element)xml.detach()));
Source srcSheet = new StreamSource(styleSheet);
// Dear old saxon likes to yell loudly about each and every XSLT 1.0
// stylesheet so switch it off but trap any exceptions because this
// code is run on transformers other than saxon