Map<String, Object> params = new HashMap<String, Object>();
params.put("myParam", "abc");
String result = TransformationUtils
.transform("<x>test</x>", params, this.getClass().getClassLoader().getResource("test.xslt"));
Diff diff = new Diff("<?xml version=\"1.0\" encoding=\"UTF-8\"?><p>abc</p>", result);
assertTrue("XSL transformation didn't work as expected " + diff, diff.identical());
assertTrue(result.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"));
}
public void testStringTransformationWithProperties() throws Exception {
Properties props = new Properties();