private static Source step(XsltTransmogrifier<String> t, Source input, String stylesheet, Map<String, Object> params) { String s = t.zap(input, stylesheet, params); return new StreamSource(new StringReader(s)); }
/** * Demonstrates how to include a Groovy class to be used in an XSLT script * * @throws IOException */ @Test public void testConvertString() throws IOException { Source content = new StreamSource(getClass().getResourceAsStream("/xslt/parameterExample.xml")); String s = transformer.zap(content, "/xslt/parameter.xslt", parameters); assertTrue(s.contains("ein negeR mi tgaz ellezaG tim regeN niE")); }
@Test public void testConvertString() throws IOException { Source source = new StreamSource(getClass().getResourceAsStream("/xslt/createPatient.xml")); String result = transformer.zap(source, "/xslt/createPatient.xslt"); assertNotNull(result); }