Module 0: Introduction to Text Encoding and the TEI

6. TEI P5 (XML)

Finally, this example illustrates how a TEI P5 (XML) encoding of the sample text could look. The latest version ot the TEI Guidelines specify a descriptive encoding scheme in XML format. As you’ll see, there are much similarities with the TEI P3 encoding of the previous example: all structural and semantic text features can be indicated and labeled with fairly intuitive element names. Still, some differences stand out:

  • in TEI P5, all elements must have end tags
  • in TEI P5, all attribute values must be surrounded by quotes
  • some basic element names have changed (e.g., the first element of any TEI P5 text is now called <TEI>)
  • in TEI P5, many details of the text ontology have been changed, some elements have been revised, improved, deleted, or added

The TBE tutorials will guide you through the most important sections of the TEI Guidelines that should enable you to encode the most common features of different text genres, and derive TEI encoding schemes according to your needs.

<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Review: an electronic transcription</title>
</titleStmt>
<publicationStmt>
<p>Published as an example for the Introduction module of T​BE.</p>
</publicationStmt>
<sourceDesc>
<p>No source: born digital.</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<head>Review</head>
<p>
<title>Die Leiden des jungen Werther</title>
<note place="foot">by
<name>Goethe</name>
</note>
is an
<emph>exceptionally</emph>
good example of a book full of
<term>Weltschmerz</term>
.</p>
</body>
</text>
</TEI>
Example 5. A TEI P5 XML example.