<?xml version="1.0" encoding="UTF-8"?>
<!--Arbortext, Inc., 1988-2011, v.4002-->
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
 "reference.dtd">
<?Pub Inc?>
<reference id="plugin-xsltparams" xml:lang="en-us">
<title>Passing parameters to existing XSLT steps</title>
<shortdesc>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 <codeph>&lt;xsl:param></codeph> values
within XSLT overrides.</shortdesc>
<refbody>
<section><p>To create new parameters, create a file <filepath>insertParameters.xml</filepath> which
contains one or more Ant <codeph>&lt;param></codeph> elements. It
also needs a &lt;dummy> wrapper element around the parameters. For
example, the following parameter will be passed in to the XSLT file
with a value of <codeph>${antProperty}</codeph>, but only if that
parameter is defined:<codeblock>&lt;dummy>
  &lt;!-- Any Ant code allowed in xslt task is possible. Common example: -->
  &lt;param name="paramNameinXSLT" expression="${antProperty}" if="antProperty"/>
&lt;/dummy></codeblock></p><p>Pass the value using the following extensions: </p><dl>
<dlentry>
<dt><codeph>dita.conductor.html.param</codeph></dt>
<dd>Pass parameters to HTML and HTML Help XSLT</dd>
</dlentry><dlentry>
<dt><codeph>dita.conductor.xhtml.param</codeph></dt>
<dd>Pass parameters to XHTML and Eclipse Help XSLT</dd>
</dlentry><dlentry>
<dt><codeph>dita.preprocess.conref.param</codeph></dt>
<dd>Pass parameters to conref XSLT</dd>
</dlentry><dlentry>
<dt><codeph>dita.preprocess.mapref.param</codeph></dt>
<dd>Pass parameters to mapref XSLT</dd>
</dlentry><dlentry>
<dt><codeph>dita.preprocess.mappull.param</codeph></dt>
<dd>Pass parameters to mappull XSLT</dd>
</dlentry><dlentry>
<dt><codeph>dita.preprocess.maplink.param</codeph></dt>
<dd>Pass parameters to maplink XSLT</dd>
</dlentry><dlentry>
<dt><codeph>dita.preprocess.topicpull.param</codeph></dt>
<dd>Pass parameters to topicpull XSLT</dd>
</dlentry></dl></section>
<example><title>Example</title><p>The following plug-in will pass
the parameters defined inside of <filepath>insertParameter.xml</filepath> 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.</p><codeblock>&lt;plugin id="com.example.newparam">
  &lt;feature extension="dita.conductor.xhtml.param" file="insertParameters.xml"/>
&lt;/plugin></codeblock><?Pub Caret -2?>       </example>
</refbody>
</reference>
<?Pub *0000002568?>
