Schematron is a language for making assertion about patterns found in XML document. QuiXSchematron is an implementation of Schematron for XML streams that compiles schema into X-Fun.

Try it for free on the Test Machine.

Key Features

  • Very large coverage since it is based on QuiXPath.
  • Produce the assert/report messages with the id of the context node.
  • Streaming implementation of an all distincts function.

Key Benefits

  • Receive assertion/report messages before the full data is retrieved.
  • Schematron processing using X-Fun. No streaming XSLT processor is required.
  • QuiXSchematron is the unique implementation of Schematron over XML streams.

Which fragment of Schematron is currently supported by QuiXSchematron?

Syntactically, QuiXSchematron follows the official Schematron ISO Recommendation (even though it does not implement the full standard) . The current version of QuiXSchematron supports the following Six Basic Elements:

  • optional <title>
  • zero or more <ns prefix=”???” uri=”???” /> giving the namespaces and prefixes used for the XPaths
  • one <pattern>, which contains
  • several <rule context=”???”> where the context attribute is an XPath expression without backward axis. Its content is a mixed of
    • <assert test=”???”> where the test attribute is an XPath location, and which contains an assertion message in plain language.
    • <report test=”???”> where the test attribute is an XPath location, and which contains a reported message in plain language.


The following XML document describes a list of Person with their Title, Name and Gender. More over, when possible, the Id of the Mother is stored.

 <Person Title="Mr" Id="28" >
  <Mother Id="36"/>

QuiXSchematron is able to evaluate the two following schema over an XML stream:

  1. The context element (Person) should have two children and an Id attribute. The local name (label) of the first child should be Name. Its content should not be empty.

    <rule context="Person">
     <assert test="count(*) >= 2">…</assert>
     <assert test="@Id">… </assert>
     <assert test="*[1][self::Name]"> … </assert>
     <assert test="Name/text()"> … </assert>
  2. Check that the mother is in the list. Here, there is a join between the Id the context element (Person) and the Id of any Person in the list.

    <rule context = “Person/Mother”>
     <assert test="@Id = .. / .. /Person/@Id ">

Learn More

Demonstration of QuiXSchemamtron