Revision of Publishing with the DITA Open Toolkit from Sat, 2012-06-16 10:08


The DITA Open Toolkit, or DITA-OT for short, is a set of Java-based, open source tools that provide processing for DITA maps and topical content. You can download the DITA-OT and install it for free on your computer, or you may already have a copy bundled together with your authoring tool or CMS.

The DITA-OT transforms DITA content (maps and topics) into publishing deliverable formats such as web (XHTML), print (PDF), and Help (CHM and Eclipse). Output files are generated in your file system, in a directory of your choosing. During the publishing process, the toolkit runs a set of "pre-process" routines that resolve conref, keyref, and implement several other standard DITA behaviors.

If you do not have a tool that embeds the toolkit, you will need to install it first; instructions are available at http://dita-ot.sourceforge.net/latest/.

Using your help authoring tool to publish

The OT is integrated into many authoring tools (e.g.,FrameMaker, <oXygen/>, XMetaL) and content management systems (e.g., Astoria, Bluestream, IXIASOFT, XyEnterprise). Most of these tools provide their own menus or GUIs to interact with the toolkit. Consult your tool's documentation to find out if such tools are available.

Publishing with other GUI tools

There are currently two external GUI tools that may be used to run a toolkit build. These tools are not maintained by the DITA-OT developers; they are created and maintained by users outside of the core development team.

  • "DITA Open Toolkit GUI" is a simple, open source Java-based GUI that allows you to select an input map, DITAVAL filter file, output directory, and transform type. The tool is hosted at SourceForge: http://sourceforge.net/projects/ditaotgui/
  • WinANT Echidna is a Windows-only tool that provides access to many more toolkit options. It also allows selection of different skins, so that common sets of options or style branding may be saved or reused. This tool is not open source, but the binary is available for free at SourceForge: http://sourceforge.net/projects/winant-echidna/

Publishing with Ant

For those not using a GUI or authoring tool, the best long term approach to builds is to use Ant. An Ant build file provides you with an easily repeatable build; the time investment is entirely in the initial definition of the build file. 

The toolkit includes several sample Ant files in the samples/ant_sample/ directory. When creating your first Ant build, it's a good idea to copy the most appropriate build file to a new location, edit it to change the input file and base directories, and add any additional options as needed. A good current resource for available Ant parameters is the "Ant Quick Start Guide" (http://sourceforge.net/projects/antquickstartgu/); that information is currently being updated and should be integrated into the DITA-OT's doc/ directory sometime in July or August 2010.

Publishing using the Ant Demo

The toolkit also comes with a demo Prompted Build using Ant; this method prompts for the input file, output directory, and transform type, but does not allow access to any other options. To run the demo, run the following command from a DOS prompt in the root directory of the toolkit:

ant -f build_demo.xml 

Publishing with the Java command line

The final way to run a build is with the Java command line. This is simply a Java based wrapper that takes in a list of parameters, creates an Ant build file, and then runs an Ant build as described above. The primary purpose of this build method is for one-time builds or for getting to know the toolkit, because it allows access to most processing options without the need to create an Ant file. Of course this method may be used to run any number of builds, but those concerned about memory usage should know that this is no different than running an Ant build together with a small extra Java process.

To get a list of all options available to the Java command line, run the following from the root directory of the toolkit:

java -jar lib/dost.jar

A full build using the shipped sample files would look something like this, which uses the /i parameter for the input file, /outdir for the output directory, and /transtype to select an output type of XHTML:

java -jar lib/dost.jar /i:samples/hierarchy.ditamap /outdir:out /transtype:xhtml 

Other resources:

XML.org Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | XML.org | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I