Doxygen Plug-in

This is a DITA-OT Plug-in used to auto-create valid DITA-based Doxygen documentation. The initial source of the documentation can be generated directly using the Doxygen XML documentation. The XML file can be added to the source and processed as if it had been written in DITA.

Example

Doxygen is a tool that parses the declarations and documentation comments in a set of source files and produces a set of HTML pages describing the classes, interfaces, constructors, methods, and fields.

namespace transport
{
    /** Mountain bike implementation of a `Bicycle`.
     *
     * MountainBike is an implementation of a Bicycle
     * providing a bike for cycling on rough terrain. Mountain bikes
     * are pretty cool because they have stuff like **Suspension** (and
     * you can even adjust it using SetSuspension). If you're looking
     * for a bike for use on the road, you might be better off using a
     * RacingBike though.
     *
     * @ingroup mountainbike
     */
    class MountainBike : public Bicycle
    {
    public:
        /** Set suspension stiffness.
         * @stiffness the suspension stiffness.
         *
         * SetSuspension changes the stiffness of the suspension
         * on the bike. The method will return false if the stiffness
         * could not be adjusted.
         *
         * @return true if the suspension was adjusted successfully,
         *         false otherwise.
         */
        bool SetSuspension(double stiffness);
Figure 1. Sample doxygen
Figure 2. Doxygen PDF Output

Install

Run the plug-in installation commands:

dita install https://github.com/doctales/org.doctales.xmltask/archive/master.zip
dita install https://github.com/jason-fox/fox.jason.passthrough/archive/master.zip
dita install https://github.com/jason-fox/fox.jason.passthrough.doxygen/archive/master.zip

The dita command line tool requires no additional configuration.

Usage

To do generate Doxygen XML set `GENERATE_XML` to `YES`.

The XML output consists of an index file named index.xml which lists all items extracted by doxygen with references to the other XML files for details. The structure of the index is described by a schema file index.xsd. The Doxygen source should be concatenated into one single XML file using the instructions found in the XSLT file combine.xslt.

Once the source XML has been created, add it to the *.ditamap and mark it for doxygen processing, by labelling it with @format="doxygen" within the *.ditamap as shown:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap>
    ...etc
    <appendices toc="yes" print="yes">
      <topicmeta>
        <navtitle>Appendices</navtitle>
      </topicmeta>
      <appendix format="dita" href="topic.dita">
        <topicref format="doxygen" type="topic" href="doxygen.xml"/>
      </appendix>
   </appendices>
</bookmap>
Figure 3. Usage

The additional file will be converted to a `*.dita file and will be added to the build job without further processing. Unless overridden, the navtitle of the included topic will be the same as root name of the file. Any underscores in the filename will be replaced by spaces in title