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

Managing Risk in Legal Documentation

/
Proactively addressing compliance, accuracy, and security risks in legal documentation is essential to protect from costly errors.

Ensuring Accuracy in Legal Documentation

/
Efficient document comparison and merging can drastically improve accuracy, collaboration, and compliance for legal teams.

Introducing HTML Compare

/
HTML Compare is your go-to for tracking, comparing, and managing HTML content changes with ease, offering clear visual highlights and customisable settings.

Introducing Subtree Processing Mode for Greater Flexibility

/
A new feature that lets you control how content is compared by processing sections as either text or data.

DeltaXML’s Smart Comparison Report

With clear insights and detailed analysis, DeltaXML's new Comparison Report makes fine-tuning configuration easier than ever.

Solving Common Challenges with Inaccurate Document Management

Discover practical strategies to overcome common challenges in regulated industries.

How to avoid non-compliance when updating technical documents in regulated industries

Navigate the challenges of updating technical documents in regulated industries.

Built-in XML Comparison vs Document Management Systems (DMS)

Compare using specialised XML comparison software versus a DMS in regulated industries.

How Move Detection Improves Document Management

Learn how move detection technology improves document management by accurately tracking relocated content.