More Resources
Table of Contents
More Resources
Plugin Components
plugin.xml
The general format of the required plugin.xml file.
build.xml
The general format of the required build.xml file.
ANT Custom build_template.xml
The general format for the custom ANT build file.
cfg Folder
cfg Folder, catalog.xml, fo Folder
plugin.xml

The general format of the required plugin.xml file.
The plugin.xml file is the first stop for the DITA Open Toolkit to run the customization. This file tells the DITA-OT which base plugin to use (what you are customizing), as well as the transtype value that you enter on the command line to run it.
Here’s a template for the plugin.xml file:
< plugin id="[plugin.name]"> 
	< require plugin="[base.plugin]" /> 
	< template file="[build.template.filename]"/> 
	< feature extension="dita.conductor.transtype.check"
		value="[new.transtype]" type="txt"/> 
	< feature extension="dita.conductor.target.relative"
		value="build.xml" type="file"/> 
< /plugin> 
Variable Name Description Example Value
plugin.name The name of your customization folder within the plugins folder. com.jorsek.custom.pdf
base.plugin The name of the default plugin that you are customizing. org.dita.pdf2
build.template.filename The name of the template of the ANT Custom build_template.xml. build_custom.pdf_template.xml
new.transtype The value for transtype to be entered at the command line. jorsek.custom.pdf
build.xml

The general format of the required build.xml file.
The build.xml file points the OT to the custom build files that then run the necessary ant targets.
< project> 
	< import file="{build.filename}"/> 
< /project> 
Variable Name Description Example Value
build.filename The name of the custom ant build file. (Usually generated from a template.) build_jorsek.custom.pdf.xml
ANT Custom build_template.xml

The general format for the custom ANT build file.
Each time the DITA-OT runs, it rebuilds the custom build files from the templates. This template tells the OT where to look for the customization information, and then it runs the base plugin with the customizations.
Here’s a template for the build_template.xml file:
< project name="[plugin.name]" default="dita2[new.transtype]"> 
	< property name="transtype" value="[new.transtype]"/> 
	< target name="dita2[new.transtype]"> 
		< property name="customization.dir" location="${dita.dir}/plugins/[plugin.name]/cfg"/> 
		< property name="pdf.formatter" value="fop"/> 
		< antcall target="[base.plugin.target.name]"/> 
	< /target> 
< /project> 
Variable Name Description Example Value
base.plugin.target.name The name of the ant target of the base plugin. It consists of “dita2” then the transtype name. The example value is for the base plugin org.dita.pdf2. dita2pdf2