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]

Re: XML Diff and Sync



We have proposed a delta format for XML (see http://www.deltaxml.com) 
which does what you need though it does not use Xpath.

The delta file is similar to the input files in structure rather than 
being a flat list of Xpath style statements, and this works well for 
nested data.

Take a look at it - the code is there for download and can be used 
for free on small files, and it will re-combine the delta with either 
original to create the other file.

Robin

At 11:48 AM -0400 4/18/01, Joel Bender wrote:
>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
>operations.
>
>Hints?  Tips?  Tricks?
>
>
>Joel
>
>1. http://www.w3.org/TR/1999/WD-xml-fragment-19990303.html
>
>------------------------------------------------------------------
>The xml-dev list is sponsored by XML.org, an initiative of OASIS
><http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To unsubscribe from this elist send a message with the single word
>"unsubscribe" in the body to: xml-dev-request@lists.xml.org

-- -----------------------------------------------------------------
Robin La Fontaine, Monsell EDM Ltd
(XML file comparison, Engineering data exchange and management using XML)
Tel: +44 1684 592 144 Fax: +44 1684 594 504
Email: robin@monsell.co.uk      http://www.deltaxml.com