(If you have have news about Schematron or
similar schema languages, please email
Rick Jelliffe ricko (at) topologi.com
News 2006
November
- ISO Schematron now available from ISO to purchase (paper version)
or online for free for limited use, under Publicly Available Specification
program
- Schematron finds increasing use. Examples from UK include
Lloyds of London insurance markets, UK Health Department,
UK Police Services (more than 45 million records). Other notable
adoptees include Japanese government and US ACCORD insurance.
News 2005
February
January
- Schematron 1.5 validation support added to
Oxygen XML editor
News 2004
- The final committee draft of ISO Schematron is now
available at SCHEMATRON.COM,
a website set up to provide material concerning the International
Standard Schematron.
- Daniel Cazzulino to speak All about Schematron
at Applied XML Developer's Conference (DEVCON) October
- Rick Jelliffe to give keynote Method and Opportunity
at XML Open 2004, Cambridge University, UK,
September
- The Committee Draft of ISO Schematron is available
here in PDF. For an ASCII version, here is Google's
transcription. The draft International Standard,
with several improvements, is expected to be prepared and
available in October 2004. The editor, Rick Jelliffe,
would like to express his appreciation for the Open Source
implementers who have used the drafts to implement Schematron
and provide feedback, and to the reviewers from the international
standards bodies for their careful scrutinization.
- Scimitar
is a Python implementation of draft ISO Schematron
- For .NET users, Schematron.NET
is an open source implementation at Source Forge.
- IBM have added Schematron to their
Alphaworks technology
Business Integration Information Conformance Statements.
- The JAXEN XPath engine for Java may be
optimized for
better Schematron performance.
- A JUnit-related open source project
Schema Unit Test
allows Schematron schemas.
- Open GIS (Geographical Information
Systems) has added Schematron as a constraint language
to their
Geography Markup Language.
- Topologi Professional Edition
is an analytics and reporting tool,
including editor, that allows Schematron validation of XML and SGML documents.
Multiple documents can be validated in batch.
Document sets can be sampled, and a Schematron "usage schema"
generated, to allow testing that new documents have the same
structure as previous documents. Schematron validation is also possible
from the context-sensitive tree editor, and the markup editor.
- Microsoft mulling putting Schematron into Longhorn: why not?
News 2003
- Article
An Introduction to Schematron by Eddie Robertsson,
who implemented the widely used free Schematron/DTD/RELAX NG/WXS
validator from Topologi.
- XML Journal publishesulti-part article from XML Spy people
on how to integrate XMl Spy and Schematron.
- WebMethods adds proprietary XPath assertions to API,
and reference Schematron in MSDN article as the standard manner.
-
Jing is a high-quality validation library from the famous
James Clark, who was the technical lead on XML, editor of the Xpath
and ISO DSSL specifications, co-inventor of the RELAX NG schema language,
and developer of some of the most popular Open Source
softtware libraries: sgmls, nsgmls (SP), xt, xp, jade.
This library provides support for RELAX NG (compact and full syntaxes),
Schematron, WXS datatypes, NRL adn even WXS (through Xerces).
May
- Topologi announced Validating Proxy, which allows Schematron and WXS valdiation
of incoming data to Web Services or web services.
- Rick Jelliffe announces beta versions of Schematron 1.6
implementation. The software is a new
skeleton, a new
preprocessor (before the skeleton),
and a new
http://www.topologi.com/resources/tmp/schematron-report-portable1-6.xsl">
report tool.
News 2002
September
- Schematron.Net is an open source, high-performance
implementation of Schematron for the .NET platform by
Daniel Cazzulino. This implementation is interesting because
it does not use XSLT but C#. Daniel reports that it seems
to be about 50% faster than the fastest XSLT engines.
- Topologi Collaborative
Markup Editor version 1.0 released, with free evaluation
downloads. The editor supports Schematron validation and phases,
as well as embedded Schematron in RELAX NG and W3C XML Schema.
From a validation POV it it also interesting because it supports
"feasible" validation (of DTDs and RELAX NG schemas).
August
- Schematron scores better than any other schema language:
results of study by respected authorities!
XML 2001 Schema Language Comparison Town Hall
- Revised
Schematron 1.5
specification corrects errors, provides
roadmap for ISO Schematron.
June
May
- Implementation of Schematron available for PHP
at http://phpxmlclasses.sourceforge.net/
- Schematron moves closer to ISO standardization.
See article on DSDL at www.dsdl.org/ and also another
article
- Article Filling in the Gaps with Schematron
on XML.COM by Bob DuCharme on Schematron.
- Schematron featured in three papers at
XML Europe 2002 Conference in Barcelona:
a comparison of Schematron and XCSL,
a disussion on progressive validation,
and a discussion on Schema Languages.
Before May
- Schematron used in Apache Cocoon project
for validating XML forms. This is a Java implementation rather than using
XSLT, and is retported to have excellent performance.
- Schematron-in-Relax supported added to Sun's
Multi Schema Validator.
(Due shifts in countries and jobs, I was not able to
maintain this list for about a year. I apologise for
this, especially for people who had news - Rick Jelliffe)
News 2001
July
June
- Release of
Topologi Schematron Validator,
a free Windows GUI-based tool for running Schematron validations over multiple files.
Also supports DTDs and W3C XML Schema. Highly configurable, to
allow experimentation and development of schemas.
- Part fo the same release is updated version of most of
the publically-available Schematron schemas, and improved versions
of the 1.5 implementation. These will be placed on the
Schematron 1.5
website shortly.
May
April
March
- Examplotron
- WSDL page by Simon Fell includes WSDL Schema in Schematron
- Schemas by Elliotte Rusty Harold,
Conference paper from XMLOne London
(but note I think the second assert in the song example should be
something like *[position()=1][self::TITLE].)
- XML Schemas Training Course by Allette Systems includes Schematron
material
- Eddie Robertsson's XSD_Schtrn is a stylesheet for extracting schematron
schema fragments embedded as appinfo in XML Schemas <;appinfo>
elements beta.
- Miloslav Nic's zvonSchematron is an implementation of Schematron 1.5
and is accompanied by a nice test reporting system, see
Text Output. beta
February
- Schematron under consideration for project to
create A Simple Collaboration System which is directly
inspired by Doug Englebart's ideas.
Very interesting. K. Holman put them onto Schematron, it seems.
Very interesting to see where this goes.
- Schemarama
- XML Schemas, by Brad Perry, Course notes
including good Schematron overview. Note also an
assignment comparing DTD, XML Schemas and Schematron. Nice.
- Small note on
Logical Inferences from Schematron Schemas by Rick
- skeleton1-5.xsl reference implementation page,
featuring links to conformance report, basic API documentation,
sample code and sample .BAT file.
schematron-report,
schematron-message and schematron-basic
moved over from 1.3. and documentation updated.
- Good summary of exchanges on XML-DEV comparing
rule-based and grammar-based schema approaches
at XML.COM
- The Screamatron Torture Test are the results so far of Rick's
attempts to get Schematron going on 12 different
command-line XSLT implementations for Windows,
and to make the code inoffensive.
Result: MSXSL (MSXML3), SAXON and Oracle work fine.
XT, Xalan, and Sablotron can work with certain caveats.
(Note: this is not an exhaustive test of all XSLT or
Schematron features, nor of all XSLT implementations.
For example, FourThought's Python-based implementation,
which is reported to work, has not been tested yet.)
- Start at API documentation for extending the skeleton1-5.xsl
- Testing continues with Unicorn (no), Xalan for C 1 (yes
with workaround), Xalan for Java 2 (yes, with workaround).
- Alternative validation language idea
Hook may
interest some people
January
- Complete beta implementation of Schematron 1.5 by Rick Jelliffe
and collaborators
(merging code from existing implementations) available now.
- Same version works with both namespace and non-namespace
- Implements phases, diagnostics, inherited abstract rules,
value-of.
- Command-line options to select the active phase or
turn off diagnostics.
- Better compile-time error messages.
- Uses Oliver Becker's architecture, so should
be compatible with existing 1.3 meta-stylesheets.
- Extends the architecture to make available more attributes.
- Uses conservative subset of XSLT so is still compatible with
XP (providing key() is not used in schema). Also tested
on SAXON, Instant SAXON and Sablotron (OK but does not support
import yet, so metastylesheets have to be merged by hand.)
See Implementation Notes for diary of some issues.
The Schematron 1.5 Schema for Schematron 1.5 has been upgraded
to use diagnostics, phases and an abstract element to demonstrate
the usage of these. Existing 1.3 Schematron schemas should be
compatible with the new 1.5. This is a beta, please report any
problems and suggested fixes/enhancements.
- Accompanying this is
an implementation of the conformance language.
This is a meta-stylesheet for the skeleton,
and is also a good example of how to use the skeleton.
The conformance language is used to check whether
an implementation works correctly on different versions
of XSLT.
- Schematron 1.5 manual updated.
- Conformance Language for Schematron 1.5 implementations
draft available now
- Schematron 1.5 beta now being tested with XT, SAXON, Instant SAXON and Sablotron. Due for this week.
- New page design for home page at Academia Sinica (i.e. what you are reading now) with rewrite.
- Namespace URI for Schematron now locates a
RDDL Resource Directory.
- New DTD, W3C XML Schema schema and Schematron schema for Schematron 1.5.
For old news, see the old home page.
Overview
The Schematron
differs in basic concept from other
schema languages in that it not based on grammars
but on finding tree patterns in the parsed
document. This approach allows many kinds of structures to be
represented which are inconvenient and difficult in grammar-based
schema languages. If you know XPath or the XSLT expression
language, you can start to use
The
Schematron
immediately.
And it has free and open source implementations available.
The
Schematron
is trivially simple to
implement on top of XSLT and to customize.
(There are also implementations in Python and Perl)
The Schematron
allows you to develop and mix two kinds of
schemas:
-
Report elements allow you
to diagnose which variant of a language you are dealing with.
-
Assert elements allow you to
confirm that the document conforms to a particular
schema.
The Schematron
is based on a simple action:
- First, find a context
nodes in the document (typically an element) based on XPath path
criteria;
- Then, check to see if
some other XPath expressions are true, for each of those
nodes.
The Schematron
can be useful in conjunction with many
grammar-based structure-validation languages: DTDs,
XML Schemas,
RELAX,
TREX, etc.
You can even embed a
Schematron schema inside an
XML Schema <appinfo> element!
Schematron's Six Basic Elements
There are only 6 basic elements in
Schematron 1.5 which makes it very easy to learn,
especially if you already know XPaths. (There are others, but these mainly
just help construct nice user interfaces for validators.)
Here is the basic structure
- <schema xmlns="http://www.ascc.net/xml/schematron" > contains
- optional <title> then
- zero or more <ns prefix="???" uri="???" /> giving the namespaces and prefixes used for the XPaths, then
- several <pattern>, which
contain
- several <rule context="???" > where the context attribute is an XSLT expression, which contain
mixed
- <assert test="???"> where the testattribute is an XPath location, and which contains rich text expressing the statement being asserted in plain language, and
- <report test="???"> where the testattribute is an XPath location, and which contains rich text expressing the fact to be reported in plain language.
So here is a very small example. It is a mini-schema for Schematron.
<schema xmlns="http://www.ascc.net/xml/schematron">
<title>A Schematron Mini-Schema for Schematron</title>
<ns prefix="sch" uri="http://www.ascc.net/xml/schematron">
<pattern>
<rule context="sch:schema">
<assert test="sch:pattern"
>A schema contains patterns.</assert>
<assert test="sch:pattern/sch:rule[@context]"
>A pattern is composed of rules.
These rules should have context attributes.</assert>
<assert test="sch:pattern/sch:rule/sch:assert[@test] or sch:pattern/sch:rule/sch:report[@test]"
>A rule is composed of assert and report statements.
These rules should have a test attribute.</assert>
</rule>
</pattern>
</schema>
In that mini-schema, the rule element sets the context: the rule applies to any sch:schema element in a document. The rules say that there must be at least one
child element sch:pattern, at least one
child element sch:pattern with a child sch:rule
with a context attribute,
and at least one
child element sch:pattern with a child sch:rule with a sch:assert or
sch:reportwith a test attribute.
This is probably not the most useful schema: it only tells you what is wrong with an empty document rather than checking a full Schematron schema. However, it does show that there are many different kinds of schemas possible: some of them similar to DTDs and some of them very different.
Schematron lets you perform many kinds of
new validation!
Copyright 1999-2001 (C) Rick Jelliffe, Academia Sinica Computing
Centre, Taibei.
The
Schematron
software and this page are available for
any public use, under the conditions of the zlib/libpng license
(the least restrictive), but please mention our names in any
documentation or About screens for any products that uses it.
Comments, fixes and upgrades welcome: email ricko@gate.sinica.edu.tw