Topic Sample

 Table of Contents


This sample compares two DITA topic files in1.dita and in2.dita. Please read the content of the DITA markup result (results/dita-markup.dita) as it is designed to illustrate several of our DITA comparison product's features.

The sample uses either .NET or Java versions of DITA Compare, according to the version downloaded. Samples for both platforms are covered here.

Output Format

The result of this comparison depends on the selected output format, as discussed in the Output Formats Section of the Reference and summarized in the table below.

Output Format
dita-markupMark changes using DITA's rev and status attributes.
arbortext-tcsMark changes using the Arbortext editor's tracked changes format.
framemaker-tcsMark changes using the FrameMaker editor's tracked changes format.
oxygen-tcsMark changes using the oXygen tracked changes format.
xmetal-tcsMark changes using the XMetaL tracked changes format.

Lexical Preservation

The sample scripts also set two parameters to preserve the lexical formatting of the source document.

  1. preservation-mode=roundTrip
  2. whitespace-processing-mode=ignore

Java Platform

Using Apache Ant

The sample comparison can be run via an Apache Ant build script using the following commands.

CommandActions Performed
ant runRun all four comparisons. Default ant target.
ant run-dita-markupRun the DITA Markup comparison.
ant run-arbortext-tcsRun the Arbortext tracked changes comparison.
ant run-framemaker-tcsRun the FrameMaker tracked changes comparison.
ant run-oxygen-tcsRun the oXygen tracked changes comparison.
ant run-xmetal-tcsRun the XMetaL tracked changes comparison.
ant cleanRemove the generate output.

The output of these commands are put into the results directory.

From the Command Line

The sample can be run directly by issuing the following command

java -jar ../../deltaxml-dita.jar compare topic in1.dita in2.dita out.dita output-format=dita-markup

where dita-markup format enumeration can be replaced by one of the tracked changes format enumerations.


  • When running the command from a Windows operating system command shell the forward slashes (/) need to be replaced by backslashes (\).

.NET Platform

Using a Batch File

Run the rundemo.bat batch file either by entering rundemo from the command line or by double-clicking on this file from Windows Explorer. This script runs the same comparison 5 times, once for each output format. The output destination is a freshly created results directory.

From the Command Line

The sample comparison can also be run from the command line, using the following:

..\..\bin\deltaxml-dita.exe compare topic in1.dita in2.dita out.dita output-format=dita-markup
#content .code