History | Edit

Oxygen XML Editor includes some unique features that allow you to easily integrate Markdown documents in a DITA project. This is especially helpful for teams that have contributors who are familiar with the Markdown syntax, but they want their output to be generated from DITA projects. The integration between the Markdown editor and DITA includes actions to export or convert Markdown documents to DITA topics and the DITA tab in the Preview pane provides a visualization of how the topic will look after conversion.

Export Markdown as a DITA Topic

The Markdown editor includes an option to quickly convert the current Markdown document into a DITA topic. The Export as DITA Topic action is available in the contextual menu of the left-side text editor and the right-side Preview pane when the DITA tab selected.

The conversion creates a new XML file that is defined as a DITA topic and opens it in the Text editing mode. You can then work with the document as you would with any other DITA topic, although you may need to manually correct some issues where the parser could not properly map Markdown syntax to DITA markup.

Working with Markdown Documents in the DITA Maps Manager

Oxygen XML Editor has some specialized features that allow you to integrate Markdown documents directly into your DITA project using the DITA Maps Manager. The following features are available for Markdown documents in the DITA Maps Manager view:
  • Insert Reference to Markdown Document - You can use the New, Reference, and Reference to the currently edited file actions from the Append Child, Insert Before, or Insert After submenu when invoking the contextual menu in the DITA Maps Manager to insert a reference to a Markdown document at the selected location in the map. Markdown documents will be inserted as a topic reference (topicref element) with the format attribute set to markdown.
  • Validate Markdown Documents in DITA Maps - When you use the Validate and Check for Completeness action from the DITA Maps Manager toolbar to check the integrity of the structure of a DITA map, Markdown documents that are referenced in the DITA map will be converted to DITA topics in the background and validated the same as any other DITA topic.
  • Transforming DITA Maps with Markdown Documents - When transforming DITA maps that have Markdown documents referenced, the transformation will convert the Markdown documents to normal DITA output without you needing to manually convert the Markdown documents to DITA topics.
  • Manually Convert Markdown Documents to DITA Topics - If you need to use DITA semantics that are not possible in Markdown syntax (such as content references, related links, and other DITA-specific syntax), you can manually convert the Markdown document into a DITA topic. To do so, right-click the Markdown document in the DITA Maps Manager and select Refactoring > Convert Markdown to DITA Topic. This will open a dialog box that allows you to configure options for converting the document to an XML file that is defined as a DITA topic.

    Figure: Convert Markdown to DITA Topic Dialog Box

    This dialog box includes the following options:

    The destination path for the new DITA topic.
    File Name
    Presents the current name and allows you to change it.
    Update references
    Select this option to update all references of the file in the DITA map and in the files referenced from the DITA map.
    Delete Markdown file
    If selected, the Markdown version of the file is deleted when the document is converted into a DITA file. If deselected (default value), when the document is converted into a DITA file, the original Markdown file is also preserved in its current location.
    Select this button to display a preview of the changes Oxygen XML Editor is about to make.
    Select this button to perform the conversion.
Tip: Oxygen XML Editor comes with a sample ditamap project for converting Markdown to DITA. Go to the Project view, open the sample.xpr project, and navigate to the dita/markdown-dita folder.