Release Documentation

File Compare sample

1. Running the sample from the Command-line

It is possible to compare two DocBook files using the command line tool from this directory as follows, where '\''^' is a line continuation character.

java -jar ../../deltaxml-docbook.jar \
                docbook-article-version-1.xml docbook-article-version-2.xml docbook-article-revision.xml \
                indent-output=yes

The docbook-article-revision.xml file contains the result, which is indented due to setting the indent-output parameter to yes. Other parameters are available as discussed in the User Guide and summarised by the following command

java -jar ../../deltaxml-docbook.jar describe

2. Running the sample via the Ant build script

This sample will work from this distribution directory, by issuing the ant run command, which:

  1. compiles the code (the single java class src/Program.java);

  2. builds a jar that references both the deltaxml-docbook.jar and its dependent third-party jars (that is the jars contained in the main distribution directory); and

  3. runs the program.

If you wish to relocate this sample then the build scripts lib.dir property will need to be appropriately updated.