VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/doc/dev_ref/plugin-configfile.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
檔案大小: 10.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="Plug-in configuration file"/>
11<meta name="abstract" content="The plugin.xml controls all aspects of a plug-in, making each extension visible to the rest of the toolkit. The file uses pre-defined extension points to locate changes, and integrates those changes into the core code."/>
12<meta name="description" content="The plugin.xml controls all aspects of a plug-in, making each extension visible to the rest of the toolkit. The file uses pre-defined extension points to locate changes, and integrates those changes into the core code."/>
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-configfile"/>
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>Plug-in configuration file</title>
20</head>
21<body id="plugin-configfile">
22
23
24<h1 class="title topictitle1">Plug-in configuration file</h1>
25
26
27<div class="body refbody"><p class="shortdesc">The <span class="ph filepath">plugin.xml</span> controls all aspects
28of a plug-in, making each extension visible to the rest of the toolkit.
29The file uses pre-defined extension points to locate changes, and
30integrates those changes into the core code.</p>
31
32<div class="section"> <p class="p">The root element of the plugin.xml file is <samp class="ph codeph">&lt;plugin&gt;</samp>,
33and must specify an <samp class="ph codeph">id</samp> attribute. The <samp class="ph codeph">id</samp> attribute
34is used to identify the plug-in, as well as to identify whether
35pre-requisite plug-ins are available. The <samp class="ph codeph">id</samp> attribute
36should follow the syntax rules:</p>
37 <pre class="pre codeblock">id ::= token('.'token)*
38token ::= ( [0..9] | [a..zA..Z] | ’_’ | ’-’ )+</pre>
39 <p class="p">The <samp class="ph codeph">&lt;plugin&gt;</samp> element
40supports the following child elements: </p>
41 <ul class="ul">
42<li class="li"> <p class="p"><samp class="ph codeph">&lt;feature&gt;</samp> defines an <em class="ph i">extension</em> to
43contribute to a defined <em class="ph i">extension point</em>. The
44following attributes are supported:</p>
45 <table cellpadding="4" cellspacing="0" summary="" border="1" class="simpletable"><tr class="sthead">
46<th valign="bottom" align="left" id="d6200e64" class="stentry">Attribute</th>
47
48<th valign="bottom" align="left" id="d6200e67" class="stentry">Description</th>
49
50<th valign="bottom" align="left" id="d6200e70" class="stentry">Required</th>
51
52</tr>
53<tr class="strow">
54<td valign="top" id="d6200e76" headers="d6200e64" class="stentry"><strong><samp class="ph codeph">extension</samp></strong></td>
55
56<td valign="top" headers="d6200e67 d6200e76" class="stentry">extension point identifier</td>
57
58<td valign="top" headers="d6200e70 d6200e76" class="stentry">yes</td>
59
60</tr>
61<tr class="strow">
62<td valign="top" id="d6200e89" headers="d6200e64" class="stentry"><strong><samp class="ph codeph">value</samp></strong></td>
63
64<td valign="top" headers="d6200e67 d6200e89" class="stentry">comma separated string value of the extension</td>
65
66<td valign="top" headers="d6200e70 d6200e89" class="stentry">either <samp class="ph codeph">value</samp> or <samp class="ph codeph">file</samp></td>
67
68</tr>
69<tr class="strow">
70<td valign="top" id="d6200e107" headers="d6200e64" class="stentry"><strong><samp class="ph codeph">file</samp></strong></td>
71
72<td valign="top" headers="d6200e67 d6200e107" class="stentry">file path value of the extension, relative to
73 <span class="ph filepath">plugin.xml</span></td>
74
75<td valign="top" headers="d6200e70 d6200e107" class="stentry">either <samp class="ph codeph">value</samp> or <samp class="ph codeph">file</samp></td>
76
77</tr>
78<tr class="strow">
79<td valign="top" id="d6200e127" headers="d6200e64" class="stentry"><strong><samp class="ph codeph">type</samp></strong></td>
80
81<td valign="top" headers="d6200e67 d6200e127" class="stentry">type of the <samp class="ph codeph">value</samp> attribute</td>
82
83<td valign="top" headers="d6200e70 d6200e127" class="stentry">no</td>
84
85</tr>
86</table>
87 </li>
88
89 <li class="li">
90 <p class="p"><samp class="ph codeph">extension-point</samp> defines new a <em class="ph i">extension point</em> that can be used by other plug-ins. The following attributes are supported:</p>
91
92 <table cellpadding="4" cellspacing="0" summary="" border="1" class="simpletable"><tr class="sthead">
93 <th valign="bottom" align="left" id="d6200e157" class="stentry">Attribute</th>
94
95 <th valign="bottom" align="left" id="d6200e160" class="stentry">Description</th>
96
97 <th valign="bottom" align="left" id="d6200e163" class="stentry">Required</th>
98
99 </tr>
100<tr class="strow">
101 <td valign="top" id="d6200e169" headers="d6200e157" class="stentry"><strong><samp class="ph codeph">id</samp></strong></td>
102
103 <td valign="top" headers="d6200e160 d6200e169" class="stentry">extension point identifier</td>
104
105 <td valign="top" headers="d6200e163 d6200e169" class="stentry">yes</td>
106
107 </tr>
108<tr class="strow">
109 <td valign="top" id="d6200e182" headers="d6200e157" class="stentry"><strong><samp class="ph codeph">name</samp></strong></td>
110
111 <td valign="top" headers="d6200e160 d6200e182" class="stentry">extension point name</td>
112
113 <td valign="top" headers="d6200e163 d6200e182" class="stentry">no</td>
114
115 </tr>
116</table>
117
118 </li>
119
120<li class="li"> <p class="p"><samp class="ph codeph">&lt;require&gt;</samp> defines plug-in dependencies.
121The following attributes are supported:</p>
122 <table cellpadding="4" cellspacing="0" summary="" border="1" class="simpletable"><tr class="sthead">
123<th valign="bottom" align="left" id="d6200e206" class="stentry">Attribute</th>
124
125<th valign="bottom" align="left" id="d6200e209" class="stentry">Description</th>
126
127<th valign="bottom" align="left" id="d6200e212" class="stentry">Required</th>
128
129</tr>
130<tr class="strow">
131<td valign="top" id="d6200e218" headers="d6200e206" class="stentry"><strong><samp class="ph codeph">plugin</samp></strong></td>
132
133<td valign="top" headers="d6200e209 d6200e218" class="stentry">vertical bar separated list of plug-ins that are required </td>
134
135<td valign="top" headers="d6200e212 d6200e218" class="stentry">yes</td>
136
137</tr>
138<tr class="strow">
139<td valign="top" id="d6200e231" headers="d6200e206" class="stentry"><strong><samp class="ph codeph">importance</samp></strong></td>
140
141<td valign="top" headers="d6200e209 d6200e231" class="stentry">flag whether plug-in is required or optional</td>
142
143<td valign="top" headers="d6200e212 d6200e231" class="stentry">no</td>
144
145</tr>
146</table>
147 </li>
148
149<li class="li"> <p class="p"><samp class="ph codeph">&lt;template&gt;</samp> defines files that
150should be treated as <em class="ph i">templates</em>. The following
151attributes are supported:</p>
152 <table cellpadding="4" cellspacing="0" summary="" border="1" class="simpletable"><tr class="sthead">
153<th valign="bottom" align="left" id="d6200e259" class="stentry">Attribute</th>
154
155<th valign="bottom" align="left" id="d6200e262" class="stentry">Description</th>
156
157<th valign="bottom" align="left" id="d6200e265" class="stentry">Required</th>
158
159</tr>
160<tr class="strow">
161<td valign="top" id="d6200e271" headers="d6200e259" class="stentry"><strong><samp class="ph codeph">file</samp></strong></td>
162
163<td valign="top" headers="d6200e262 d6200e271" class="stentry">file path to the template, relative to <span class="ph filepath">plugin.xml</span></td>
164
165<td valign="top" headers="d6200e265 d6200e271" class="stentry">yes</td>
166
167</tr>
168</table>
169 </li>
170
171<li class="li"> <p class="p"><samp class="ph codeph">&lt;meta&gt;</samp> defines metadata. The
172following attributes are supported:</p>
173 <table cellpadding="4" cellspacing="0" summary="" border="1" class="simpletable"><tr class="sthead">
174<th valign="bottom" align="left" id="d6200e297" class="stentry">Attribute</th>
175
176<th valign="bottom" align="left" id="d6200e300" class="stentry">Description</th>
177
178<th valign="bottom" align="left" id="d6200e303" class="stentry">Required</th>
179
180</tr>
181<tr class="strow">
182<td valign="top" id="d6200e309" headers="d6200e297" class="stentry"><strong><samp class="ph codeph">type</samp></strong></td>
183
184<td valign="top" headers="d6200e300 d6200e309" class="stentry">metadata name </td>
185
186<td valign="top" headers="d6200e303 d6200e309" class="stentry">yes</td>
187
188</tr>
189<tr class="strow">
190<td valign="top" id="d6200e322" headers="d6200e297" class="stentry"><strong><samp class="ph codeph">value</samp></strong></td>
191
192<td valign="top" headers="d6200e300 d6200e322" class="stentry">metadata value</td>
193
194<td valign="top" headers="d6200e303 d6200e322" class="stentry">yes</td>
195
196</tr>
197</table>
198 </li>
199
200</ul>
201 <p class="p">Any extension that is not recognized by the DITA-OT
202is ignored; all elements other than <samp class="ph codeph">&lt;plugin&gt;</samp> are
203optional. Since version 1.5.3 multiple extension definitions
204within a plug-in configuration file are combined; in older versions
205only the last extension definition is used. </p>
206 </div>
207
208</div>
209
210<div class="related-links">
211<div class="familylinks">
212<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>
213</div>
214</div>
215
216</body>
217</html>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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