0

I wonder if it's possible to generate multiple output files at the same time (during the same transformation run) using a JaxP-Transformer from just one input file.

I have a use-case where I get a huge model file from which multiple java interfaces and implementations are generated. The model contains entities and for each of the entities a separate interface, implementation, ... should be generated. Using Ant, this is possible but since the generation must be switched to maven I wanted to use JaxP within our own generator plugin.

shillner
  • 1,806
  • 15
  • 24
  • 1
    An XSLT 2.0 processor like Saxon 9 can create multiple result documents using `xsl:result-document`, see http://www.w3.org/TR/xslt20/#creating-result-trees. And Xalan, the processor used in the SUN/Oracle JRE, supports an extension http://xalan.apache.org/old/xalan-j/extensions_xsltc.html#redirect_ext so it should also be possible to generate multiple result files with Xalan. – Martin Honnen Jun 24 '14 at 17:17
  • Yes I saw that the xslt script already uses the Xalan redirect feature, but I was missing the output since it wasn't generated at the place I expected ;) Thanks a lot. – shillner Jun 25 '14 at 08:16

0 Answers0