Open XML Revision Tracking

If you've ever worked on documents that require a great deal of collaborative editing -- contracts, documentation, marketing materials, etc. -- you've probably used revision tracking. The ability to track what was added, edited, or deleted from a document, and who made the change as well as when they made it, can be a big time-saver and help assure a very high-quality document in the end.

Historically, revision tracking was something that Microsoft Word a desktop word-processing application provided. But in the world of web collaboration, "revision tracking" was typically much less granular; usually just a matter of tracking who changed the document and when it changed.  This is a good example of the tradeoff between the rich functionality of desktop applications and the broad reach and collaborative potential of web applications.

Open XML's powerful support for revision tracking changes all of that. Now it's possible to write web apps that can track revisions with all the rich functionality that programs like Word have offered in the past. Furthermore, you can collaborate between web apps and Word 2007 on the desktop.

For example, a DOCX document could be generated by a web app, then downloaded locally. Multiple users could make changes to the document (which has change tracking turned on), and when the resulting document is uploaded to the web app, it can easily see the changes that were made, who made them, and when they were made. And since the revisions are tracked in special tags that aren't used for the normal flow of the content of the document, it's also a simple matter to ignore the tracked changes and publish the document with the appearance of all changes "committed," without losing the underlying detail.

If you're interested in writing applications like this, there's a new article on the OpenXmlDeveloper web site that you'll want to check out entitled "View revisions to a WordprocessingML document in a browser". This article includes sample source code for a simple web app (written in ASP.NET) that displays tracked changes in an Open XML WordprocessingML document such as the DOCX files you can create with Word 2007.  Thanks to Muthu Kumar Arjunan of Sonata Software for putting this sample application together.