Schematron QuickFix (SQF) is a simple language that allows the Schematron developer to define actions that will correct the problems reported by Schematron rules. SQF was created as an extension of the Schematron language. It was developed within the W3C "Quick-Fix Support for XML Community Group". The first draft of the Schematron Quick Fix specification was published in April 2015, second draft in March 2018, and it is now available on the W3C Quick-Fix Support for XML community group page.
The actions defined in a Schematron QuickFix are called operations. There are four types of operations defined in the SQF language that can be performed on an XML document: add, delete, replace, and string replace. The operations must perform precise changes in the documents without affecting other parts of the XML document.
Example 1. A Schematron Quick Fix that adds a 'bone' element as child of the 'dog' element
<sch:rule context="dog"> <sch:assert test="bone" sqf:fix="addBone"> A dog should have a bone.</sch:assert> <sqf:fix id="addBone"> <sqf:description> <sqf:title>Add a bone</sqf:title> </sqf:description> <sqf:add node-type="element" target="bone"/> </sqf:fix> </sch:rule>