XsltExecutable exp;
try {
exp = comp.compile(new StreamSource(styleSheetFile));
XdmNode source = proc.newDocumentBuilder().build(
new StreamSource(xmlFile));
Serializer out = proc.newSerializer(outputStream);
out.setOutputProperty(Serializer.Property.METHOD, "xml");
out.setOutputProperty(Serializer.Property.INDENT, "yes");
XsltTransformer trans = exp.load();
trans.setInitialContextNode(source);
trans.setDestination(out);