Source s_stylesheet = new StreamSource(SPARQLBooleanHTMLWriter.class.getResourceAsStream("style.xsl"));
Templates stylesheet = TransformerFactory.newInstance().newTemplates(s_stylesheet);
Transformer transformer = stylesheet.newTransformer();
transformer.setParameter("serverurl", server_uri);
JDOMResult result = new JDOMResult();
transformer.transform(input, result);
Document output = result.getDocument();
XMLOutputter printer = new XMLOutputter(Format.getPrettyFormat());
printer.output(output, writer);
writer.flush();
}