xslt-generator:many-to-one

Full name:

net.sf.xsltmp:xslt-generator-maven-plugin:1.8:many-to-one

Description:

Perform XSL transformation of multiple source files into a single destination file.

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 as follows: <xsl:param name="source-file-names" />. Then the content of the files can be loaded as follows: <xsl:variable name="source-files" select="document(tokenize($source-file-names,'\|'))" />.

From the XSL engine point of view, it is then in fact a single, 1:1 transformation: 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.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Binds by default to the lifecycle phase: generate-sources.

Required Parameters

Name Type Since Description
destFile File - The destination file.
srcDir File - The source directory. The source files are read from here.
xslTemplate String - The XSL template to use.

Optional Parameters

Name Type Since Description
filter String - Type of filter to use on input files (XSL templates and source files). Must implement Filter.
filterParameters Map - Map of parameters to be passed to the filter.

See the particular filter for its parameters.


force boolean - Force generation. When set, the timestamp of the last build is ignored and the XSLT generation is always performed.
Default value is: false.
parameters Map - A Map of parameters to be passed into the style.
sourceEncoding String - Read the source files (XSL templates and XML transformation sources) using this encoding.
srcExcludes String - Which files from the source directory tree should be excluded in the transformation.

Specifies a fileset of source files in the comma- or space-separated list of patterns of files.


srcFile File - The single source file to be enriched by the template.

If not specified, a default source file is generated and used automatically, with the following content: <root/>


srcIncludes String - Which files from the source directory tree should be included in the transformation.

Specifies a fileset of source files in the comma- or space-separated list of patterns of files.


Default value is: **/*.xml.

Parameter Details

destFile:

The destination file.
  • Type: java.io.File
  • Required: Yes

filter:

Type of filter to use on input files (XSL templates and source files). Must implement Filter.
  • Type: java.lang.String
  • Required: No

filterParameters:

Map of parameters to be passed to the filter.

See the particular filter for its parameters.

  • Type: java.util.Map
  • Required: No

force:

Force generation. When set, the timestamp of the last build is ignored and the XSLT generation is always performed.
  • Type: boolean
  • Required: No
  • Expression: ${xsltmp.force}
  • Default: false

parameters:

A Map of parameters to be passed into the style.
  • Type: java.util.Map
  • Required: No

sourceEncoding:

Read the source files (XSL templates and XML transformation sources) using this encoding.
  • Type: java.lang.String
  • Required: No
  • Expression: ${project.build.sourceEncoding}

srcDir:

The source directory. The source files are read from here.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.sourceDirectory}

srcExcludes:

Which files from the source directory tree should be excluded in the transformation.

Specifies a fileset of source files in the comma- or space-separated list of patterns of files.

  • Type: java.lang.String
  • Required: No

srcFile:

The single source file to be enriched by the template.

If not specified, a default source file is generated and used automatically, with the following content: <root/>

  • Type: java.io.File
  • Required: No

srcIncludes:

Which files from the source directory tree should be included in the transformation.

Specifies a fileset of source files in the comma- or space-separated list of patterns of files.

  • Type: java.lang.String
  • Required: No
  • Default: **/*.xml

xslTemplate:

The XSL template to use.
  • Type: java.lang.String
  • Required: Yes