Schematron info from XMLExpertise.com

One technology you may not have heard much about is a pattern based validator called Schematron, developed by a fellow named Rick Jelliffe. The schematron is implemented using a set of XSL stylesheets that you can run in your favorite XSLT engine. However, his company Topologi.com also makes a free GUI tool available for those who want to play around with Schematron, as well as W3 Schemas and XSLT Stylesheets. This tool makes use of the MSXML parser+stylesheet processor. We here at XMLExpertise.com find this tool very useful!

We are now making available slides from a recent presentation about Schematron, given by Scrutable CTO Stu Baurmann, entitled Scheming with Style

This presentation (delivered at the XML Austin User Group and the Lone Star Software Symposium) discusses how Schematron is useful as a complement to the W3 XML Schema approach.

Thanks to Michael Yuan for producing the PDF rendering (here's his home page!).

Maybe even more interesting than the presentation are the examples Stu used. Here they are in a usable form:

  • trainSystem.xml - A basic xml file describing <Train>s on <Track>s. Some of the train's <Width>s don't match their track <Width>s. This is what Schematron detects for us.
  • pure_train_schematron.sch - A schematron schema that detects track/train width mismatches.
  • embedded_train_schematron.xsd - A W3 Schema with the above schematron embedded inside it. This hybrid schema uses W3 Schema features to detect data typing errors (e.g. bad <Width> units).
  • trainSystem_feet.xml - A modified version of trainSystem.xml that has bad <Width> units ("feet ") for one of the <Train>s. This produces another error when verified using the .xsd schema above.
  • sillySystem.xml - A modified version of trainSystem.xml that includes a "trainCount" attribute on each track that should match the actual number of embedded <Train>s.
  • silly_schematron.sch - A schematron schema that reconciles the <Track>'s trainCount attribute with the actual number of embedded <Train>s.

This site contents © 2001-2005 by Scrutable Systems, Inc. Please send all questions and comments to xmlexpertise AT scrutable .com