Mapfile Bookmap Sample


This sample compares two DITA bookmap files in1.bookmap and in2.bookmap, it does not compare the referenced topics. Because of this, the topic files are not included in the sample. Please read the content of the DITA markup result (results/dita-markup.bookmap) 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, the formats used in this sample are summarised in the table below.

Output Format
dita-markupMark changes using DITA's rev and status attributes.
oxygen-tcsMark changes using the oXygen tracked changes format.

Lexical Preservation

The sample scripts (batch-file or ant) 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 Ant

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

antRun all four comparisons.
ant run
ant run-dita-markupRun the DITA Markup comparison.
ant run-oxygen-tcsRun the oXygen 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 mapfile in1.bookmap in2.bookmap out.bookmap 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 4 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 mapfile in1.bookmap in2.bookmap out.bookmap output-format=dita-markup