use of org.sirix.saxon.evaluator.XSLTEvaluator in project sirix by sirixdb.
the class TestNodeWrapperS9ApiXSLT method testWithSerializer.
@Test
public void testWithSerializer() throws Exception {
final Serializer serializer = new Serializer();
serializer.setOutputProperty(Serializer.Property.METHOD, "xml");
serializer.setOutputProperty(Serializer.Property.INDENT, "yes");
final OutputStream out = new XSLTEvaluator(mHolder.getSession(), STYLESHEET, new ByteArrayOutputStream(), serializer).call();
final StringBuilder sBuilder = readFile();
final Diff diff = new Diff(sBuilder.toString(), out.toString());
diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier());
assertTrue(diff.toString(), diff.similar());
}
use of org.sirix.saxon.evaluator.XSLTEvaluator in project sirix by sirixdb.
the class TestNodeWrapperS9ApiXSLT method testWithoutSerializer.
@Test
public void testWithoutSerializer() throws Exception {
final OutputStream out = new XSLTEvaluator(mHolder.getSession(), STYLESHEET, new ByteArrayOutputStream()).call();
final StringBuilder sBuilder = readFile();
final Diff diff = new Diff(sBuilder.toString(), out.toString());
diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier());
assertTrue(diff.toString(), diff.similar());
}
Aggregations