ISO Schematron tutorial.

An introductroy guide

Dave Pawson

Roger Costello

Florent Georges

Legal Notice
Revision History
2007-01-18T11:27:33.0ZDave Pawson

Initial Release

2007-01-20T15:19:00ZDave Pawson

Chapter 4 onwards

2007-01-22T13:51:41.0ZDave Pawson

Minor editorial changes, Thanks Florent and George. Two more chapters started.

2007-01-26T14:42:42.0ZDave Pawson

Added Schema documentation for Schematron and svrl

2007-01-28T16:51:31ZDave Pawson

Added keys chapter

2007-02-02T16:17:10ZDave Pawson

Added Test chapter, stylesheets

2007-02-14T14:59:28.0ZDave Pawson

Updated for abstract and include processing

2008-05-29T12:13:23ZDave Pawson

Updated for namespace propogation

Abstract

This document has, as its subject, an XSLT 2.0 implementation of Schematron. The aim is to enable users familiar with XSLT but unfamiliar with Schematron to gain the benefits of using another form of validation

It does not yet consider other implementations. It does diverge from the Topologi implementation at schematron.com


Table of Contents

Preface
1. Introduction
CHARACTERIZATION OF SCHEMATRON - USAGE AND FEATURES
SCHEMATRON FEATURES
ACKNOWLEDGEMENTS
2. Getting Started
3. Running Schematron
Debugging Schematron
4. Handling namespaces
5. Diagnostics
6. Phases, or validation in parts
7. Using keys for assertions
8. Abstract patterns and includes..
Includes
9. The extends element
10. Decorating the output
11. ISO implementation Stylesheets
12. Schematron Validation Report Language (SVRL)
A. Schema for Schematron
B. Schema for Schematron Validation Report Language
C. References
D. GNU Free Documentation License
PREAMBLE
APPLICABILITY AND DEFINITIONS
VERBATIM COPYING
COPYING IN QUANTITY
MODIFICATIONS
COMBINING DOCUMENTS
COLLECTIONS OF DOCUMENTS
AGGREGATION WITH INDEPENDENT WORKS
TRANSLATION
TERMINATION
FUTURE REVISIONS OF THIS LICENSE
ADDENDUM: How to use this License for your documents
General Index

List of Figures

1.1. Schematron architecture

List of Examples

1.1. General example for Schematron usage
2.1. File input.xml, the simplest input document
2.2. File input.sch, an empty Schematron file.
2.3. Check for a chapter title
3.1. Schematron Script, for windows
3.2. Schematron Script, for Linux
3.3. Schematron output
3.4. Schematron output
3.5. Using the report element
3.6. The updated input.xml file
3.7. Resultant svrl output file
3.8. A decorated Schematron file
3.9. The output report with decorations
4.1. An input document with a namespace
4.2. The Schematron file using namespaces
4.3. The resultant output
5.1. The input file modified for diagnostics, file input.diag.xml
5.2. The Schematron file for diagnostics, file input.diag.sch
5.3. The stylesheet for diagnostics, file diagnostics.xsl
5.4. The resultant output file for diagnostics
5.5. The modified output file for diagnostics, when using generate-paths
6.1. A Schematron file showing two phases
6.2. An input file to use. input.phases.xml
6.3. The output file running the docs phase
7.1. File input.keys.xml, showing a chapter and an xlink with matching names
7.2. The Schematron file for the keys example.
7.3. The resulting output
8.1. pattern syntax
8.2. An abstract pattern example
8.3. The instantiated pattern for the CALS table usage
8.4. Multiple variables in a context
8.5. A simple include example
9.1. The specification of an abstract rule
9.2. The use of an abstract rule, the extends element
10.1. A template to process emph or span content
Legal Notice