// Perform XSL transform on the xml.
StringReader reader = new StringReader(xml.toString());
TransformerFactory tf = TransformerFactory.newInstance();
// Create the transformer from the xsl
Templates xsl = tf.newTemplates(new StreamSource(xslContent));
Transformer t = xsl.newTransformer();
t.transform(new StreamSource(reader), new StreamResult(html));
} catch (Exception e) {
throw new EJBException("Error processing query results", e);