Skip to content
This repository has been archived by the owner. It is now read-only.
Markdown parser and output for DITA-OT
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Deprecation Note

This repository has been deprecated and all further development has been moved to

Lightweight DITA for DITA-OT

DITA-OT LwDITA plug-in contains

  • a custom parser for Markdown and HTML to allow using MDITA and HDITA as a source document format,
  • and a transtype to generate Markdown from DITA source.

The Markdown DITA files need to use a subset of Markdown constructs for compatibility with DITA content models.


Using LwDITA files as input

Markdown DITA or HTML DITA topics can only be used by linking to them in map files.

  <topicref href="" format="mdita"/>
  <topicref href="test.html" format="hdita"/>

The format attribute value must be set to mdita or hdita in order to recognize files as Markdown DITA or HTML DITA, respectively; the file extension is not used to recognize format.

See Syntax reference for XML and Markdown DITA correspondence.

Generating Markdown output

The DITA-OT LwDITA plug-in extends the DITA Open Toolkit with additional output formats (transformation types) that can be used to publish DITA content as Markdown.

  • To publish Markdown DITA files, use the markdown transtype.

  • To generate GitHub Flavored Markdown files, use the markdown_github transtype.

  • To publish GitHub Flavored Markdown and generate a table of contents file for publication via GitBook, use the markdown_gitbook transtype.


DITA-OT 2.2 is required. Earlier versions of DITA-OT do not have the required extension points.


  1. Run the plug-in installation command:

    dita -install

The dita command line tool requires no additional configuration; running DITA-OT using Ant requires adding plug-in contributed JAR files to CLASSPATH with e.g. -lib plugins/com.elovirta.dita.markdown.


To build the DITA-OT Markdown plug-in from source:

  1. Install the DITA-OT distribution JAR file dependencies by running gradle install from your clone of the DITA-OT repository. The required dependencies are installed to a local Maven repository in your home directory under .m2/repository/org/dita-ot/dost/.

  2. Run the Gradle distribution task to generate the plug-in distribution package:

    ./gradlew dist

    The distribution ZIP file is generated under build/distributions.


Support this project and others by @jelovirt via Paypal.


DITA-OT LwDITA is licensed for use under the Apache License 2.0.

You can’t perform that action at this time.