Embed Schematron Quick Fixes in Relax NG or XML Schema
Schematron Quick Fixes can be embedded into an XML Schema through annotations (using
the
appinfo
element), or in a schematron rule embedded in the RELAX NG Schema.
For more information about embedding schematron in XML Schema or Relax NG, see XML Schema or RELAX NG with Embedded Schematron Rules.
Oxygen XML Developer plugin is able to extract and use the embedded Schematron Quick Fixes. To make the embedded Schematron Quick Fixes available, follow these steps:
- Define a validation against a schema.
- For the Schema type, choose XML Schema or Relax NG.
- Enable the Embedded schematron rules option.
Example: Embedded Schematron Quick Fix in XML Schema
<xsd:appinfo> <sch:pattern> <sch:rule context="..."> <sch:assert test="..." sqf:fix="fixId">Message.</sch:assert> <sqf:fix id="fixId"> ...... </sqf:fix> </sch:rule> </sch:pattern> </xsd:appinfo>
Example: Embedded Schematron Quick Fix in Relax NG
<sch:pattern> <sch:rule context="..."> <sch:assert test="..." sqf:fix="fixId">Message.</sch:assert> <sqf:fix id="fixId"> ..... </sqf:fix> </sch:rule> </sch:pattern>
Tip
[OXYGEN_INSTALL_DIR]/samples/schematron
folder.