VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/doc/dev_ref/plugin-xsltparams.html@ 99507

最後變更 在這個檔案從99507是 98584,由 vboxsync 提交於 2 年 前

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 5.2 KB
 
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 &lt;xsl:param&gt; 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 &lt;xsl:param&gt; 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
28Ant build into existing XSLT pipeline stages, usually to have those
29parameters available as global <samp class="ph codeph">&lt;xsl:param&gt;</samp> values
30within 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
33contains one or more Ant <samp class="ph codeph">&lt;param&gt;</samp> elements. It
34also needs a &lt;dummy&gt; wrapper element around the parameters. For
35example, the following parameter will be passed in to the XSLT file
36with a value of <samp class="ph codeph">${antProperty}</samp>, but only if that
37parameter is defined:<pre class="pre codeblock">&lt;dummy&gt;
38 &lt;!-- Any Ant code allowed in xslt task is possible. Common example: --&gt;
39 &lt;param name="paramNameinXSLT" expression="${antProperty}" if="antProperty"/&gt;
40&lt;/dummy&gt;</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
102the parameters defined inside of <span class="ph filepath">insertParameter.xml</span> as
103input to the XHTML process. Generally, an additional XSLT override
104will make use of the parameter to do something new with the generated
105content.</p>
106<pre class="pre codeblock">&lt;plugin id="com.example.newparam"&gt;
107 &lt;feature extension="dita.conductor.xhtml.param" file="insertParameters.xml"/&gt;
108&lt;/plugin&gt;</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>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette