45 lines
No EOL
6.8 KiB
HTML
45 lines
No EOL
6.8 KiB
HTML
<!DOCTYPE html
|
|
SYSTEM "about:legacy-compat">
|
|
<html lang="en"><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="generator" content="DITA-OT"><meta name="description" content="A DITA-OT plug-in can be dependent on other plug-ins. Prerequisite plug-ins are installed first, which ensures that DITA-OT handles XSLT overrides correctly."><meta name="keywords" content=", require, plug-ins, prerequisites, dependencies, order, XSLT, plug-ins"><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 dependencies</title></head><body id="plugin-dependencies"><header role="banner"><div class="header">
|
|
<p>DITA Open Toolkit</p>
|
|
<hr>
|
|
</div></header><nav role="toc"><ul><li><a href="../index.html">DITA Open Toolkit 3.6</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><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 class="active"><a href="../topics/plugin-dependencies.html">Plug-in dependencies</a><ul><li><a href="../topics/referencing-other-plugins.html">Referencing files from other plug-ins</a></li></ul></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">
|
|
<h1 class="title topictitle1" id="ariaid-title1">Plug-in dependencies</h1>
|
|
|
|
|
|
<div class="body conbody"><p class="shortdesc">A DITA-OT plug-in can be dependent on other plug-ins. Prerequisite plug-ins are installed first, which
|
|
ensures that DITA-OT handles XSLT overrides correctly.</p>
|
|
|
|
<section class="section">
|
|
<p class="p">The <code class="keyword markupname xmlelement"><require></code> element in the <span class="ph filepath">plugin.xml</span> file specifies whether the
|
|
plug-in has dependencies. Use <code class="keyword markupname xmlelement"><require></code> elements to specify prerequisite plug-ins, in
|
|
order from most general to most specific.</p>
|
|
<p class="p">If a prerequisite plug-in is missing, DITA-OT prints a warning during installation. To suppress the warning but
|
|
keep the installation order if both plug-ins are present, add <code class="ph codeph">importance="optional"</code> to the
|
|
<code class="keyword markupname xmlelement"><require></code> element. </p>
|
|
|
|
<p class="p">If a plug-in can depend on any one of several optional plug-ins, separate the plug-in IDs with a vertical bar.
|
|
This is most useful when combined with <code class="ph codeph">importance="optional"</code>.</p>
|
|
</section>
|
|
<div class="example"><h2 class="title sectiontitle">Example: Plug-in with a prerequisite plug-in</h2>
|
|
|
|
<p class="p">The following plug-in will only be installed if the plug-in with the ID <code class="ph codeph">com.example.primary</code> is
|
|
available. If that plug-in is not available, a warning is generated and the installation operation fails.</p>
|
|
<pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code><plugin id="com.example.builds-on-primary">
|
|
<!-- ... Extensions here -->
|
|
<require plugin="com.example.primary"/>
|
|
</plugin></code></pre>
|
|
</div>
|
|
<div class="example"><h2 class="title sectiontitle">Example: Plug-in that has optional plug-ins</h2>
|
|
|
|
<p class="p">The following plug-in will only be installed if either the plug-in with the ID <code class="ph codeph">pluginA</code> or the
|
|
plug-in with the ID <code class="ph codeph">pluginB</code> is available. If neither of those plug-ins are installed, a warning
|
|
is generated but the installation operation is completed.</p>
|
|
<pre class="pre codeblock language-xml normalize-space show-line-numbers show-whitespace"><code><plugin id="pluginC">
|
|
<!-- ...extensions here -->
|
|
<require plugin="pluginA|pluginB" importance="optional"/>
|
|
</plugin></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<nav role="navigation" class="related-links"><ul class="ullinks"><li class="link ulchildlink"><strong><a href="../topics/referencing-other-plugins.html">Referencing files from other plug-ins</a></strong><br>Starting with DITA-OT 1.5.4, you can use the <span class="ph filepath">plugin:<var class="keyword varname">plugin-id</var></span> URI extension and the <span class="ph filepath">${dita.plugin.<var class="keyword varname">plugin-id</var>.dir}</span> Ant variable to reference the base path of another installed DITA-OT plug-in.</li></ul><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 relconcepts"><strong>Related concepts</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="../topics/plugin-coding-conventions.html" title="To ensure custom plug-ins work well with the core toolkit code and remain compatible with future releases, the DITA Open Toolkit project recommends that plug-ins use modern development practices and common coding patterns.">Plug-in coding conventions</a></li></ul></div></nav></article></main></body></html> |