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.
- 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.
- 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" >
QuiXSchematron is able to evaluate the two following schema over an XML stream:
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.
<assert test="count(*) >= 2">…</assert>
<assert test="@Id">… </assert>
<assert test="*[self::Name]"> … </assert>
<assert test="Name/text()"> … </assert>
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 ">