© 1999–2021 Rick Jelliffe. PageSeeder and hosting generously provided by Allette Systems (Australia)
A language for making assertions about the presence or absence of patterns in linked XML documents.
New Book
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.
The 260 page XML Press book is available in paperback; electronic versions are available in ePub, mobi (Kindle), and PDF. Release announced with overview: XML.COM (November 2022.)
A book review by Rick Jelliffe is here.
Erik also introduces Schematron in two YouTube videos from Declarative Amsterdam (1 and 2) Nov 7-9, 2022.
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 Schematron Guide, or see their online Library of national and state-level Schematron Rules. (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.
As well, several systems are available which support Schematron embedded in other Schema languages: for example, the Apache Daffodil system allows Schematron embedded in the XSD-subset DFDL.
The international standard is ISO/IEC 19757-3. Available for $300 AUD.
The schemas for Schematron from the international standard are Open Source/Open Standards: they are available at this GitHub site.
ISO Schematron is an open standard, 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
A
The "Schematron Open Documentation" Project
Let's develop an unofficial, free and openly-available document that explains the technology of ISO Schematron!
(For discussion on how Schematron Open Documentation relates to Open Standard, see Procurement Best Practise for an Open Standard of Schematron.)
xsd2sch
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.
The techniques we developed were detailed in a long series of articles on the O' Reilly website: Converting XML Schemas to Schematron, which are now collected here with the related articles from the same time.
The XSLT2 code is available on GitHub under the MIT license.
Current
Recent
Ancient
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.
Apatak has some similarities in its pairwise approach to 2002's one-element Hook schema language.
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.
However, Feature Grammars provides a simpler and more direct language and XSLT for it.
"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.”
Updates
Issues
© 1999–2021 Rick Jelliffe. PageSeeder and hosting generously provided by Allette Systems (Australia)