custom-plugins.html 9.5 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 2019"><meta name="DC.rights.owner" content="(C) Copyright 2019"><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.subject" content="DITA, specializations, plug-ins, benefits, working with"><meta name="keywords" content="DITA, specializations, plug-ins, benefits, working with"><meta name="DC.relation" scheme="URI" content="../topics/customizing.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/plugins-registry.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.relation" scheme="URI" content="../topics/plugin-coding-conventions.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>Working 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.3</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/customizing.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 class="active"><a href="../topics/custom-plugins.html">Working with 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/plugins-registry.html">Plug-in registry</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</a></li><li><a href="../topics/plugin-coding-conventions.html">Coding conventions</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/globalization.html">Globalizing DITA content</a></li><li><a href="../topics/rebuilding-docs.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">Working 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> subdirectory of the
  11. DITA-OT installation. Every plug-in is controlled by a file named <span class="ph filepath">plugin.xml</span>, which is
  12. located in the 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 DITA-OT by reinstalling or copying the directory from one
  23. installation to another. There is no need to re-integrate code based on updates to DITA-OT core
  24. processing.</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">Plug-in details</h2>
  31. <p class="p">The following topics provide additional information on working with plug-ins and creating your own.</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/plugins-registry.html">Adding plug-ins via the registry</a></strong><br><span class="ph">DITA-OT 3.2 supports a new plug-in registry that makes it easier to discover and install new plug-ins. The registry provides a searchable list of plug-ins at <a class="xref" href="https://www.dita-ot.org/plugins" target="_blank">dita-ot.org/plugins</a>.</span></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 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 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 DITA Open Toolkit. This will make it easier to you to upgrade to new versions of DITA-OT when they are released.</li><li class="link ulchildlink"><strong><a href="../topics/plugin-coding-conventions.html">Plug-in coding conventions</a></strong><br>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.</li></ul><div class="familylinks"><div class="parentlink"><strong>Parent topic:</strong> <a class="link" href="../topics/customizing.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 DITA Open Toolkit</a></div></div></nav></article></main></body></html>