A New and Improved SVG Markup for DITA and DocBook Comparison

In XML Compare 13, we launched our exciting new SVG comparison feature. By comparing the XML structure of the SVG, we employ a customisable output pipeline to apply XSLT transformations that analyse identified changes and convert them into a visual representation. This process effectively highlights the specific portions of the images that have been changed. This was received well and we’ve had some great feedback on the new feature and suggestions for where we might take it in the future. So far so good.

However …

Limitations of SVG markup integration in PDFs

When we came to add the feature to other products in our suite, we ran into a little problem. Both our DITA and DocBook Compare products add result markup that enables you to easily publish changes to a PDF, often called a redline document. Our plan was that the revised SVG change representation would complement this by showing changes to images within the PDF. Unfortunately, our initial testing left us with PDFs containing images that showed no change. This was despite being absolutely certain that the changes were present in the image before publication.

It turns out that the way we added markup in the SVG (using a CSS border style on elements) isn’t fully supported in PDF and the markup was simply ignored. So we’ve gone back to the drawing board – at least in terms of visually representing change.

Revamped SVG comparison in DITA and DocBook

Starting in DITA and DocBook Compare, our SVG compare feature now uses coloured shapes to create bounding boxes around changed SVG objects. We’ve had fun learning some (sometimes complicated) maths to calculate the size and orientation of the boxes and we’re happy with the end result. Redline PDF output now includes markup to highlight SVG image changes. And there’s also an added benefit – all of the boxes we add have ids with a consistent prefix, making it easy to modify or remove them as you see fit.

We will continue to improve the SVG comparison capabilities and if you have any requests for improvements, we’re always keen to hear them. Head over to the support portal and let us know what you think.

SVG comparison is available in our latest releases of DITA Compare – 11.2 – and DocBook Compare – 9.2. Keep an eye out for release announcements with improvements in the future!

Keep Reading

Move detection when comparing XML files

DeltaXML introduces an enhanced move detection feature that provides a clearer insight of how your content has changed.

Configuring XML Compare for Efficient XML Comparison

Define pipelines and fine-tune the comparison process with various configuration options for output format, parser features, and more.

A Beginner’s Guide to Comparing XML Files

With XML Compare, you receive more than just a basic comparison tool. Get started with the most intelligent XML Comparison software.

Introducing Character By Character Comparison

Find even the smallest differences in your documents with speed and precision with character by character comparison.

Effortlessly Manage Known Differences During Conversion Checks

Focus on unknown differences with DeltaXML's new ignore change feature for ConversionQA.

Mastering Complex Table Comparisons Within Your Technical Documentation

Our software excels at presenting changes in complex tables and technical content.

Enhanced Redline Output with Self-Hosted DITA Comparison via Integrated REST API

DITA Compare's powerful redline output and REST API integration is trusted globally.

Simplifying Your JSON Management Experience with DeltaJSON

DeltaJSON simplifies JSON data management with the introduction of an NPM package.

Never miss an update

Sign up to our newsletter and never miss an update on upcoming features or new products