CONFERENCE PAPER

An Improved diff3 Format Using XML: Diff3x

There is no doubt that the diff and diff3 format has established itself as a well-used de-facto standard. In our last paper on the subject, we suggested some minor improvements to diff3. We’ve improved upon those suggestions to propose an even better format.

Improving improvements

The changes we suggested in our previous paper suffered from the common complaints of a retrofit in that they did not sit comfortably with the original and only did half a job. The prevalence of GUIs also suggest that the actual syntax of a diff file is not as important as it was in that the emphasis has changed from human readability to interchange between two applications, for example between a git ‘merge driver’ and a git ‘mergetool’. For these reasons it seemed better to consider a different approach using the tools and formats that are now in common use, for example XML or JSON.

What might diff3 look like as an XML format? Would the advantages of a new format make it worth swapping from the tried and tested diff3? Could existing GUI software easily adapt to a new format and perhaps, even be simpler as a result?

Download this conference paper to:

  • Understand how we would create a new diff3 format using XML.
  • Understand how this new format could be applied to both XML and JSON.
  • Review both the advantages and challenges faced when creating and using this new proposed format.

We can see that by allowing nested change we can avoid the repetition and make it easier for a human to understand.

Related Media

Diff3 works surprisingly well for pretty-printed source code and similar documents. But it has frustrating limitations when used for XML or JSON or similar tree-based data formats. Can it be improved?

When ordered elements can be moved then we have something that has some common ground with orderless. This paper establishes a continuum between ordered information and orderless information and proposes that these are not as far apart as they might at first appear.

By using DeltaXML’s DITA Compare solution, Scribestar were able to create an intensive platform that helps those in the legal profession process and review large and complex documents.