1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!--Arbortext, Inc., 1988-2011, v.4002-->
|
---|
3 | <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
|
---|
4 | "reference.dtd">
|
---|
5 | <?Pub Inc?>
|
---|
6 | <reference id="plugin-xsltparams" xml:lang="en-us">
|
---|
7 | <title>Passing parameters to existing XSLT steps</title>
|
---|
8 | <shortdesc>Plug-ins can define new parameters to be passed from the
|
---|
9 | Ant build into existing XSLT pipeline stages, usually to have those
|
---|
10 | parameters available as global <codeph><xsl:param></codeph> values
|
---|
11 | within XSLT overrides.</shortdesc>
|
---|
12 | <refbody>
|
---|
13 | <section><p>To create new parameters, create a file <filepath>insertParameters.xml</filepath> which
|
---|
14 | contains one or more Ant <codeph><param></codeph> elements. It
|
---|
15 | also needs a <dummy> wrapper element around the parameters. For
|
---|
16 | example, the following parameter will be passed in to the XSLT file
|
---|
17 | with a value of <codeph>${antProperty}</codeph>, but only if that
|
---|
18 | parameter is defined:<codeblock><dummy>
|
---|
19 | <!-- Any Ant code allowed in xslt task is possible. Common example: -->
|
---|
20 | <param name="paramNameinXSLT" expression="${antProperty}" if="antProperty"/>
|
---|
21 | </dummy></codeblock></p><p>Pass the value using the following extensions: </p><dl>
|
---|
22 | <dlentry>
|
---|
23 | <dt><codeph>dita.conductor.html.param</codeph></dt>
|
---|
24 | <dd>Pass parameters to HTML and HTML Help XSLT</dd>
|
---|
25 | </dlentry><dlentry>
|
---|
26 | <dt><codeph>dita.conductor.xhtml.param</codeph></dt>
|
---|
27 | <dd>Pass parameters to XHTML and Eclipse Help XSLT</dd>
|
---|
28 | </dlentry>
|
---|
29 | <dlentry>
|
---|
30 | <dt><codeph>dita.conductor.xhtml.toc.param</codeph></dt>
|
---|
31 | <dd>Pass parameters to XHTML TOC XSLT</dd>
|
---|
32 | </dlentry>
|
---|
33 | <dlentry>
|
---|
34 | <dt><codeph>dita.conductor.eclipse.toc.param</codeph></dt>
|
---|
35 | <dd>Pass parameters to Eclipse Help TOC XSLT</dd>
|
---|
36 | </dlentry>
|
---|
37 | <dlentry>
|
---|
38 | <dt><codeph>dita.preprocess.conref.param</codeph></dt>
|
---|
39 | <dd>Pass parameters to conref XSLT</dd>
|
---|
40 | </dlentry><dlentry>
|
---|
41 | <dt><codeph>dita.preprocess.mapref.param</codeph></dt>
|
---|
42 | <dd>Pass parameters to mapref XSLT</dd>
|
---|
43 | </dlentry><dlentry>
|
---|
44 | <dt><codeph>dita.preprocess.mappull.param</codeph></dt>
|
---|
45 | <dd>Pass parameters to mappull XSLT</dd>
|
---|
46 | </dlentry><dlentry>
|
---|
47 | <dt><codeph>dita.preprocess.maplink.param</codeph></dt>
|
---|
48 | <dd>Pass parameters to maplink XSLT</dd>
|
---|
49 | </dlentry><dlentry>
|
---|
50 | <dt><codeph>dita.preprocess.topicpull.param</codeph></dt>
|
---|
51 | <dd>Pass parameters to topicpull XSLT</dd>
|
---|
52 | </dlentry>
|
---|
53 | <dlentry>
|
---|
54 | <dt><codeph>dita.conductor.pdf2.param</codeph></dt>
|
---|
55 | <dd>Pass parameters to PDF2 XSLT</dd>
|
---|
56 | </dlentry></dl></section>
|
---|
57 | <example><title>Example</title><p>The following plug-in will pass
|
---|
58 | the parameters defined inside of <filepath>insertParameter.xml</filepath> as
|
---|
59 | input to the XHTML process. Generally, an additional XSLT override
|
---|
60 | will make use of the parameter to do something new with the generated
|
---|
61 | content.</p><codeblock><plugin id="com.example.newparam">
|
---|
62 | <feature extension="dita.conductor.xhtml.param" file="insertParameters.xml"/>
|
---|
63 | </plugin></codeblock><?Pub Caret -2?> </example>
|
---|
64 | </refbody>
|
---|
65 | </reference>
|
---|
66 | <?Pub *0000002568?>
|
---|