Markup Schemes

Markup Schemes

2. Text Encoding Initiative

2.1 Exercise

Have a look at the online text of Wittgenstein’s Tractatus. If you click on the links you will see the hierarchical structure unfold. How would you use the TEI’s div structure to capture this text? Don’t forget about using the n attribute, as above, for numbering. What value would you give to the type attribute at each level?

Reveal our answer

Inside divs you can use basic structural blocks for headers, paragraphs, and so on. In TEI headers and paragraphs are called head and p. TEI has lots of elements designed for letters, so this gives us a good platform to show the usefulness of a pre-defined markup scheme:

The top part of a letter goes in an element called opener, which can contain elements like dateline, date, salute. An example will show how these are used better than a description:

<opener>

<dateline>

<name type=”place”>Paris</name>

<date>23 November 1921</date>

</dateline>

<salute>Dear Mr Picasso</salute>

</opener>

And we can add all kinds of elements within salute, if we like: personal name is an obvious thing we might want to mark up:

<salute>Dear Mr <persName>Picasso</persName></salute>

The end of the letter goes in closer, and has similar structure:

<closer>

<salute>Your genius friend,</salute>

<signed>Gertrude Stein</signed>

</closer>

Next:

  1. Look at the TEI guidelines for the element p.
  2. Follow some of its child elements from the links listed under May contain (it’s probably best to follow one in the Core set). Follow these descendants of p as far as they go. For each element look at the example usage given at the bottom of the page.
  3. Which of these elements would be useful for markup that you would want to apply in one of your projects?

The TEI guidelines are enormous and complicated, but you don’t have to use all of it – you certainly don’t need to know all of it (almost nobody does). In fact the TEI has made provision for the general user who just wants to start encoding quickly: TEI Lite.