custom-plugins.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html
  2. SYSTEM "about:legacy-compat">
  3. <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 2018"><meta name="DC.rights.owner" content="(C) Copyright 2018"><meta name="DC.Type" content="concept"><meta name="description" content="You can install or create DITA-OT plug-ins to change the default output types in various ways, add entirely new kinds of output formats, or implement DITA topic specializations."><meta name="DC.Relation" scheme="URI" content="../topics/extending-the-ot.html"><meta name="DC.Relation" scheme="URI" content="../topics/plugins-installing.html"><meta name="DC.Relation" scheme="URI" content="../topics/plugins-removing.html"><meta name="DC.Relation" scheme="URI" content="../topics/plugin-configfile.html"><meta name="DC.Relation" scheme="URI" content="../topics/plugin-dependencies.html"><meta name="DC.Relation" scheme="URI" content="../topics/plugin-applications.html"><meta name="DC.Relation" scheme="URI" content="../topics/plugin-sample.html"><meta name="DC.Relation" scheme="URI" content="../topics/plugin-best-practices.html"><meta name="DC.Format" content="HTML5"><meta name="DC.Identifier" content="custom-plugins"><link rel="stylesheet" type="text/css" href="../css/commonltr.css"><link rel="stylesheet" type="text/css" href="../css/dita-ot-doc.css"><title>Customizing DITA-OT with plug-ins</title></head><body id="custom-plugins"><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.0</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/alternative-input-formats.html">Authoring formats</a></li><li><a href="../topics/building-output.html">Building output</a></li><li><a href="../parameters/index.html">Setting parameters</a></li><li><a href="../topics/extending-the-ot.html">Customizing DITA-OT</a><ul><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/globalization.html">Globalizing DITA content</a></li><li class="active"><a href="../topics/custom-plugins.html">Custom plug-ins</a><ul><li><a href="../topics/plugins-installing.html">Installing plug-ins</a></li><li><a href="../topics/plugins-removing.html">Removing plug-ins</a></li><li><a href="../topics/plugin-configfile.html">Plug-in descriptor file</a></li><li><a href="../topics/plugin-dependencies.html">Plug-in dependencies</a></li><li><a href="../topics/plugin-applications.html">Plug-in applications</a></li><li><a href="../topics/plugin-sample.html">Example plugin.xml file</a></li><li><a href="../topics/plugin-best-practices.html">Best practices for plug-ins</a></li></ul></li><li><a href="../extension-points/plugin-extension-points.html">Extension points</a></li><li><a href="../topics/migration.html">Migrating customizations</a></li><li><a href="../topics/rebuilding-the-dita-ot-documentation.html">Rebuilding documentation</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">Customizing DITA-OT with plug-ins</h1>
  8. <div class="body conbody"><p class="shortdesc">You can install or create DITA-OT plug-ins to change the default output types in
  9. various ways, add entirely new kinds of output formats, or implement DITA topic specializations.</p>
  10. <p class="p">A plug-in consists of a directory, typically stored within the <span class="ph filepath">plugins/</span> directory inside of
  11. the DITA-OT. Every plug-in is controlled by a file named <span class="ph filepath">plugin.xml</span>, which is located in the
  12. root directory of the plug-in.</p>
  13. <section class="section" id="custom-plugins__plugin-benefits"><h2 class="title sectiontitle">Plug-in benefits</h2>
  14. <p class="p">Plug-ins allow you to extend the toolkit in a way that is consistent, easy-to-share, and possible to preserve
  15. through toolkit upgrades.</p>
  16. <p class="p">The DITA-OT plug-in mechanism provides the following benefits:</p>
  17. <ul class="ul">
  18. <li class="li">Plug-ins can easily be shared with other users, teams, or companies. Typically, all users need to do is to
  19. unzip and run a single installation command. With many builds, even that installation step is automatic.</li>
  20. <li class="li">Plug-ins permit overrides or customizations to grow from simple to complex over time, with no increased
  21. complexity to the extension mechanism.</li>
  22. <li class="li">Plug-ins can be moved from version to version of the DITA-OT simply by reinstalling or copying the directory
  23. from one installation to another. There is no need to re-integrate code based on updates to the core
  24. processing of the DITA-OT.</li>
  25. <li class="li">Plug-ins can build upon each other. If you like a plug-in, simply install that plug-in, and then create your
  26. own plug-in that builds on top of it. The two plug-ins can then be distributed to your team as a unit, or you
  27. can share your own extensions with the original provider.</li>
  28. </ul>
  29. </section>
  30. <section class="section"><h2 class="title sectiontitle">Working with plug-ins</h2>
  31. <p class="p">Extended documentation for creating plug-ins is provided in the following topics.</p>
  32. </section>
  33. </div>
  34. <nav role="navigation" class="related-links"><ul class="ullinks"><li class="link ulchildlink"><strong><a href="../topics/plugins-installing.html">Installing plug-ins</a></strong><br>Use the <span class="keyword cmdname">dita</span> command to install a plug-in.</li><li class="link ulchildlink"><strong><a href="../topics/plugins-removing.html">Removing plug-ins</a></strong><br>Use the <span class="keyword cmdname">dita</span> command to uninstall a plug-in.</li><li class="link ulchildlink"><strong><a href="../topics/plugin-configfile.html">Plug-in descriptor file</a></strong><br>The plug-in descriptor file (<span class="ph filepath">plugin.xml</span>) 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.</li><li class="link ulchildlink"><strong><a href="../topics/plugin-dependencies.html">Plug-in dependencies</a></strong><br>A DITA-OT plug-in can be dependent on other plug-ins. Prerequisite plug-ins are installed first, which ensures that the DITA-OT handles XSLT overrides correctly.</li><li class="link ulchildlink"><strong><a href="../topics/plugin-applications.html">Plug-in applications</a></strong><br>Plug-ins allow you to extend the functionality of the DITA-OT. This might entail adding support for specialized document types, integrating processing overrides, or defining new output transformations.</li><li class="link ulchildlink"><strong><a href="../topics/plugin-sample.html">Example plugin.xml file</a></strong><br>The following is a sample of a <span class="ph filepath">plugin.xml</span> file. This file adds support for a new set of specialized DTDs, and includes an override for the XHTML output processor.</li><li class="link ulchildlink"><strong><a href="../topics/plugin-best-practices.html">Best practices for custom plug-ins</a></strong><br>Adhering to certain development practices will properly isolate your code from that of the DITA Open Toolkit. This will make it easier to you to upgrade to new versions of the DITA-OT when they are released.</li></ul><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/extending-the-ot.html" title="There are several ways to customize and extend the toolkit. You can adjust various aspects of the default output by setting parameters or using custom stylesheets. For more complex customizations, use custom DITA-OT plug-ins to override other parts of processing.">Customizing the DITA Open Toolkit</a></div></div></nav></article></main></body></html>