Release of “Schematron - A language for Validating XML” by Erik Siegel
October 17, 2022
Submitted by Erik Siegel.
Schematron is a validation language that checks XML documents against business rules. It extends the validation provided by languages such as Document Type Definitions (DTD), W3C XML Schema, and RELAX NG, giving you the ability to check your XML documents for compliance with rules that can be difficult, if not impossible, to check with the other validation languages.
Schematron is used by a wide variety of people with a broad range of backgrounds. Some will be XSLT or XQuery programmers. Some will previously have written schemas in other languages, such as W3C XML Schema or RELAX NG. Others will be less tech-savvy or new to the XML world. This book explains Schematron for both XML aficionados and people who are less experienced. And for those who are new to XML or have limited programming experience, it contains introductions to two important topics: XPath and XML namespaces.
Schematron: A language for validating XML explains the language in detail and contains many examples to highlight its features. Anyone who uses Schematron or would like to begin using it will find a wealth of information.
The book is published by XML Press. More details on their website.
Inside the Book
- Introduction: introduces Schematron and provides background.
- Schematron in context: provides an overview of XML validation, the main languages currently used to validate XML, and introduces Schematron as an important part of the validation tool set.
- Applying Schematron: describes how to create and validate using Schematron and introduces the most commonly used processors for Schematron.
- Schematron basics: describes how to set up a Schematron schema, and introduces the most frequently used constructs in Schematron.
- Advanced Schematron: covers advanced Schematron features such as localization, abstract rules, pattern reuse, and more.
- Query language binding and using XSLT: describes how to use different query languages, as well as XSLT, as part of a Schematron schema.
- Additional features: covers lesser used features such as message text markup, flags, properties, structured comments, and more.
- Schematron examples and recipes: examples of how to use Schematron for common situations, such as validating schemas, checking for multiple id references, validating processing instructions and comments, and detecting incorrect nesting.
- XPath technology primer: introduces XPath, which is used extensively in Schematron, including features such as tree navigation, special operators, expressions, and more.
- An introduction to namespaces: describes XML namespaces and how Schematron treats namespaces.
- Schematron reference: a detailed reference to the Schematron language.
- SVRL reference: a detailed reference to the Schematron Validation Reporting Language (SVRL), which is an XML-based schema used by Schematron processors to produce output that can be post-processed by another program.
- Schematron QuickFix: a Schematron extension that embeds suggested fixes for errors. A QuickFix-aware IDE can use this information to offer a user the opportunity for the IDE to immediately apply a fix to document being validated.
- Additional resources: a bibliography of resources for further exploration.
About Erik Siegel
Erik Siegel is a content engineer and XML specialist who runs Xatapult consultancy in the Netherlands. He specializes in content design and conversions, XML Schemas and transformations, eXist and XProc applications, and XML-related training.