1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE html
|
---|
3 | PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
---|
4 | <html xml:lang="en-us" lang="en-us">
|
---|
5 | <head>
|
---|
6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
---|
7 | <meta name="copyright" content="(C) Copyright 2005"/>
|
---|
8 | <meta name="DC.rights.owner" content="(C) Copyright 2005"/>
|
---|
9 | <meta name="DC.Type" content="reference"/>
|
---|
10 | <meta name="DC.Title" content="Passing parameters to existing XSLT steps"/>
|
---|
11 | <meta name="abstract" content="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."/>
|
---|
12 | <meta name="description" content="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."/>
|
---|
13 | <meta name="DC.Relation" scheme="URI" content="../dev_ref/plugins-overview.html"/>
|
---|
14 | <meta name="DC.Format" content="XHTML"/>
|
---|
15 | <meta name="DC.Identifier" content="plugin-xsltparams"/>
|
---|
16 | <meta name="DC.Language" content="en-us"/>
|
---|
17 | <link rel="stylesheet" type="text/css" href="../commonltr.css"/>
|
---|
18 | <link rel="stylesheet" type="text/css" href="../dita-ot-doc.css"/>
|
---|
19 | <title>Passing parameters to existing XSLT steps</title>
|
---|
20 | </head>
|
---|
21 | <body id="plugin-xsltparams">
|
---|
22 |
|
---|
23 |
|
---|
24 | <h1 class="title topictitle1">Passing parameters to existing XSLT steps</h1>
|
---|
25 |
|
---|
26 |
|
---|
27 | <div class="body refbody"><p class="shortdesc">Plug-ins can define new parameters to be passed from the
|
---|
28 | Ant build into existing XSLT pipeline stages, usually to have those
|
---|
29 | parameters available as global <samp class="ph codeph"><xsl:param></samp> values
|
---|
30 | within XSLT overrides.</p>
|
---|
31 |
|
---|
32 | <div class="section"><div class="p">To create new parameters, create a file <span class="ph filepath">insertParameters.xml</span> which
|
---|
33 | contains one or more Ant <samp class="ph codeph"><param></samp> elements. It
|
---|
34 | also needs a <dummy> wrapper element around the parameters. For
|
---|
35 | example, the following parameter will be passed in to the XSLT file
|
---|
36 | with a value of <samp class="ph codeph">${antProperty}</samp>, but only if that
|
---|
37 | parameter is defined:<pre class="pre codeblock"><dummy>
|
---|
38 | <!-- Any Ant code allowed in xslt task is possible. Common example: -->
|
---|
39 | <param name="paramNameinXSLT" expression="${antProperty}" if="antProperty"/>
|
---|
40 | </dummy></pre>
|
---|
41 | </div>
|
---|
42 | <p class="p">Pass the value using the following extensions: </p>
|
---|
43 | <dl class="dl">
|
---|
44 |
|
---|
45 | <dt class="dt dlterm"><samp class="ph codeph">dita.conductor.html.param</samp></dt>
|
---|
46 |
|
---|
47 | <dd class="dd">Pass parameters to HTML and HTML Help XSLT</dd>
|
---|
48 |
|
---|
49 |
|
---|
50 | <dt class="dt dlterm"><samp class="ph codeph">dita.conductor.xhtml.param</samp></dt>
|
---|
51 |
|
---|
52 | <dd class="dd">Pass parameters to XHTML and Eclipse Help XSLT</dd>
|
---|
53 |
|
---|
54 |
|
---|
55 |
|
---|
56 | <dt class="dt dlterm"><samp class="ph codeph">dita.conductor.xhtml.toc.param</samp></dt>
|
---|
57 |
|
---|
58 | <dd class="dd">Pass parameters to XHTML TOC XSLT</dd>
|
---|
59 |
|
---|
60 |
|
---|
61 |
|
---|
62 | <dt class="dt dlterm"><samp class="ph codeph">dita.conductor.eclipse.toc.param</samp></dt>
|
---|
63 |
|
---|
64 | <dd class="dd">Pass parameters to Eclipse Help TOC XSLT</dd>
|
---|
65 |
|
---|
66 |
|
---|
67 |
|
---|
68 | <dt class="dt dlterm"><samp class="ph codeph">dita.preprocess.conref.param</samp></dt>
|
---|
69 |
|
---|
70 | <dd class="dd">Pass parameters to conref XSLT</dd>
|
---|
71 |
|
---|
72 |
|
---|
73 | <dt class="dt dlterm"><samp class="ph codeph">dita.preprocess.mapref.param</samp></dt>
|
---|
74 |
|
---|
75 | <dd class="dd">Pass parameters to mapref XSLT</dd>
|
---|
76 |
|
---|
77 |
|
---|
78 | <dt class="dt dlterm"><samp class="ph codeph">dita.preprocess.mappull.param</samp></dt>
|
---|
79 |
|
---|
80 | <dd class="dd">Pass parameters to mappull XSLT</dd>
|
---|
81 |
|
---|
82 |
|
---|
83 | <dt class="dt dlterm"><samp class="ph codeph">dita.preprocess.maplink.param</samp></dt>
|
---|
84 |
|
---|
85 | <dd class="dd">Pass parameters to maplink XSLT</dd>
|
---|
86 |
|
---|
87 |
|
---|
88 | <dt class="dt dlterm"><samp class="ph codeph">dita.preprocess.topicpull.param</samp></dt>
|
---|
89 |
|
---|
90 | <dd class="dd">Pass parameters to topicpull XSLT</dd>
|
---|
91 |
|
---|
92 |
|
---|
93 |
|
---|
94 | <dt class="dt dlterm"><samp class="ph codeph">dita.conductor.pdf2.param</samp></dt>
|
---|
95 |
|
---|
96 | <dd class="dd">Pass parameters to PDF2 XSLT</dd>
|
---|
97 |
|
---|
98 | </dl>
|
---|
99 | </div>
|
---|
100 |
|
---|
101 | <div class="example"><h2 class="title sectiontitle">Example</h2><p class="p">The following plug-in will pass
|
---|
102 | the parameters defined inside of <span class="ph filepath">insertParameter.xml</span> as
|
---|
103 | input to the XHTML process. Generally, an additional XSLT override
|
---|
104 | will make use of the parameter to do something new with the generated
|
---|
105 | content.</p>
|
---|
106 | <pre class="pre codeblock"><plugin id="com.example.newparam">
|
---|
107 | <feature extension="dita.conductor.xhtml.param" file="insertParameters.xml"/>
|
---|
108 | </plugin></pre>
|
---|
109 | </div>
|
---|
110 |
|
---|
111 | </div>
|
---|
112 |
|
---|
113 | <div class="related-links">
|
---|
114 | <div class="familylinks">
|
---|
115 | <div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../dev_ref/plugins-overview.html" title="The DITA Open Toolkit comes with a built in mechanism for adding in extensions through plug-ins. These plug-ins may do a wide variety of things, such as adding support for specialized DITA DTDs or Schemas, integrating processing overrides, or even providing entirely new output transforms. Plug-ins are the best way to extend the toolkit in a way that is consistent, easily sharable, and easy to preserve through toolkit upgrades.">Creating DITA-OT plug-ins</a></div>
|
---|
116 | </div>
|
---|
117 | </div>
|
---|
118 |
|
---|
119 | </body>
|
---|
120 | </html>
|
---|