Synchronization: A Graphical Demo
This page illustrates how DeltaXML provides the ability to perform a
three-way merge or synchronization of Scalable Vector Graphic (SVG) files.
This functionality is available with DeltaXML Sync.
Principles of Synchronization
In this example we will illustrate how synchronization is used to manage variants of a graphical image. Variant management for XML data is a common requirement, both for "document-centric" XML and for management of artefacts such as XML schemata. It is a simple task to create these variants, but more complex to update them all when you make a change that needs to be propagated to all variants. This is made possible by DeltaXML Sync.
To illustrate, we'll propagate the changes to a variation of the tiger graphic.
The Original Tiger
|
The original tiger |
|---|
![]() |
The Variant 'whiskerless' Tiger
In a variant of the original tiger, we decide that we need a tiger with no whiskers:
|
The whiskerless Tiger |
|---|
![]() |
|
View/download: |
Edit the Original Tiger
We now edit the original tiger because we prefer to have yellow eyes, as shown below. Our problem is: how we can propagate this edit to our variant, the whiskerless tiger?
|
The Yellow-eyed tiger |
|---|
![]() |
|
View/download: |
Propagating the Yellow Eyes to the Whiskerless Tiger
We now merge the three tigers using the DeltaXML Sync API. DeltaXML performs an intelligent comparison of the three SVG files and determines where the graphics elements are unchanged and where changes have occurred. We use the original tiger as the "base" file, and the whiskerless tiger and yellow-eyed tiger as the two "edits". Elements that have been added, deleted or modified in either path will be propagated to the result. Thus the yellow eyes of one tiger are now propagated to the whiskerless tiger.
The result - a yellow-eyed tiger with no whiskers:
|
The result tiger |
|---|
![]() |
|
View/download: tiger-synch.jpg / tiger-synch.svg |
Applications of Synchronization
This short demonstration shows the potential for handling variants of an SVG by merging in changes to an original with the variant. DeltaXML is performing this operation at the XML level and not at the graphical level. Other applications include synchronizing edits fromtwo people working on the same graphic - though this example is more common in data files when a remote copy is updated and needs to be merged with the original which has itself also changed.
Synchronization can be performed on any XML data, whether it represents graphics, as here, documents or data. The sync is XML-aware and merges the XML trees intelligently. Complex graphics, data and documents can therefore be synchronized automatically.
To learn more about DeltaXML synchronization please visit the DeltaXML Sync product pages or the DeltaXML Resource Library. Feel free to contact us if you have any queries about the use of this powerful new technology.
If you'd like to review the SVG demo in more detail, please return to DeltaXML with SVG - A Graphical View of Change Control



