Integrating DITA OT Plugins into DITAToo DITA CMS

Recently, we’ve been asked by several customers and partners whether it’s possible to integrate DITA OT plugins into DITAToo.

They asked both about third-party plugins, like PDF5 from Antenna House or SuiteHelp from Suite Solutions, and about their own custom plugins. I’ve just integrated such a plugin (it was created by one of our customers for the CHM output), made sure that everything works, and thought that you may also want to know how to do this on your own.

To be completely honest, in the current version, there is no user interface that would allow you to integrate DITA OT plugins. You would have to tweak an ant script a little bit, but the tweak is very simple and basic. In one of the next releases, we’ll make the integration more user-friendly. But even as it is now, it took me just about 3 minutes to integrate the Antenna House’s PDF5 plugin, for example.

This is what you need to do:

1. Unzip the folder with the plugin (usually, they are provided in a zip file) to the /plugins folder in your DITA OT folder.

2. Run the integrator by executing the following command in the command line: ant -f integrator.xml

3. In the DITAToo installation folder (by default, c:\Program Files (x86)\DITAToo), open build_userguide.xml in any text editor, like Notepad.

4. Locate the default DITA OT’s target whose output is the same as the output of your plugin. For example, for the PDF5 plugin, locate:

<target name=”dita2pdf2″>

</target>

5. Change the transtype to the transtype of your plugin. For example, this is what I did for PDF5 (the changed line is bolded):

<target name=”dita2pdf2″>
<echo>Building “${projdir}/${MAP_file}”</echo>
###CUSTOMIZATION###
<property name=”outer.control” value=”quiet”/>
<ant antfile=”${toolkit_dir}${file.separator}build.xml” target=”init”>
<property name=”args.input” value=”${projdir}/${MAP_file}”/>
<property name=”output.dir” value=”${outdir}”/>
<property name=”dita.temp.dir” value=”${outdir}/temp”/>
<property name=”transtype” value=”pdf5″/>
<property name=”args.draft” value=”yes”/>
<property name=”args.indexshow” value=”yes”/>
<property name=”dita.extname” value=”${EXTNAME}”/>
###DITAVAL###
</ant>
</target>

6. Save the file.

7. In DITAToo, select the project and select Project > Publish Project.

8. Select the output format. In the current example, it’s PDF.

That’s it! DITAToo will now produce the output (PDF in my example) using the PDF5 plugin.

That’s true that the plugin and the default transform can’t co-exist. You would have to manually change the transtype in build_userguide.xml when you want to switch between the default output and your plugin. Also, the name of the plugin’s transform doesn’t appear in the list of output formats in the Publishing window so you would have to remember that PDF actually calls PDF5, and HTML actually calls SuiteHelp. We’ll work on it in one of the next releases of DITAToo to make it user-friendly.

But the good news is that if you already have a DITA OT plugin that you want DITAToo to use it right now, the integration won’t take you more than a few minutes. It will work just perfectly for a proof-of-concept, although some of our customers already use it in production with the current version of DITAToo.

Stay tuned!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation