Passing parameters to existing XSLT steps

Plug-ins can define new parameters to be passed from the Ant build into existing XSLT pipeline stages, usually to have those parameters available as global <xsl:param> values within XSLT overrides.

To create new parameters, create a file named insertParameters.xml, which contains one or more Ant <param> elements. It also needs a <dummy> wrapper element around the parameters. For example, the following parameter will be passed in to the XSLT file with a value of ${antProperty}, but only if that parameter is defined:
  <!-- Any Ant code allowed in xslt task is possible. Common example: -->
  <param name="paramNameinXSLT" expression="${antProperty}" if="antProperty"/>

Pass the value using the following extensions:

Pass parameters to HTML and HTML Help XSLT
Pass parameters to XHTML and Eclipse Help XSLT
Pass parameters to XHTML TOC XSLT
Pass parameters to Eclipse Help TOC XSLT
Pass parameters to conref XSLT
Pass parameters to mapref XSLT
Pass parameters to mappull XSLT
Pass parameters to topicpull XSLT
Pass parameters to PDF2 XSLT


The following plug-in will pass the parameters defined in the insertParameters.xml file as input to the XHTML process. Generally, an additional XSLT override will make use of the parameter to do something new with the generated content.

<plugin id="com.example.newparam">
  <feature extension="dita.conductor.xhtml.param" file="insertParameters.xml"/>