11.1. Why use the Compare tool?

The Compare tool allows to compare two revisions of the same initial document.

Unlike generic XML comparison tools such as DeltaXML or Altova DiffDog,

After selecting menu item ToolsChangesCompare Revisions in order to display it, the Compare tool will show you the differences existing between two revisions. It also allows to accept or reject some or all the changes.

Figure 7.8. The Compare tool showing the differences existing between doc.xml (the initial document) and docB.xml (a revision of doc.xml), displayed side by side

The Compare tool showing the differences existing between doc.xml (the initial document) and docB.xml (a revision of doc.xml), displayed side by side

11.1.1. A common use case

This tool is typically used by an author after her/his draft document has been reviewed and possibly modified by other authors. For example, let's suppose that john has finished writing doc.xml.

John activates the change detection in doc.xml using ToolsChangesActivate Change Detection, saves the document to disk and then sends a copy to Bart and to Charles.

Bart modifies his copy. He also adds a remark explaining some of his changes using ToolsRemarkInsert or Edit Remark. This results in creating docB.xml, a revision of doc.xml.

Note that Bart didn't even notice that the change detection has been activated in the copy of doc.xml he has received. The use of this facility should be completely transparent to the user of XXE, even in terms of perceived performances.

Charles modifies his copy. This results in creating docC.xml, another revision of doc.xml. Charles sends docC.xml to Dana, who also modifies the document. This results in creating revision docCD.xml.

The Compare tool allows to compare two by two any revision of doc.xml (doc.xml, docB.xml, docC.xml, docCD.xml) to another and this, regardless of the order of creation of a revision. For example, the Compare tool allows to compare docB.xml (here considered to be the reference document) to doc.xml (here considered to be the revised copy). Other example, it allows to compare docCD.xml (here considered to be the reference document) to docB.xml (here considered to be the revised copy).

After the review of the document by Bart, Charles and Dana is finished, John receives docB.xml and docCD.xml.

John first compares doc.xml to docB.xml, accepts some changes and reject other changes, then saves docB.xml to disk.

Then he compares the “approved” docB.xml to docCD.xml. Here too, he accepts some changes and reject other changes, then saves docCD.xml to disk.

Finally John renames the “approved” docCD.xml to doc.xml and deletes all his other working copies[21].



[21] Alternatively, John could have compared docB.xml (here considered to be the reference document) to doc.xml (here considered to be the revised copy), inverting the logic of accepting and rejecting the changes. Then John would have compared docCD.xml (here considered to be the reference document) to the now modified doc.xml (here considered to be the revised copy), also inverting the logic of accepting and rejecting the changes.