Version classiqueVersion mobile

What is the Text Encoding Initiative?

Lou Burnard

The structural organization of a TEI document

Texte intégral

1All TEI documents are organized in a similar way, no matter what kind of original they represent. We will introduce some of the most commonly encountered variations on this structure by means of some simple examples.

Header, Text, and Divisions

2To begin at the beginning, every TEI document (represented by means of a <TEI> element) has at least two parts: a header (represented by means of a <teiHeader> element) containing metadata describing the document, and the text itself (usually represented by a <text> element). For example:

 <TEI xmlns='​ns/​1.0'>
   <!-- metadata describing a text --> </teiHeader>
  <text> <!-- a representation of the text itself --> </text>

3Like every other TEI XML document, this one explicitly states that the elements it contain are by default to be understood as coming from the TEI namespace​ns/​1.0.

4We describe the header in more detail in a subsequent chapter; for the moment we note simply that a minimal header must contain information identifying the document itself (in the <titleStmt>), information about how it is distributed or published (in the <publicationStmt>) and some indication of its origins (in the <sourceDesc>). The <text> element is used to hold an encoded version of the text itself, in which its structure is represented by elements such as <front> (for prefaces etc.) <body> (for the body of the text proper) and <back> (for any appendixes etc.). Within these components, we may also represent further subdivisions such as volumes, parts, chapters etc. using the <div> element.

5For example, here is the start of a minimal TEI version of a famous novel, as it might be distributed by an imaginary digital publisher:

 <TEI xmlns="​ns/​1.0">
         <title>The life and opinions of Tristram Shandy, Gentleman: TEI
         <publisher>Web Head Press</publisher>
         <p>Transcribed from the first edition, 1708</p>
       <div type="volume" xml:id="TS01">
         <div type="chapter" xml:id="TS0101">
           <head>Chap. I</head>
           <p>I wish either my father or my mother, or indeed both of them, as they were in duty both equally bound to it, had minded what they were about when they begot me; ...</p>
           <!-- remainder of chapter 1 here -->
       <div type="chapter" xml:id="TS0102">
         <head>Chap. II</head>
       <p> — Then, positively, there is nothing in the question, that I can see, either good or bad. — Then let me tell you, Sir, it was a very unseasonable question at least ...</p>
           <!-- remainder of chapter 2 here -->
         <!-- remaining chapters of volume 1 here -->
       <!-- remaining volumes of work here -->

6In this example the body of a text contains smaller divisions, themselves containing sub-divisions. Such textual subdivisions have different names in different cultures and in different kinds of document; many western cultures use names such as section, part, book, or chapter (or their equivalents) for these sub-parts of the body, but often in inconsistent or mutually incompatible ways. What is called a part within a book in one text may be called a section within a chapter in another, or a book within a part in a third. Hence, the TEI proposes a single element <div> for any such structural subdivision of the body of a text.

7The <div> element can carry a number of attributes to indicate its function and its properties more exactly. Here, we have used the @type attribute to characterize or classify the content of the element, thus distinguishing the <div> elements containing ‘volumes’ from those containing ‘chapters’. We have also used the @xml:id attribute to provide a unique identifier for each division of the novel.

8This same kind of hierarchic structure may be used for any kind of text. For example, an epic poem divided into books might tag each book as a <div type='book'> ; a play divided into acts and scenes might tag them <div type='act'> and <div type='scene'> respectively; and so on. The values available for use with the @type and @xml:id attributes are not defined by the TEI, but are chosen by the encoder. For @xml:id the values used are arbitrary codes unique to the element on which they appear: they provide a way of labelling the element concerned so that other parts of this or other documents can point to it directly. For @type the values are also arbitrary codes, chosen by the encoder to indicate the function of the <div> concerned. Some commonly encountered values such as chapter or volume are suggested in the Guidelines, but it is left to individual projects using the TEI to define their own taxonomy. It is however easy both to document and to enforce any chosen taxonomy by means of a TEI customisation, as discussed in a subsequent chapter.

9The <div> element is so named because it is a division; it should not therefore be used for something which is complete in itself. If the body of a text is undivided there is no need to provide a single <div> element to contain it. Instead, the <body> element may contain directly one or more of the elements described in the next section.

10A <text> is typically something like a book or an article, but may be anything which it is convenient to regard as a discrete but complete textual object, such as a single poem or archival document, or something as small as a postcard. As an alternative or in addition to the <text> element, the TEI also provides a <facsimile> element which could be used to provide a complementary visual representation, for example as a series of digitized page images. And the TEI also provides ways of representing collections of such things, as discussed in the final section of the next chapter.


Volume papier
Rechercher dans OpenEdition Search

Vous allez être redirigé vers OpenEdition Search