Transform a set of .xml files, destination files generated dynamically

The many-to-dynamic mojo performs XSL transformation of a set of source files into destination files, which are created dynamically by the XSL template as follows:

  • For each source file, the template creates its destination file(s) dynamically using the xsl:result-document command.
  • The default output of the template is directed to a dummy file, which is deleted after processing.
<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>net.sf.xsltmp</groupId>
        <artifactId>xslt-generator-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>transform-abc</id>
            <goals>
              <goal>many-to-dynamic</goal>
            </goals>
            <configuration>
              <xslTemplate>path/to/template.xsl</xslTemplate>
              <srcDir>src/main/xml</srcDir>
              <srcIncludes>**/*-abc.xml</srcIncludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>