Transform a set of .xml files into a single destination file

The many-to-one mojo performs XSL transformation of a set of source files into a single destination file as follows.

The names of the multiple source files are passed into the template as a pipe-separated list in a parameter named 'source-file-names'. In the template, define a global template parameter and then load the content of the files as follows:

<xsl:param name="source-file-names" />
<xsl:variable name="names-sequence" select="tokenize($source-file-names,'\|')" />
<xsl:variable name="cfg-files" select="document($names-sequence)" />

From the XSL engine point of view, it is then in fact a 1:1 transformation of a single file: a single source file is transformed into a single destination file.

The content of the single source file can then be enriched in the template by the multiple source files.