public static String xslt(String xmlInput, String xsltTrasform, Map<String, String> mapParams) throws Exception {
String strResult = "";
try {
Source sourceInput = new StreamSource(new StringReader(xmlInput));
Source styleSource = new StreamSource(new StringReader(xsltTrasform));
CompilerInfo compilerInfo = getConfiguration().getDefaultXsltCompilerInfo();
PreparedStylesheet sheet = PreparedStylesheet.compile(styleSource, getConfiguration(), compilerInfo);
Controller controller = (Controller) sheet.newTransformer();
if (mapParams != null) {
for (Entry<String, String> entry : mapParams.entrySet()) {
controller.setParameter(entry.getKey(), entry.getValue());