TEI Customization Primer

This primer discusses customizing the TEI for the needs of a specific project. The TEI has extensive guidelines for marking up texts, but you may find that it does not offer everything you need. Additionally, you may find that some of the TEI’s features are unnecessary for your project. These tutorials cover how to constrain and expand upon the TEI, using ODD (or “One Document Does it all”) customization. Topics covered in these tutorials include: the constraint of elements, attributes, and attribute values; the addition of new elements and attributes; customized schema documentation; and best practices for project customization.

This set of tutorials are designed for people who are are somewhat familiar with XML and the TEI guidelines, or for those who have already completed either the TEI Primer or the Manuscripts and the TEI Primer.

Set-up for Tutorials

Before you begin, see our tutorial set-up page. This provides instructions on working in oXygen XML Editor, downloading the files for hands-on exercises, and using the tutorials.

Customization Overview

This tutorial begins with the basics of ODD editing and schema customization. It discusses why one may want or need to customize a new TEI schema, and how the TEI is structured, which will help in customizing documents. In particular, this tutorial covers modules and classes (the TEI’s mechanisms for grouping elements).

Get started

Introduction to Writing ODDs

This tutorial focuses on the mechanics of ODD customization: how to include or exclude elements from the generic TEI schema; how to change attributes by class or for specific elements; and how to constrain attribute values, or change the content that can go within a given element. For this tutorial, it is probably best to follow along with your XML editor open, so that you can try out different customizations as you go.

Get started

Good Practices

This tutorial outlines different methods for documenting changes to an ODD file. It discusses the importance of documenting project practices, and the different forms of documentation a project might maintain for various audiences: collaborators, employees and/or volunteers, and yourself.

Get started

XPath and Schematron for TEI Customization

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 an ODD file, is useful for catching errors that a closed schema cannot. This section relies heavily on XPath, so we recommend completing the XPath Intro tutorial before starting this section.

Get started

What next?

If you have finished this primer, you might be wondering where to go next. After completing this primer, we assume that you have a working knowledge of advanced markup concepts and might be interested in transforming and publishing your TEI project data (see description below). You might also be interested in choosing particular tutorials based on the specific needs of your project. You can also return to the Tutorial Curriculum Page for full descriptions of all the primers.

  • Transformation and Publication Primer: This primer defines and describes the methods for publishing TEI documents.
  • View All Tutorials: Each tutorial is listed here with a description. The primers are meant as suggested paths through the available tutorials, but they can also be accessed individually to design alternative curricula.