The way that Schematron is used is that first the rule set is converted into a XML stylesheet (XSL), and then the dataset to be validated is transformed against the stylesheet to produce the validation report (see Basic Usage). A strength of Schematron is its ability to use XPath expressions to select XML instances, therefore a good understanding of XPath is essential (see XPath Links).
- Schematron uses assertions (used to detects errors) and reports
(used to report affirmative instances).
- Schematron supports workflows in which distinct groups of rules are
active; these are known as phases.
- Schematron supports the reporting of diagnostic information.
Here is an example using the Xalan XSLT processor:
# Xalan SCHEMATRON_SOURCE.sch ./schematron/iso_svrl_for_xslt1.xsl >
SCHEMATRON_AS_XSL.xsl
# Xalan FILE_TO_BE_VALIDATED.xml SCHEMATRON_AS_XSL.xsl > VALIDATION_REPORT.svrl
- ISO Schematron Tutorial
- Schematron: validating XML using XSLT
- Introduction to Schematron
- The top three mistakes in Schematron
- API for ISO Schematron Skeleton
- Probatron4j - Java Schematron implementation uses custom XPath functions coded in Java
- XPath Abbreviated Syntax
- XPath, XQuery, and XSLT Functions
- XPath Examples
- XPath Developer Eclipse Plugin An environment to test XPath expressions