Defining Schematron Quick FixesEdit online
You can define and customize Schematron Quick
Fixes directly in the current Schematron file or in a separate Schematron
file. The Schematron Quick Fixes are an extension of the Schematron language and
they allow you to define fixes for Schematron error messages. You can refer the Quick
Fixes from the assert or report elements in the
values of the sqf:fix attributes.
Defining a Schematron Quick Fix
- ID - Defined by the
idattribute from thefixelement and must be unique in the current context. It is used to refer the Quick Fix from areportorassertelement. - Name - The name of the Quick Fix is defined by the
titleelement. - Description - Defined by the text in the paragraphs (
p) of thedescriptionelement. - Operations - The following basic types of operations (elements) are
supported:
<sqf:add>Element - To add a new node or fragment in the document.<sqf:delete>Element - To remove a node from the document.<sqf:replace>Element - To replace a node with another node or fragment.<sqf:stringReplace>Element - To replace text content with other text or a fragment.
The assertion message that generates the Quick Fix is added as the
description of the problem to be fixed. The title is
presented as the name of the Quick Fix. The content of the paragraphs
(p) within the description element are presented in the
tooltip message when the Quick Fix is selected.
Additional Elements Supported in the Schematron Quick Fixes
<sqf:user-entry>- This element defines a value that must be set manually by the user. For more information, see User Entry SQF Operation.
<sqf:call-fix>- This element calls another Quick Fix within a Quick Fix.
The called Quick Fix must be defined globally or in the same Schematron
rule as the calling Quick Fix. A calling Quick Fix adopts
the activity elements of the called Quick Fix and should not include
other activity elements. You can also specify which parameters are sent by using the
<sqf:with-param>child element. <sqf:group>- Allows you to group multiple Quick Fixes and refer them from an
assertorreportelement. <sqf:fixes>- Is defined globally and contains global fixes and groups of fixes.
<sqf:copy-of>- Used to copy the selected nodes that are specified by the
selectattribute. The element with its attribute is treated as anxsl:copy-ofwith aselectattribute, as defined in the XSLT specification. <sqf:param>- Defines a parameter for a Quick Fix. If the parameter is defined as
abstractthen thetypeand default value should not be specified and the fix can be called from an abstract pattern that defines this parameter.
Other SQF Notes
sqf:default-fix attribute is ignored in Oxygen XML Editor plugin.For more details on editing Schematron Quick Fixes, go to: Schematron Quick Fix Specifications