Efficient XSLT pipeline, with params, in Java

后端 未结 2 835
孤城傲影
孤城傲影 2021-01-18 17:00

The top answer to this question describes a technique to implement an efficient XSLT pipeline in Java:

Efficient XSLT pipeline in Java (or redirecting Results to Sou

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 17:59

    related to the last note. invoking transform() on th1.getTransformer() with the result pointing again on th1 is not correct. It will be processed twice. using new Transformer() like shown in the initial post is the correct way.

    t.transform(new StreamSource(new File("in.xml")), new SAXResult(th1));
    

提交回复
热议问题