XPath and Schematron for TEI Customization

Syd Bauman


This tutorial contains an overview of Schematron, an open schema language that tests conditions that you set, and provides you with error messages when a condition fails. This schema language, which can conveniently fit right into your ODD file, is useful for catching errors that a closed schema (such as RNG) cannot. This section relies heavily on XPath, so we recommend completing the XPath tutorial before starting this section.

  1. ISO Schematron
  2. XML representations
  3. XPath …
  4. Basic filepath-like path expressions
  5. Try it!
  6. filepath-like expression hides directionality
  7. Walking the Tree
  8. tree (with self::)
  9. descendants (child:: and descendant::)
  10. ancestors (parent:: and ancestor::)
  11. preceding (preceding:: and preceding-sibling::)
  12. following (following:: and following-sibling::)
  13. axes :-)
  14. XPath axes: me, my descendants, and my ancestors
  15. XPath axes: following, preceding, and attributes
  16. Don’t want them all?
  17. Predicates
  18. Sample document instance
  19. Simplified XML tree
  20. XPath view
  21. Simple Schematron: assert
  22. Simple Schematron: report
  23. Schematron in ODD
  24. Sample
XPath and Schematron for TEI Customization