Create the TransformerFactory:
TransformerFactory tfactory = TransformerFactory.newInstance();
Load the transformation:
Transformer xform = tfactory.newTransformer(new StreamSource("convert.xsl"));
Transform the document:
xform.transform(new StreamSource("in.xml"),new StreamResult("out.xml"));