Schematron rules can be embedded into an XML Schema through annotations (using the
<appinfo> element), or in any element on any level of a RELAX NG Schema
(taking into account that the RELAX NG validator ignores all elements that are not in the
RELAX NG namespace).
Oxygen XML Author Eclipse plugin supports Schematron validation schemas and it is able to extract and use the embedded rules.
<?xml-model href="percent.xsd" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?><?xml-model href="percent.rng" type="application/xml"
schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="percent.rng" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?>The second association validates your document with Schematron rules extracted from the RELAX NG Schema.
<xsd:appinfo>
<sch:pattern>
<sch:rule context="...">
<sch:assert test="...">Message.</sch:assert>
</sch:rule>
</sch:pattern>
</xsd:appinfo>
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:sch="http://purl.oclc.org/dsdl/schematron" >
<sch:pattern>
<sch:rule context="...">
<sch:assert test="...">Message.</sch:assert>
</sch:rule>
</sch:pattern>
<start>
..............
</start>
</grammar>