Modelling with TEI

The TEI schema

You have heard already about schemas and DTDs in the Modeling with XML section. Like every XML language TEI requires a schema that explains how elements and attributes are used in a TEI document.  The TEI community provides a general schema that defines all TEI modules and attribute classes.  This schema is called tei_all and all TEI documents have to conform to this schema. The tei_all schema exists in several different forms, for instance as a RELAX NG schema, a schema language developed for XML documents, or as DTD. The two schema versions can be found under the following URLs:

https://www.tei-c.org/release/xml/tei/custom/schema/dtd/tei_all.dtd
https://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng

The TEI community also provides subsets of tei_all, because it can be very confusing and time consuming to choose from 500 TEI elements especially if most of them are not required for the encoding of your text. If you are encoding poetry you will probably not need the elements and attributes that are needed to encode dictionaries. Therefore, the TEI subsets are selections of modules and attribute classes that you might most likely need in your encoding project. TEI Lite customisation was developed to suit about 90% of TEI-based projects and it is used very often used as a starting point for further customisation. Additionally, schemas exist for Manuscript Description, Drama, etc. A list of custom schemas and description can be found on the following website:

http://www.tei-c.org/Guidelines/Customization/


DTDs and schemas are used as a technical specification of an TEI/XML model. TEI has also its own modeling language called ODD (One Document Does it all). An ODD contains schema fragments as well as prose descriptions of element and attribute usage and examples from the TEI guidelines. An ODD can be used to generate a schema to document the XML model and a prose documentation in HTML or PDF. ODD is an holistic way to document a TEI customisation and it is a requirement for every TEI project to provide a detailed ODD model. You will learn more about ODD in a later session.

Further reading:

Elena Pierazzo, Modelling (Digital) Texts, in Digital Scholarly Editing: Theories, Models and Methods, 2015, <http://hal.univ-grenoble-alpes.fr/hal-01182162>

Text Encoding Initiative, The TEI Infrastructure, <http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ST.html>