code: public static void simpleTransform(final String sourcePath, final String xsltPath, final String resultDir,
          final Map<String, String> parameters) throws TransformerException {
          final TransformerFactory tFactory = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", null);
          final Transformer transformer = tFactory.newTransformer(new StreamSource(new File(xsltPath)));
          applyParameters(transformer, parameters);
          transformer.transform(new StreamSource(new File(sourcePath)), new StreamResult(new File(resultDir)));
      }
docs: Simple transformation method.
  
  @param sourcePath
  - Absolute path to source xml file.
  @param xsltPath
  - Absolute path to xslt file.
  @param resultDir
  - Directory where you want to put resulting files.
  @param parameters
  - Map defining global XSLT parameters based via tranformer to the XSLT file.
  @throws TransformerException