public static void transform(byte[] xmlDoc, String outputURL, String xslDocUri)
throws java.io.IOException,
java.net.MalformedURLException,
org.xml.sax.SAXException {
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = null;
try {
transformer = tFactory.newTransformer(new StreamSource(xslDocUri));
// transformer = tFactory.newTransformer(new StreamSource(new ByteArrayInputStream(xslDoc.getBytes())));
transformer.transform(
new StreamSource(new ByteArrayInputStream(xmlDoc)),
new StreamResult(outputURL));
}