plugin-configfile.html 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <!DOCTYPE html
  2. SYSTEM "about:legacy-compat">
  3. <html lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="UTF-8"><meta name="copyright" content="(C) Copyright 2020"><meta name="DC.rights.owner" content="(C) Copyright 2020"><meta name="DC.type" content="reference"><meta name="description" content="The plug-in descriptor file (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 then integrates those changes into the core DITA-OT code."><meta name="DC.subject" content="plug-ins, identfiers, plugin.xml, metadata, plug-in"><meta name="keywords" content="plug-ins, identfiers, plugin.xml, metadata, plug-in"><meta name="DC.relation" scheme="URI" content="../topics/custom-plugins.html"><meta name="DC.relation" scheme="URI" content="../topics/plugin-newextensions.html"><meta name="DC.relation" scheme="URI" content="../topics/plugin-newtranstype.html"><meta name="DC.format" content="HTML5"><meta name="DC.identifier" content="plugin-configfile"><meta name="DC.language" content="en-US"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Plug-in descriptor file</title></head><body id="plugin-configfile"><header role="banner"><div class="header">
  4. <p>DITA Open Toolkit</p>
  5. <hr>
  6. </div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.5</a></li><li><a href="../release-notes/index.html">Release Notes</a></li><li><a href="../topics/installing-client.html">Installing DITA-OT</a></li><li><a href="../topics/building-output.html">Building output</a></li><li><a href="../topics/input-formats.html">Authoring formats</a></li><li><a href="../topics/output-formats.html">Output formats</a></li><li><a href="../parameters/index.html">Parameters</a></li><li><a href="../topics/html-customization.html">Customizing HTML</a></li><li><a href="../topics/pdf-customization.html">Customizing PDF</a></li><li><a href="../topics/adding-plugins.html">Adding plug-ins</a></li><li><a href="../topics/custom-plugins.html">Creating plug-ins</a><ul><li><a href="../topics/plugin-benefits.html">Plug-in benefits</a></li><li class="active"><a href="../topics/plugin-configfile.html">Plug-in descriptor file</a></li><li><a href="../topics/plugin-coding-conventions.html">Coding conventions</a></li><li><a href="../topics/plugin-dependencies.html">Plug-in dependencies</a></li><li><a href="../topics/plugin-use-cases.html">Plug-in use cases</a></li><li><a href="../topics/html-customization-plugins.html">Custom HTML plug-ins</a></li><li><a href="../topics/pdf-customization-plugins.html">Custom PDF plug-ins</a></li><li><a href="../topics/globalization.html">Globalizing DITA content</a></li><li><a href="../topics/migration.html">Migrating customizations</a></li></ul></li><li><a href="../topics/troubleshooting-overview.html">Troubleshooting</a></li><li><a href="../reference/index.html">Reference</a></li><li><a href="../topics/dita-and-dita-ot-resources.html">Resources</a></li></ul></nav><main role="main"><article role="article" aria-labelledby="ariaid-title1">
  7. <h1 class="title topictitle1" id="ariaid-title1">Plug-in descriptor file</h1>
  8. <div class="body refbody"><p class="shortdesc">The plug-in descriptor file (<span class="ph filepath">plugin.xml</span>) controls all aspects of a plug-in, making
  9. each extension visible to the rest of the toolkit. The file uses pre-defined extension points to locate changes, and
  10. then integrates those changes into the core DITA-OT code.</p>
  11. <section class="section"><h2 class="title sectiontitle">Validating plug-ins</h2>
  12. <div class="div" id="plugin-configfile__d650e92">
  13. <p class="p">DITA-OT includes a RELAX NG schema file that can be used to validate the <span class="ph filepath">plugin.xml</span>
  14. files that define the capabilities of each plug-in.
  15. </p>
  16. <p class="p">To ensure the syntax of your custom plug-in is correct, include an <code class="keyword markupname xmlpi">&lt;?xml-model?&gt;</code> processing
  17. instruction at the beginning of the <span class="ph filepath">plugin.xml</span> file, immediately after the XML
  18. prolog:</p>
  19. <p class="p"><code class="keyword markupname xmlpi">&lt;?xml-model href="dita-ot/plugin.rnc" type="application/relax-ng-compact-syntax"?&gt;</code></p>
  20. <p class="p">If your authoring environment does not apply this schema automatically, point your editor to <span class="ph filepath" id="plugin-configfile__d650e123"><var class="keyword varname">dita-ot-dir</var>/resources/plugin.rnc</span> to associate the schema with
  21. your plug-in file.</p>
  22. </div>
  23. </section>
  24. <section class="section"><h2 class="title sectiontitle">Plug-in identifiers</h2>
  25. <p class="p">Every DITA-OT plug-in must have a unique identifier composed of one or more dot-delimited tokens, for example,
  26. <code class="ph codeph">com.example.rss</code>. This identifier is used to identify the plug-in to the toolkit for
  27. installation, processing, and when determining plug-in dependencies.</p>
  28. <div class="note note note_note"><span class="note__title">Note:</span> The default DITA-OT plug-ins use a reverse domain naming convention, as in <code class="ph codeph">org.dita.html5</code>;
  29. this is strongly recommended to avoid plug-in naming conflicts.</div>
  30. <div class="p" id="plugin-configfile__tokendef">Each token can include only the following characters:
  31. <ul class="ul">
  32. <li class="li">Lower-case letters (a-z)</li>
  33. <li class="li">Upper-case letters (A-Z)</li>
  34. <li class="li">Numerals (0-9)</li>
  35. <li class="li">Underscores (_)</li>
  36. <li class="li">Hyphens (-)</li>
  37. </ul></div>
  38. </section>
  39. <section class="section"><h2 class="title sectiontitle"><code class="keyword markupname xmlelement">&lt;plugin&gt;</code></h2>
  40. <p class="p">The root element of the <span class="ph filepath">plugin.xml</span> file is <code class="keyword markupname xmlelement">&lt;plugin&gt;</code>, which has a
  41. required <code class="keyword markupname xmlatt">@id</code> attribute set to the unique plug-in identifier.</p>
  42. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 1. </span>Sample <code class="keyword markupname xmlelement">&lt;plugin&gt;</code> element</figcaption>
  43. <pre class="pre codeblock language-xml"><code>&lt;plugin id="com.example.html5-javascript"&gt;</code></pre>
  44. </figure>
  45. </section>
  46. <section class="section"><h2 class="title sectiontitle">Plug-in elements</h2>
  47. <p class="p">The <code class="keyword markupname xmlelement">&lt;plugin&gt;</code> element can contain the following child elements: </p>
  48. <dl class="dl parml">
  49. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;extension-point&gt;</code></dt>
  50. <dd class="dd pd">
  51. <p class="p">An optional element that defines a new extension point that can be used by other DITA-OT plug-ins.</p>
  52. <p class="p">The following attributes are supported:</p>
  53. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  54. <th class="stentry" scope="col" id="plugin-configfile__stentry__1">Attribute</th>
  55. <th class="stentry" scope="col" id="plugin-configfile__stentry__2">Description</th>
  56. <th class="stentry" scope="col" id="plugin-configfile__stentry__3">Required?</th>
  57. </tr></thead><tbody><tr class="strow">
  58. <th class="stentry" scope="row" headers="plugin-configfile__stentry__1">id</th>
  59. <td class="stentry" headers="plugin-configfile__stentry__2">Extension point identifier</td>
  60. <td class="stentry" headers="plugin-configfile__stentry__3">Yes</td>
  61. </tr><tr class="strow">
  62. <th class="stentry" scope="row" headers="plugin-configfile__stentry__1">name</th>
  63. <td class="stentry" headers="plugin-configfile__stentry__2">Extension point description</td>
  64. <td class="stentry" headers="plugin-configfile__stentry__3">No</td>
  65. </tr></tbody></table>
  66. <p class="p" id="plugin-configfile__extension-point-ids">Like plug-in identifiers, extension point identifiers are composed of one or
  67. more dot-delimited tokens.</p>
  68. <div class="note note note_note" id="plugin-configfile__entension-point-ids-note"><span class="note__title">Note:</span> Extension point identifiers should begin with the identifier of the
  69. defining plug-in and append one or more tokens, for example, <code class="ph codeph">org.dita.example.pre</code>.</div>
  70. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 2. </span>Sample <code class="keyword markupname xmlelement">&lt;extension-point&gt;</code> element</figcaption>
  71. <pre class="pre codeblock language-xml"><code>&lt;extension-point id="dita.xsl.html5" name="HTML5 XSLT import"/&gt;</code></pre>
  72. </figure>
  73. </dd>
  74. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;feature&gt;</code></dt>
  75. <dd class="dd pd">
  76. <p class="p">An optional element that supplies values to a DITA-OT extension point.</p>
  77. <p class="p">The following attributes are supported:</p>
  78. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  79. <th class="stentry" scope="col" id="plugin-configfile__stentry__10">Attribute</th>
  80. <th class="stentry" scope="col" id="plugin-configfile__stentry__11">Description</th>
  81. <th class="stentry" scope="col" id="plugin-configfile__stentry__12">Required?</th>
  82. </tr></thead><tbody><tr class="strow">
  83. <th class="stentry" scope="row" headers="plugin-configfile__stentry__10">extension</th>
  84. <td class="stentry" headers="plugin-configfile__stentry__11">Identifier of the DITA-OT extension point</td>
  85. <td class="stentry" headers="plugin-configfile__stentry__12">Yes</td>
  86. </tr><tr class="strow">
  87. <th class="stentry" scope="row" headers="plugin-configfile__stentry__10">value</th>
  88. <td class="stentry" headers="plugin-configfile__stentry__11">Comma separated string value of the extension</td>
  89. <td class="stentry" headers="plugin-configfile__stentry__12">Either the <code class="keyword markupname xmlatt">@value</code> or <code class="keyword markupname xmlatt">@file</code> attribute must be
  90. specified</td>
  91. </tr><tr class="strow">
  92. <th class="stentry" scope="row" headers="plugin-configfile__stentry__10">file</th>
  93. <td class="stentry" headers="plugin-configfile__stentry__11">Name and path of a file containing data for the extension point.
  94. <p class="p">Depending on the extension point, this might be specified as an absolute path, a path relative to
  95. the <span class="ph filepath">plugin.xml</span> file, or a path relative to the DITA-OT root.</p></td>
  96. <td class="stentry" headers="plugin-configfile__stentry__12">Either the <code class="keyword markupname xmlatt">@value</code> or <code class="keyword markupname xmlatt">@file</code> attribute must be
  97. specified</td>
  98. </tr><tr class="strow">
  99. <th class="stentry" scope="row" headers="plugin-configfile__stentry__10">type</th>
  100. <td class="stentry" headers="plugin-configfile__stentry__11">Type of the <code class="keyword markupname xmlatt">@value</code> attribute</td>
  101. <td class="stentry" headers="plugin-configfile__stentry__12">No</td>
  102. </tr></tbody></table>
  103. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 3. </span>Sample <code class="keyword markupname xmlelement">&lt;feature&gt;</code> elements</figcaption>
  104. <p class="p">If more than one <code class="keyword markupname xmlelement">&lt;feature&gt;</code> element supplies values to the same extension point,
  105. the values are additive. For example, the following are equivalent:</p>
  106. <pre class="pre codeblock language-xml"><code>&lt;feature extension="org.dita.example.extension-point" value="a,b,c"/&gt;</code></pre>
  107. <pre class="pre codeblock language-xml"><code>&lt;feature extension="org.dita.example.extension-point" value="a"/&gt;
  108. &lt;feature extension="org.dita.example.extension-point" value="b"/&gt;
  109. &lt;feature extension="org.dita.example.extension-point" value="c"/&gt;</code></pre>
  110. </figure>
  111. </dd>
  112. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;meta&gt;</code></dt>
  113. <dd class="dd pd">
  114. <p class="p">An optional element that defines metadata.</p>
  115. <p class="p">The following attributes are supported:</p>
  116. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  117. <th class="stentry" scope="col" id="plugin-configfile__stentry__25">Attribute</th>
  118. <th class="stentry" scope="col" id="plugin-configfile__stentry__26">Description</th>
  119. <th class="stentry" scope="col" id="plugin-configfile__stentry__27">Required?</th>
  120. </tr></thead><tbody><tr class="strow">
  121. <th class="stentry" scope="row" headers="plugin-configfile__stentry__25">type</th>
  122. <td class="stentry" headers="plugin-configfile__stentry__26">Metadata name </td>
  123. <td class="stentry" headers="plugin-configfile__stentry__27">Yes</td>
  124. </tr><tr class="strow">
  125. <th class="stentry" scope="row" headers="plugin-configfile__stentry__25">value</th>
  126. <td class="stentry" headers="plugin-configfile__stentry__26">Metadata value</td>
  127. <td class="stentry" headers="plugin-configfile__stentry__27">Yes</td>
  128. </tr></tbody></table>
  129. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 4. </span>Sample <code class="keyword markupname xmlelement">&lt;meta&gt;</code> element</figcaption>
  130. <pre class="pre codeblock language-xml"><code>&lt;meta type="foo" value="bar"/&gt;</code></pre>
  131. </figure>
  132. </dd>
  133. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;require&gt;</code></dt>
  134. <dd class="dd pd">
  135. <p class="p">An optional element that defines plug-in dependencies.</p>
  136. <p class="p">The following attributes are supported:</p>
  137. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  138. <th class="stentry" scope="col" id="plugin-configfile__stentry__34">Attribute</th>
  139. <th class="stentry" scope="col" id="plugin-configfile__stentry__35">Description</th>
  140. <th class="stentry" scope="col" id="plugin-configfile__stentry__36">Required?</th>
  141. </tr></thead><tbody><tr class="strow">
  142. <th class="stentry" scope="row" headers="plugin-configfile__stentry__34">plugin</th>
  143. <td class="stentry" headers="plugin-configfile__stentry__35">The identifier of the required plug-in.
  144. <p class="p">To specify alternative requirements, separate plug-in identifiers with a vertical
  145. bar.</p></td>
  146. <td class="stentry" headers="plugin-configfile__stentry__36">Yes</td>
  147. </tr><tr class="strow">
  148. <th class="stentry" scope="row" headers="plugin-configfile__stentry__34">importance</th>
  149. <td class="stentry" headers="plugin-configfile__stentry__35">Identifies whether the plug-in is <code class="ph codeph">required</code> (default) or
  150. <code class="ph codeph">optional</code>. DITA-OT provides a warning if a required plug-in is not
  151. available.</td>
  152. <td class="stentry" headers="plugin-configfile__stentry__36">No</td>
  153. </tr></tbody></table>
  154. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 5. </span>Sample <code class="keyword markupname xmlelement">&lt;require&gt;</code> element</figcaption>
  155. <pre class="pre codeblock language-xml normalize-space"><code>&lt;require plugin="org.dita.html5"/&gt;</code></pre>
  156. </figure>
  157. </dd>
  158. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;template&gt;</code></dt>
  159. <dd class="dd pd">
  160. <p class="p">An optional element that defines files that should be treated as templates.</p>
  161. <p class="p">Template files can be used to integrate DITA-OT extensions. Templates typically extend the default
  162. transformation-type-specific build files via <code class="keyword markupname xmlelement">&lt;dita:extension&gt;</code> elements. When the
  163. plug-in installation process runs, template files are used to recreate build files, and the specified
  164. extension points are replaced with references to the appropriate plug-ins.</p>
  165. <p class="p">The following attributes are supported:</p>
  166. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  167. <th class="stentry" scope="col" id="plugin-configfile__stentry__43">Attribute</th>
  168. <th class="stentry" scope="col" id="plugin-configfile__stentry__44">Description</th>
  169. <th class="stentry" scope="col" id="plugin-configfile__stentry__45">Required?</th>
  170. </tr></thead><tbody><tr class="strow">
  171. <th class="stentry" scope="row" headers="plugin-configfile__stentry__43">file</th>
  172. <td class="stentry" headers="plugin-configfile__stentry__44">Name and path to the template file, relative to the <span class="ph filepath">plugin.xml</span>
  173. file</td>
  174. <td class="stentry" headers="plugin-configfile__stentry__45">Yes</td>
  175. </tr></tbody></table>
  176. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 6. </span>Sample <code class="keyword markupname xmlelement">&lt;template&gt;</code> element</figcaption>
  177. <pre class="pre codeblock language-xml"><code>&lt;template file="build_dita2html5_template.xml"/&gt;</code></pre>
  178. </figure>
  179. </dd>
  180. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;transtype&gt;</code></dt>
  181. <dd class="dd pd">
  182. <p class="p">An optional element that defines a new output format (transformation type).</p>
  183. <p class="p">The following attributes are supported:</p>
  184. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  185. <th class="stentry" scope="col" id="plugin-configfile__stentry__49">Attribute</th>
  186. <th class="stentry" scope="col" id="plugin-configfile__stentry__50">Description</th>
  187. <th class="stentry" scope="col" id="plugin-configfile__stentry__51">Required?</th>
  188. </tr></thead><tbody><tr class="strow">
  189. <th class="stentry" scope="row" headers="plugin-configfile__stentry__49">name</th>
  190. <td class="stentry" headers="plugin-configfile__stentry__50">Transformation name</td>
  191. <td class="stentry" headers="plugin-configfile__stentry__51">Yes</td>
  192. </tr><tr class="strow">
  193. <th class="stentry" scope="row" headers="plugin-configfile__stentry__49">desc</th>
  194. <td class="stentry" headers="plugin-configfile__stentry__50">Transformation type description</td>
  195. <td class="stentry" headers="plugin-configfile__stentry__51">No</td>
  196. </tr><tr class="strow">
  197. <th class="stentry" scope="row" headers="plugin-configfile__stentry__49">abstract</th>
  198. <td class="stentry" headers="plugin-configfile__stentry__50">When <span class="keyword option">true</span>, sets the transformation type as <q class="q">abstract</q>, meaning it can be
  199. extended by other plug-ins, but cannot be used directly.
  200. <p class="p">For example, the <code class="ph codeph">org.dita.base</code> plug-in defines an abstract <q class="q">base</q>
  201. transformation type that is extended by other DITA-OT plug-ins.</p></td>
  202. <td class="stentry" headers="plugin-configfile__stentry__51">No</td>
  203. </tr><tr class="strow">
  204. <th class="stentry" scope="row" headers="plugin-configfile__stentry__49">extends</th>
  205. <td class="stentry" headers="plugin-configfile__stentry__50">Specifies the name of the transformation type being extended</td>
  206. <td class="stentry" headers="plugin-configfile__stentry__51">No</td>
  207. </tr></tbody></table>
  208. <figure class="fig fignone"><figcaption><span class="fig--title-label">Figure 7. </span>Sample <code class="keyword markupname xmlelement">&lt;transtype&gt;</code> element</figcaption>
  209. <pre class="pre codeblock language-xml"><code>&lt;transtype name="base" abstract="true" desc="Common"&gt;
  210. &lt;!-- ⋮ --&gt;
  211. &lt;param name="link-crawl"
  212. desc="Specifies whether to crawl only topic links found in maps, or all discovered topic links."
  213. type="enum"&gt;
  214. &lt;val&gt;map&lt;/val&gt;
  215. &lt;val default="true"&gt;topic&lt;/val&gt;
  216. &lt;/param&gt;
  217. &lt;!-- ⋮ --&gt;
  218. &lt;/transtype&gt;
  219. </code></pre>
  220. </figure>
  221. <p class="p">The <code class="keyword markupname xmlelement">&lt;transtype&gt;</code> element may define additional parameters for the transformation
  222. type using the following child elements.</p>
  223. <dl class="dl parml">
  224. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;param&gt;</code></dt>
  225. <dd class="dd pd">
  226. <p class="p">An optional element that specifies a parameter for the transformation type.</p>
  227. <p class="p">The following parameter attributes are supported:</p>
  228. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  229. <th class="stentry" scope="col" id="plugin-configfile__stentry__64">Attribute</th>
  230. <th class="stentry" scope="col" id="plugin-configfile__stentry__65">Description</th>
  231. <th class="stentry" scope="col" id="plugin-configfile__stentry__66">Required?</th>
  232. </tr></thead><tbody><tr class="strow">
  233. <th class="stentry" scope="row" headers="plugin-configfile__stentry__64">name</th>
  234. <td class="stentry" headers="plugin-configfile__stentry__65">Parameter name</td>
  235. <td class="stentry" headers="plugin-configfile__stentry__66">Yes</td>
  236. </tr><tr class="strow">
  237. <th class="stentry" scope="row" headers="plugin-configfile__stentry__64">desc</th>
  238. <td class="stentry" headers="plugin-configfile__stentry__65">Parameter description</td>
  239. <td class="stentry" headers="plugin-configfile__stentry__66">No</td>
  240. </tr><tr class="strow">
  241. <th class="stentry" scope="row" headers="plugin-configfile__stentry__64">type</th>
  242. <td class="stentry" headers="plugin-configfile__stentry__65">Parameter type (<span class="keyword option">enum</span>, <span class="keyword option">file</span>,
  243. <span class="keyword option">string</span>)</td>
  244. <td class="stentry" headers="plugin-configfile__stentry__66">Yes</td>
  245. </tr><tr class="strow">
  246. <th class="stentry" scope="row" headers="plugin-configfile__stentry__64">deprecated</th>
  247. <td class="stentry" headers="plugin-configfile__stentry__65">When <span class="keyword option">true</span>, identifies this parameter as deprecated</td>
  248. <td class="stentry" headers="plugin-configfile__stentry__66">No</td>
  249. </tr><tr class="strow">
  250. <th class="stentry" scope="row" headers="plugin-configfile__stentry__64">required</th>
  251. <td class="stentry" headers="plugin-configfile__stentry__65">When <span class="keyword option">true</span>, identifies this parameter as required</td>
  252. <td class="stentry" headers="plugin-configfile__stentry__66">No</td>
  253. </tr></tbody></table></dd>
  254. <dt class="dt pt dlterm"><code class="keyword markupname xmlelement">&lt;val&gt;</code></dt>
  255. <dd class="dd pd">
  256. <p class="p">A child of <code class="keyword markupname xmlelement">&lt;param&gt;</code> (when <code class="keyword markupname xmlatt">@type</code>=<span class="keyword option">enum</span>) that
  257. specifies an enumeration value.</p>
  258. <p class="p">The following attributes are supported:</p>
  259. <table class="simpletable"><colgroup><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"><col style="width:33.33333333333333%"></colgroup><thead><tr class="sthead">
  260. <th class="stentry" scope="col" id="plugin-configfile__stentry__82">Attribute</th>
  261. <th class="stentry" scope="col" id="plugin-configfile__stentry__83">Description</th>
  262. <th class="stentry" scope="col" id="plugin-configfile__stentry__84">Required?</th>
  263. </tr></thead><tbody><tr class="strow">
  264. <th class="stentry" scope="row" headers="plugin-configfile__stentry__82">default</th>
  265. <td class="stentry" headers="plugin-configfile__stentry__83">When <span class="keyword option">true</span>, sets the enumeration value as the default value of the parent
  266. <code class="keyword markupname xmlelement">&lt;param&gt;</code></td>
  267. <td class="stentry" headers="plugin-configfile__stentry__84">Only for the default <code class="keyword markupname xmlelement">&lt;val&gt;</code></td>
  268. </tr></tbody></table></dd>
  269. </dl>
  270. </dd>
  271. </dl>
  272. <p class="p">Any extension that is not recognized by DITA-OT is ignored. Since DITA-OT version 1.5.3, you can combine
  273. multiple extension definitions within a single <span class="ph filepath">plugin.xml</span> file; in older versions, only the
  274. last extension definition was used.</p>
  275. </section>
  276. <div class="example" id="plugin-configfile__plugin-sample"><h2 class="title sectiontitle">Example <span class="ph filepath">plugin.xml</span> file</h2>
  277. <p class="p">The following is a sample of a <span class="ph filepath">plugin.xml</span> file. This file adds support for a new set of
  278. specialized DTDs, and includes an override for the XHTML output processor.</p>
  279. <p class="p">This <span class="ph filepath">plugin.xml</span> file would go into a directory such as
  280. <span class="ph filepath">DITA-OT/plugins/music/</span> and referenced supporting files would also exist in that
  281. directory. A more extensive sample using these values is available in the actual music plug-in, available on
  282. <a class="xref" href="https://sourceforge.net/projects/dita-ot/files/Plug-in_%20Music/" target="_blank" rel="external noopener">SourceForge</a>.</p>
  283. <pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code>&lt;plugin id="org.metadita.specialization.music"&gt;
  284. &lt;feature extension="dita.specialization.catalog.relative"
  285. file="catalog-dita.xml"/&gt;
  286. &lt;feature extension="dita.xsl.xhtml" file="xsl/music2xhtml.xsl"/&gt;
  287. &lt;/plugin&gt;</code></pre>
  288. </div>
  289. </div>
  290. <nav role="navigation" class="related-links"><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/custom-plugins.html" title="In addition to adding plug-ins from the plug-in registry at dita-ot.org/plugins, you can create custom DITA-OT plug-ins of your own to modify the default output, add new output formats, support new languages, or implement DITA topic specializations.">Creating custom plug-ins</a></div></div><div class="linklist reltasks"><strong>Related tasks</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/plugin-newtranstype.html" title="Plug-ins can add an entirely new transformation type. The new transformation type can be very simple, such as an HTML build that creates an additional control file; it also can be very complex, adding any number of new processing steps.">Adding a new transformation type</a></li></ul></div><div class="linklist relref"><strong>Related reference</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/plugin-newextensions.html" title="If your plug-in needs to define its own extension point in an XML file, add the string &#34;_template&#34; to the filename before the file suffix. When the plug-in is installed, this file will be processed like the built-in DITA-OT templates.">Creating a new plug-in extension point</a></li></ul></div></nav></article></main></body></html>