History | Edit

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 Editor is able to extract and use the embedded Schematron Quick Fixes. To make the embedded Schematron Quick Fixes available, follow these steps:
  1. Define a validation against a schema.
  2. For the Schema type, choose XML Schema or Relax NG.
  3. Select 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: For more extensive examples, see our samples in the [OXYGEN_INSTALL_DIR]/samples/schematron folder.