A language for making assertions about the presence or absence of patterns in linked XML documents.
Schematron: A Language for Validating XML
Erik Siegel’s new book is a systematic and thorough introduction explaining all elements and attributes of Schematron with common ways to use them.
Developers will appreciate the large XPath primer, together with appendixes on Schematron, Namespaces, SVRL and Schematron Quick Fix. It follows the most recent version of the ISO Standard and is geared for XPath3.
A website for all things Schematron.
Schematron is used for business rules validation, data reporting, general validation, quality control, quality assurance, firewalling, filtering, constraint checking, naming and design rules checking, statistical consistency, data exploration, transformation testing, feature extraction, house-style-rules checking.
It is use in sectors such as finance, health, aerospace, homeland security, tax, scientific computing, and publishing.
NEWS: Schematron has helped our fight against COVID: in the US, real-time data on Emergency Medical admissions and causes is collected by National Emergency Medical Services Information System (NEMSIS). Schematron has allowed them a practical route to having subject-matter experts specify rules in plain English, then developers implement exactly those rules. Read their excellent , or see their online . (Hint: try “PA”)
There are two Open Source implementations of Schematron for XSLT at GitHub:
Search the web for implementations of Schematron in your language of choice: from Ant to Scala; these typically host the XSLT scripts and look after housekeeping.
ISO Schematron is an , in the sense of the IEEE, ISOC, W3C, IETF, IAB, Foundation for Free Information Interchange (FFII), Free Software Foundation Europe (FSFE), requiring a formal, open process and unencumbered use.
In the long run, I think Schematron may well be the XML project’s greatest technical
legacy to the world.
Simon St Laurent, Technical Journalist and O’Reilly Editor, xml-DEV list, 19 May 2016
Schematron is remarkable in how few questions people have about it. This is because the language is so small, and many questions people might have are actually XPath questions.
To assist users, implementers and evaluators, Schematron.com will be hosting two projects (under preparation):
Dave Pawson's Schematron Tutorial
The "Schematron Open Documentation" Project
It may seem impossible, or mad, to attempt to convert XSD to Schematron; or, rather, to partly implement XSD in XSLT 2 through Schematron. In 2007-2008, JSTOR funded an exploratory project at Allette Systems to write such a converter from XSD to Schematron, for a large subset they specified.
One good bubble deserves another. If RAN is a markup language which can be divided into separate fragments and parsed by separate threads, it must also need a validation language that also can work on arbitrary segments without requiring content.
Feature extraction discovers some general property of an XML document, to direct subsequet processing. Is it a New Zealand document or a Fijian? Does it use the old tags or the new ones? Is it a tax return with no income? Is it a form where the person claims to be both single and married? This can certainly be done with Schematron and SVRL.
"All documents, views and metadata at all significant levels of granularity and composition should be available in the best formats practical from their own permanent hierarchical URIs.”