SeaDataNet The EU Pan-European Infrastructure for Ocean and Marine Data
Management use Schematron to "quality control the
maintenance metadata validation" in particular for "field content verification.

The Schematron-Love-In mail list is a mail list dedicated to Schematron, hosted courtesy of eec.net. UPDATE: This list seems to be
available again, after a period of dormancy in 2009, and its archives are available.

In the early 2000s, a different Schematron-Love-In mail list was hosted at sourceforge.net. This list is now closed due to spam but archives may be available. (Update: it seems to be accepting posts but should not be used.)

Most Schematron questions relate to XPath.
The XSLT list at Mulberry is an excellent source of expertise.

iso-schematron-xslt2.zip is for XSLT2 processors,
such as SAXON 9. This version has several enhancements and
experimental extensions, such as localized error messages,
Schematron and SVRL properties, and the ability to specify
that a pattern should be applied to some external documents,
dynamically constructed by an XPath. (The experimental enhancements
are to trial suggestions for an updated version of ISO Schematron.)

The distributions feature the new pipeline arrangement: Schematron
validation now takes four XSLT stages, but they are all similar.
1) Process inclusions. 2) Process abstract patterns. 3) Compile
the schema. 4) Validate.

I am moving to this distribution system, in order to make life easier for downloaders to figure out what is needed.

It includes full support for ISO Schematron including abstract patterns,
as well as support for community-requested features on trial for the the
updated standard, in particular XSLT2 support.

Enhancements in this version include features for smarter SVRL output, and parameters for better internationalization, and better integration with toolchains. As well there is better support for XSLT2
and the preprocessors to provide full support of ISO Schematron.
(I believe it is a 100% coverage of the ISO standard now, but it also
allows various experimental and requested extensions to gain experience
for an updated version of the ISO Standard.)

Experimental: let expressions can contain element content directly
as an alternative to the value attribute. This is more like XSLT, and allows
factoring out of systematic data into lists: previously this could only
be done by having an external document, which is overkill and cumbersome
sometimes.

Please send comments and fixes. Implementers of metastylesheets
should note that the skeleton API signatures have slightly changed:
in particular, to support properties on rule, assert and report elements.
Other metastylesheets are available
elsewhere on this site. If you want to make your own meta-stylesheet or
adapt one here, see this documentation.

Schematron is an ISO standard which has uptake in
many industries, notably the financial sector (especially insurance), governmental record exchange,
and technical and reference publishing.

Is Schematron a replacement for XSD?

While Schematron can express the same constraints that can be expressed
in grammar-based schema languages such as XSD (W3C XML Schemas),
RELAX NG and DTDs, very often it is used as an adjunct to supplement
the intrinsic weak points of grammars if necessary, or to express constraints
that may belong to a different conceptual layer such as business rules.

What makes Schematron unique?

Schematron is very simple (only five important elements),
very powerful (it can express many kinds of constraints impossible in other
schema languages), very diverse (it can be used for business rules, reports
as well as the kinds of static constraints usually associated with schemas.)

It places particular emphasis on capturing constraints in human language
assertions and generating appropriate human-language diagnostics: this allows
a level of user-friendliness not available in other schema languages.

As well, the phase concept allows constraints to be grouped and particular
sets of groups checked, rather than all constraints: this can be used
for progressive validation (e.g. coarse-grain validation first, validate
links next, and so on), or user-role selectable validation, or multi-version
schemas.

Schematron schemas can validate co-constraints (if some
data is one value, some other data should be constrained to certain values)
and even jump across links and between XML documents to check constraints.
The diagnostics facility allows multi-lingual schemas.

What implementations are available?

The major implementation is the skeleton implementation
at Schematron.com. This is an open source implementation which is quite
mature, having been in continuous use and development since early 2000.
This implementation uses XSLT1 and XSLT2 and can run in any environment that can
invoke XSLT transformations.

However, while ISO Schematron can (and
in some cases has) been implemented
directly, for example in languages such as .NET or Java, often the
XSLT implementation is well optimized. The SAXON 9 XSLT process is
recommonded, however the skeleton has been tested with many other XSLT
engines.

How is Schematron used?

The main implementation is the
iso_schematron_skeleton implementation from www.schematron.com uses XSLT1 or XSLT2, which
allows customized outputs to any format including text using metastylesheets
and provides several such customizations (the iso_svrl stylesheet being one of them. It is straightforward for an XSLT programmer
to integrate Schematron into a new system.

The ISO Schematron standard also specifies an XML language called SVRL
(Schematron Validation Report Language) and this is becoming increasingly
popular to represent the output from a validation (by default Schematron
implementations do not stop at the first error as grammar-based validators
do) so the SVRL report can show errors throughout the
entire document. This SVRL report can the be used by further application or functions.

Is Schematron tied to XSLT 1.0?

By default, Schematron uses the XPath language as used in XSLT 1.0, and
is typically implemented by converting the schema into an XSLT 1.0 script
which is run against the document being validated. However, ISO Schematron
also allows XSLT 2.0 to be used, and this is becoming an increasingly
popular choice because of the extra expressive convenience of XPath 2.0:
a different skeleton is available for this.

What about Schematron 1.5?

Schematron 1.n were the original pre-standard version of Schematron from
Academia Sinica, Taiwan. Schematron 1.6 was the last version of that line,
and the ISO Schematron implementation has taken over. Schematron 1.n and
ISO Schematron use different namespaces, but a Schematron 1.n schema can
be converted into an ISO Schematron schema with minimal changes. Schematron
1.n is now obsolete and the Schematron 1.n skeleton is no longer maintained;
ISO Schematron is the appropriate choice for new projects.

News

News

March 2010 - New release of Schematron validator code.
New release of Schematron for Ant task.

March 2010 - Final editor's draft of ISO Schematron second edition delivered to ISO/IEC JTC1 SC34 WG1 for deliberation

July 2009 - Probotron open source runner for ISO Schematron for Java and .NET released. Alex Brown at the helm.

May 2009 - XMLBlueprint XML Editor version 7 has been released. Among the new features is support for ISO Schematron - Validation and XML Completion, including
a Schematron editor. Documents can be associated with Schematron
schemas using a processing instruction <?blueprint schematron="book.sch"?>

April 2009 - Oxygen editor supports ISO Schematron, including
the XSLT2 binding. It seems to provide good access to many of the options in the scripts. It continues to support Schematron 1.5 as well. Documents can be associated with Schematron schemas using a processing instruction <?oxygen SCHSchema="file:/C:/work/personal.sch" type="xml"?>

March 2009 - beta version of XML Schemas to Schematron converter
(a pipeline of XSLT2 scripts with a sample ANT script) available.

February 2009 - candidate release for stable implementation!

July 2008 - new version of the beta implementation. The next release will not
be marked beta!

October 2007 - new versions of the beta implementation
of ISO Schematron are available with minor changes only.
From this version on, there will be two versions of the skeleton implementation:
one for the SAXON XSLT2 processor and one for XSLT1 and EXLST processors.

February 2007 - Beta Ant Task for Schematron
available. Documentation (PDF)
also available. The project is sponsored by Allette Systems and Topologi
Pty. Ltd. and will be available under an OSS license. Programmers:
Christophe Lauret and Willi Ekasalim.

January 2007 - The beta implementation
of ISO Schematron is now available. This XSLT-based
implementation is the successor to the Schematron 1.5 stylesheets in
wide-spread use (and follows the same "meta-stylesheet" design pattern.)
It implements almost all ISO Schematron (only abstract
patterns are yet to be implemented) and is the result of collating years
of suggested improvements from Schematron users; an implementation status
document is available. The implementation
is structured as a "skeleton" that allows output functions to be overridden
by customized validators; basic API documentation is available.

January 2007 - Accompanying the beta release of ISO Schematron
skeleton is several validators that produce customised output.
Schematron Terminator is a validator
that halts with an error code when the first error is detected.
Schematron SVRL is a validator that
generates Schematron Validator Report Language XML documents, which
are specified by the ISO Schematron standard. Notes on the page
detail a technique for using a Schematron schema to test
SVRL documents, and on how the new flag attributes can be used.

January 2007 - ISO SVRL (Schematron Validation Report Language)
implementation now available from this site. SVRL is an XML language
to present the results of validating with a Schematron schema. It can
be used for testing implementations, benchmarking, and for collecting
validation data to be onsent to other formatting or reporting stages.
SVRL is Annex D of ISO Schematron.

November 2006 - ISO Schematron specification now available free from ISO
under Publicly Available Specification program.

July 2006 - Quote from Microsoft's Program Manager for XML Standards Mike ChampionI encourage people who hit the wall
with XSD in the Microsoft environment to try out Schematron constraints,
use the reference XSLT implementation, and see if that works for them.

February 2006 - Announcement of SchematronWiki, a wiki (informal collababorative web-bsed set of linked
information pages) for Schematron.

February 2006 - Notice received from ISO secretariat that final editorial
changes have been accepted, national votes in order. Expect final acceptance
and publication in April.

August 2005 - Final text and reference implementation of ISO Schematron in preparation
(delay due to illness of editor)

July 2005 - ISO Schematron accepted for ISO Standard after final internalational vote.
ISO SC34 proposes that the ISO Schematron specification should be freely available
(being based on a previously existing technology.)