The SVG (Scalable Vector Graphics) XML format has been around for many years and has made its way into many other XML grammars such as DITA and DocBook.

While DeltaXML products have included functionality to mark up differences in references to binary images, SVG has been treated as regular XML with changes marked up using our standard delta format.

By popular demand, XML Compare 13 brings a change to the way that embedded SVG images are handled and now graphically highlights changes within the images themselves. Using customisable object styling, modifications are highlighted in the original and updated version of each image

Version A shows 3 different coloured circles above 3 different coloured triangles.

Version A

Version B shows 4 triangles of different colours. Above the first triangle and the third triangle there is a circle. The circles are of the same colour as the triangle below it.

Version B

Version A and Version B have been compared. There is a thick red dashed box around the first version image made up of 3 circles above 3 triangles. The middle circle also has a thick red dashed box around it. Version B made up of 4 triangles, with a circle above the first and third circle, has a thick dashed green box around it. The last triangle also has a thick green dashed box around it. These boxes show that XML Compare has found changes between the two images.

Comparison result

While this markup works for all SVG content, it is most effective on images such as diagrams, flowcharts, and technical drawings where objects within the image are defined individually and changes include deletion, addition and movement of objects.

Representing large changes

Sometimes, images go through a considerable amount of change from one version to the next. In those cases, the highlighting shown above may become overwhelming in the result image. The SVG Compare feature includes a fallback mechanism that includes both versions of the image with no inner highlighting so that you can see the two original images within the context of the result. The following example is a simple case but more complex cases benefit from this output type much more.

Version A shows 3 circles of different colours.

Version A

Version B shows 3 triangles of different colours.

Version B

Version A, featuring 3 different coloured circles, has a thick red dashed line around the image. Version B, featuring 3 different coloured triangles, has a thick green dashed line around the image. This indicates that XML Compare has found the two pictures have major differences between them.

Fallback result

SVG Compare Configuration Parameters

Change Granularity

This parameter sets whether changes should be marked within the images (‘detailed adjacent’) or not (‘adjacent’)

Fallback

When the number of changes becomes too high (configurable as a percentage), the granularity automatically falls back to the ‘adjacent’ setting.

Markup style

This allows a custom markup style for inline change highlighting in the images.

Example Results

Download your update today or get a free evaluation trial!

SVG Comparison will roll out to our other products shortly, including DITA and DocBook, so subscribe now for the latest updates. We are always keen to hear your feedback so update your XML Compare today simply by downloading from MyDelta. If you are new to DeltaXML request an evaluation trial licence today and our technical experts we will be happy to onboard you.