TEI 2026: Schematron in ODD
Event Language
EnglishFormat
in person/face-à-faceTopic: “Schematron in ODD”: Using Schematron in in TEI customizaitons to constrain your TEI documents in ways that are difficult or impossible to express in PureODD without .
Objective: Participants should leave the workshop with at least a working knowledge of the basics of Schematron,¹ XPath,² how these are used in an ODD customization, and a list of resources for learning more. With luck, participants (at least those who arrive with a TEI customization and the desire to add some difficult constraints to it) will leave with TEI ODD files that generate Schematron that performs the checks they would like their project data to pass. Appeal to the community: I have no idea if community members will find this appealing or not. I know for sure they *should* find it very appealing, but a) most people may already know this stuff, and b) many people may not realize how important it is. That said, I think it is pretty easy to make the argument that
- catching errors in your encoding earlier is better
- thus catching errors in your customized TEI schema is a good thing
- there are lots of errors to be caught that are difficult or impossible to catch using PureODD without .
A great example of this is checking that the value of @ref attributes of point to a , and that those of
This workshop will start with an ~½-hour talk on Schematron, what it is, and how it fits into ODD, followed by an ~½-hour introduction to XPath (this part will be ditched if all participants are already comfortable with XPath). It will then quickly progress to a hands-on practice session with participants writing Schematron in an ODD to solve an assigned constraint. The rest (and hopefully most) of the time will be spent with participants working with their own ODDs creating and applying constraints needed for their own data.
Prerequisites:
- Participants should be familiar with ODD, at least in a “I download it from Roma” kinda way.
- The more XPath participants know, the better.
- Participants should arrive with the capability to generate RELAX NG and Schematron schemas from their customization ODDs. (Typically this would mean using Roma or oXygen, but TEI Garage or commandline or anything else is fine, too. But we do not want to spend class time setting folks up for generating schemas. If a prospective participant is having trouble with that, I would be willing to meet (virtually) with them in early–mid July.)
- Participants should arrive with the capability to validate their TEI documents against both RELAX NG and Schematron. (oXygen will do, but any other method is fine, too — I use jing and a front-end to SchXslt2 on the commandline, myself.)
Notes
¹ That is, the basic idea that Schematron gives us the ability to select a bunch of nodes from the tree, and for each one ask “starting from this particular node, is this XPath true?”, and to issue a message if the answer is “no”. I.e., , @context, , , @test, , and . More advanced topics like phases, abstract patterns, and diagnotics will not be covered, or only discussed if a question comes up to which they are the best answer.
² That is, the basic XPath required to perform simple tree navigation in a TEI document: axis, paths, steps, predicates, and some functions and operators; and (for testing), the concept that if an XPath returns one or more nodes it counts as true(); if it returns zero nodes it counts as false().
³ You need to remove from both model classes it is in, and add it back to the content models of and manually. In the case of this is not particularly difficult — ( ( sic, corr) | ( corr, sic ) | ( model.choicePart, model.choicePart+ ) ). But for you have to create *two* entire specifications for , one for when @type is « catch » and another for when it is not.
Presenter: S. Bauman
