|Schematron is an ISO/IEC Standard.
|Mature public implementation
|Much tutorial material on the WWW
|Uses by Government and International Agencies||
|Uses by Government and International Agencies (Europe)||
|Uses by Industry and Consortia|
|Used to enforce Naming and Design Rules or Methodologies|
Under the Hood
The 'Skeleton' implementation of ISO Schematron at Schematron.com is a four-stage XSLT pipeline. The first two stages are macro-processors and only necessary if expert features are being used.
The basic processing now looks like this, as a shell script or BAT file:
xslt -stylesheet iso_dsdl_include.xsl theSchema.sch > theSchema1.sch xslt -stylesheet iso_abstract_expand.xsl theSchema1.sch > theSchema2.sch xslt -stylesheet iso_svrl_for_xsltn.xsl theSchema2.sch > theSchema.xsl xslt -stylesheet theSchema.xsl myDocument.xml > myResult.xml
2010-04-21 - Include preprocessor now reports some common XPath errors at compile time
2010-04-15 - Distibution now includes Dutch and Czech localization. Distribution now includes ISO Schematron versions of Eddie Robertsson's stylesheets for extracting embedded Schematron patterns from XSD and RELAX NG schemas.
Updated version of Schematron for Ant released (Java JAR file, beta). This allows ISO Schematron and Schematron 1.5 validation from an ANT task, with many options available.
2010-04-14 - The ISO Schematron here is now available as two distributions:
- iso-schematron-xslt1.zip is for XSLT1 processors
- 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.
2009-05-18 - minor fix of XSLT2 version needed for a certain XSLT engine (tunnel)
2009-02-19 - release
2009-02-25 - update to resolve XSLT1 variable scope issue
2009-03-18 - update for minor fix, + fr and de translations