Tutorials on Schematron

Introduction

Schematron is an XML-based language for validating XML instance documents. Schematron is used to make assertions about data in an XML document. Schematron is used to express operational and business rules.

Schematron is an ISO standard.

Use Schematron to verify data interdependencies (co-constraints), check data cardinality, and perform algorithmic checks. A co-constraint is a dependency between data within an XML document or across XML documents. Cardinality refers to the presence or absence of data. An algorithmic check determines data validity by performing an algorithm on the data.

Invitation to Contribute

These tutorials teach the core concepts of Schematron. However, there are some aspects that are not covered, such as the use of abstract patterns and rules, <report> versus <assert>, and performance of the different Schematron tools. I invite you to create a short tutorial on some aspect of Schematron and I will incorporate it here, and, of course, you will be acknowledged as the author. (Please format it as an S5 document)

Navigating the Tutorials

The tutorials are HTML documents. Some of them appear as slide shows. I am using S5 for this.

To move forward in the slide show click on the right arrow key. To move backward, click on the left arrow key. Here are other ways to navigate the tutorials

Tutorials

I recommend reading the tutorials in the order listed. Although they are mostly independent, occasionally I reference stuff from earlier tutorials.

  1. Two Types of XML Validation
  2. Usage and Features
  3. Overview
  4. Co-Constraints
  5. Cardinality
  6. Algorithmic Validation
  7. Assertions
  8. Diagnostics
  9. Namespaces
  10. Progressive Validation
  11. Dynamic Validation
  12. ISO Schematron
  13. Variables
  14. Using XPath 2.0
  15. Traceable Constraints
  16. Naming Schemas

I recommend viewing the tutorials using the Firefox browser.

George Bina has a nice Flash video of using Schematron in Oxygen XML.

Download the Tutorials

You can download the tutorials, including all the examples and lab exercises (zip file, about 1MB).


Printing the Tutorials

This is a nice cover page.

The tutorials should be printed in Landscape orientation.

Contact Info

I hope you enjoy these tutorials. If you find any typos please send me an email and let me know. In fact, if you have any comments, drop me a note. Here's my contact information:

Roger Costello
202 Burlington Road
Bedford, MA, 01730-1420 U.S.A.
781-271-6439

Change Log

Interested in seeing how this tutorial is evolving? See the change log.

Tags

Last Updated: June 1, 2007