Soft validation in an editor environment: Schematron for non-technical users

Soft validation in an editor environment: Schematron for non-technical users

Coming Friday our homebrewer and craft beer lover Martin will present his paper on Soft validation at XML Prague. Here, a sneak preview by means of the introduction and conclusions. There’s a lot in between so do come and join us there!

Introduction

FontoXML is an editor for XML content, used by non-technical authors. At this moment, FontoXML offers a standard editor for DITA 1.3 and can be configured to support any schema including TEI, JATS, Office Open XML and a number of DITA specializations.

Since non-technical authors have no knowledge of XML or the schema, they will not understand nor be able to fix invalid documents. Therefore we guide the author to prevent them from creating invalid documents; we ensure loaded documents remain valid at all times. Valid in this context means both well-formed (no unclosed tags), but also schema-valid (titles can not contain list items).

However, some restrictions should not always be enforced. Constraining the length of a title will destroy usability, because typing text in it will suddenly be disabled. Additionally, schema restrictions may need to be relaxed in various use cases. For these reasons, we have implemented soft validation in the editor, which essentially are recommendations instead of requirements.

Conclusions

The requirements of a soft-validation engine operating in a dynamic environment such as an editor are different from one reasoning over static documents.

Because changes in an editor are usually localized, we should not need to re-process a full document every single keystroke. Using mutation records and dynamic dependency tracking as a way to mark queries on the DOM as dirty, we can use the edits to determine a smaller set of possibly affected queries.

Soft validation is a great help in guiding authors in writing “good” content.

By considering the soft-validation report as a “to do list”, an author can keep track of their progress. By providing quick-fixes, the author always knows what to do and can efficiently resolve most content issues.

About Martin

Martin Middel is a product developer at FontoXML. He has graduated on machine learning and has been working on FontoXML since it all began. In his spare time, he loves brewing and tasting craft beer.

Taeke Kuyvenhoven
We will be happy to give you an online demonstration of FontoXML. Please leave your details below and I will contact you as soon as possible, or feel free to contact me directly at +31 70 3191923.
FontoXML