18 lines
No EOL
7.7 KiB
HTML
18 lines
No EOL
7.7 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="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."><meta name="keywords" content="DITA, specializations, 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>Creating custom plug-ins</title></head><body id="custom-plugins"><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 class="active"><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><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">
|
|
<h1 class="title topictitle1" id="ariaid-title1">Creating custom plug-ins</h1>
|
|
|
|
|
|
|
|
<div class="body conbody"><p class="shortdesc">In addition to adding plug-ins from the plug-in registry at
|
|
<a class="xref" href="https://www.dita-ot.org/plugins" target="_blank" rel="external noopener">dita-ot.org/plugins</a>, 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.</p>
|
|
<p class="p">A plug-in consists of a directory, typically stored within the <span class="ph filepath">plugins/</span> subdirectory of the
|
|
DITA-OT installation. Every plug-in is controlled by a file named <span class="ph filepath">plugin.xml</span>, which is
|
|
located in the root directory of the plug-in.</p>
|
|
</div>
|
|
<nav role="navigation" class="related-links"><ul class="ullinks"><li class="link ulchildlink"><strong><a href="../topics/plugin-benefits.html">Plug-in benefits</a></strong><br>Plug-ins allow you to extend the toolkit in a way that is consistent, easy-to-share, and possible to preserve through toolkit upgrades.</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-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><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-use-cases.html">Plug-in use cases</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/html-customization-plugins.html">Custom HTML plug-ins</a></strong><br>In addition to the basic modifications that can be made with parameter settings and property files, you can create custom HTML plug-ins that bundle custom fonts, JavaScript, and stylesheets; modify the HTML markup, or override other aspects of HTML processing.</li><li class="link ulchildlink"><strong><a href="../topics/pdf-customization-plugins.html">Custom PDF plug-ins</a></strong><br>In most cases, PDF output should be customized by creating custom DITA-OT plug-ins that build on the default DITA to PDF transformation. PDF plug-ins can customize covers and page layouts, modify formatting, override the logic of the default PDF plug-in, and much more.</li><li class="link ulchildlink"><strong><a href="../topics/globalization.html">Globalizing DITA content</a></strong><br>The DITA standard supports content that is written in or translated to any language. In general, DITA Open Toolkit passes content through to the output format unchanged. DITA-OT uses the values for the <code class="keyword markupname xmlatt">@xml:lang</code> and <code class="keyword markupname xmlatt">@dir</code> attributes that are set in the source content to provide globalization support. You can create custom plug-ins to support additional languages.</li><li class="link ulchildlink"><strong><a href="../topics/migration.html">Migrating customizations</a></strong><br>If you have XSL transformation overrides, plug-ins or other customizations written prior to DITA-OT <span class="keyword">3.6</span>, you may need to make changes to ensure your overrides work properly with the latest toolkit versions. </li></ul><div class="linklist relinfo"><strong>Related information</strong><br><ul class="linklist"><li class="linklist"><a class="link" href="https://www.oxygenxml.com/events/2018/dita-ot_day.html#step_by_step_implementation_of_a_DITA" target="_blank" rel="external noopener" title="There are lots of DITA-OT extension points, maybe list some of the most common ones, then based on 3-4 use cases implement small plugins which use those extension points. For example: a plugin which changes the default label value for "Note"a plugin which adds an XHTML customization matching a DITA element with a certain @status attribute value and producing a certain HTML spana plugin which customizes the PDF processing in some waya plugin which adds a specialization DTD with an XML catalog">Step by step implementation of a DITA Open Toolkit plugin</a></li></ul></div></nav></article></main></body></html> |