Skip to Content
Schematron
book

Schematron

by Eric van der Vlist
March 2007
Intermediate to advanced content levelIntermediate to advanced
51 pages
1h 19m
English
O'Reilly Media, Inc.
Content preview from Schematron

Schematron

Eric van der Vlist

Abstract

Schematron is a rule-based XML schema language, offering flexibility and power that W3C XML Schema, RELAX NG, and DTDs simply can't match.

You need Schematron and can't settle for other languages if you have to check rules that go beyond checking the document structures (i.e., checking that an element bar is included in element foo) and their datatypes. Schematron is the right tool for checking conditions such as "startDate is earlier than or equal to endDate".

Schematron is also the right tool to use if you have to raise user-friendly error messages rather than depend on error messages that are generated by a schema processor and that are often obscure.

Schematron builds on XPath. You will need to understand XPath to to get the most from Schematron.

Introduction

Schematron is a simple tool that anyone working with XML should have in his toolbox. Its basic structures are basic, and its flexibility is immense.

If you are a W3C XML Schema user, you will find Schematron most useful in working around W3C XML Schema limitations, including issues such as checking for a specific root element, forbidding xsi:type attributes, dealing with co-occurrence constraints and handling unordered content models.

If you are a RELAX NG user, you will find Schematron especially suitable for implementing keys and key references in a very ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

XSL-FO

XSL-FO

Dave Pawson
XML Pocket Reference, 3rd Edition

XML Pocket Reference, 3rd Edition

Simon St. Laurent, Michael Fitzgerald
XPath and XPointer

XPath and XPointer

John Simpson

Publisher Resources

ISBN: 9780596527716Errata