xslt:transform

Transforms XML source files using an XSL style sheet.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: process-sources

Required Parameters

Name Type Description
destDir File The destination directory to write the XML files.
srcDir File The directory containing the XML files.
xslFile File The XSL stylesheet to use.

Optional Parameters

Name Type Description
fileNameRegex String A regular expression that will match part of the XML file name for replacement.
fileNameReplacement String The replacement for the matched regular expression of the XML file name.
parameters Map A Map of parameters to be passed into the style.
srcIncludes String For Source Directory. Specifies a fileset source file to format. This is a comma- or space-separated list of patterns of files. Default value is **/*.xml.

Parameter Details

destDir

The destination directory to write the XML files.

  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.outputDirectory}

fileNameRegex A regular expression that will match part of the XML file name for replacement.
  • Type: java.lang.String
  • Required: No

fileNameReplacement The replacement for the matched regular expression of the XML file name.
  • Type: java.lang.String
  • Required: No

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

srcDir The directory containing the XML files.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.sourceDirectory}

srcIncludes For Source Directory. Specifies a fileset source file to format. This is a comma- or space-separated list of patterns of files.
  • Type: java.lang.String
  • Required: No
  • Default: **/*.xml

xslFile The XSL stylesheet to use.
  • Type: java.io.File
  • Required: Yes