OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML Diff and Sync

I have a collection of applications that share an XML file.  When one 
application changes some piece of the file, i.e., an attribute value 
changes or an element is added/replaced/deleted, a notification of 
the change will be sent to the other peers.  Sending a new copy of 
the entire file will not satisfy my performance requirements.

I've been poking around in the XML Fragment Interchange working draft 
[1], but it seems pretty verbose for deeply nested elements.  It also 
references XPointer, but the fragment package definition makes my 
eyes gloss over and for some reason the text gets blurry :-).  I 
guess I was expecting something that used XPath.

If there was a tool that explained the differences between two XML 
files as a series of delta expressions, that would be a great start. 
For example:

     <addAttr path="a/b@c">value</addAttr>
     <deleteAttr path="a/b@d"/>
     <addElement path="a/b"><c>Some content</c></addElement>

Once these tiny delta elements are defined, they'll be useful in all 
kinds of ways.  I could save them as an audit log stored in an XML 
database, buffer a sequence of them up for applications that have 
been out of touch for a while, keep a stack of them for undo 

Hints?  Tips?  Tricks?


1. http://www.w3.org/TR/1999/WD-xml-fragment-19990303.html