Version classiqueVersion mobile

What is the Text Encoding Initiative?

Lou Burnard

The TEI Header

Texte intégral

1Every TEI document must have a TEI Header, represented by a <teiHeader> element. This is a container for all the metadata associated with the digital document itself, analogous to the title page of a printed book. In digital libraries and other online repositories, it is customary for the metadata associated with each digital document to be stored or managed separately, for example in a database structure for reasons of efficiency; it is also common practice to expose a subset of such metadata to web search engines according to one or more common standards such as Dublin Core. The TEI Header element is provided as a way of storing all such information in one place, independent of how it may be used. Of course, the scope and quantity of data collected in the Header may vary considerably in documents prepared for different purposes or by different projects. Furthermore, at least as originally conceived, the content of a TEI Header may not necessarily conform to the highest or most precise of cataloguing standards. Nevertheless it serves a useful purpose as a place where (for example) the data creator and the data curator can share information.

2Originally, the TEI header was designed to suit two rather different requirements. On the one hand, it was intended to assist bibliographers and librarians faced with the (then) new problem of documenting ‘electronic books’; on the other it was intended to meet the needs of researchers working with digital text collections, and needing to document the ‘coding practices’ applied to them. For the researcher, the important thing about the Header is that it provides a place for everything, supporting as far as possible the full range of divergent practice in different research communities, without imposing such barriers as a detailed knowledge of cataloguing standards or practices. For the librarian, the important thing about the TEI Header is that it conforms to standard bibliographic models, using similar terminology, and that it provides a single source of information for bibliographic description of a digital resource, with some established mappings to other such records (such as MARC or EAD). There is (naturally) some tension between these two perspectives, and a need for the elaboration of detailed profiles or ‘Guides to Best Practice’ for different communities.

3 The TEI header has four main components, corresponding to the parts defined in one of the first attempts at a universal bibliographic description the International Bibliographic Standard Description (ISBD):

  • <fileDesc> (file description) contains a full bibliographic description of an electronic file;
  • <encodingDesc> (encoding description) documents the relationship between an electronic text and the source or sources from which it was derived;
  • <profileDesc> (profile description) provides a detailed description of non-bibliographic aspects of a text, specifically the languages and sublanguages used, the situation in which it was produced, the participants and their setting. (just about everything not covered in the other header elements);
  • <revisionDesc> (revision description) summarizes the revision history for a file.

The file description

4Since it is not usually a pre-existing document, the structure of a TEI Header can be fairly tightly prescribed by the TEI. The first and only mandatory part, known as the file description, is represented by a <fileDesc> element, which contains three mandatory parts: title statement, publication statement and source description. A minimal TEI Header thus looks something like this:

   <title>Title of the work</title>
   <p>Information about the publication of the work</p>
   <p>Information about the source from which the work was derived</p>

5Within the four main sections of the TEI header, many elements are possible; we can give only a superficial overview here. For example, the <fileDesc> can also contain an <editionStmt> documenting the particular edition of the resource being described, a <seriesStmt> if it is published as part of a series, an <extent> element to indicate its size, and even a <notesStmt> to capture notes or comments of various types.

6The mandatory title statement, as its name suggests, provides a title for the resource, together with information about the people or agencies responsible for its intellectual content, in much the same way as the title of printed book, or a conventional catalogue record. For example:

 <title xml:lang="sk">Yogadarśanam (arthāt yogasūtrapūphah).</title>
 <title>The Yoga sūtras of Patañjali: a digital edition.</title>
 <funder>Wellcome Institute for the History of Medicine</funder>
 <principal>Dominik Wujastyk</principal>
  <name>Wieslaw Mical</name>
  <resp>data entry and proof correction</resp>
  <name>Jan Hajic</name>
  <resp>conversion to TEI-conformant markup</resp>

7In this example, the resource has two titles, one of which is given in Sanskrit. Details of its original author, the funder of the digital edition, the principal investigator, and other people with more specialized responsibilities are also provided. Many digital library projects will have their own rules about, for example, the format of names, or the use of authority lists to provide titles, which may vary considerably: the TEI therefore permits a more exact tagging of components such as proper names (for example by distinguishing forenames and surnames) but does not require it.

8The file description describes the file (i.e. the whole of a digital resource - it may of course consist of several operating system files). The publication statement describes how this resource may be obtained, in much the same way as the imprint of a printed book suggests who is responsible for distributing or publishing it. Even if the TEI document is a private document which is not actually available anywhere beyond the owner’s private hard disk, that fact must be mentioned here; more usually, of course, a header will be created only for a TEI resource which is being shared. The publication statement allows you to specify who is making the resource available, any identifier used for it, such as a catalogue number or Resource Identifier, and information about the terms under which it is distributed such as a licence, as shown here:

 <publisher>Humanities Media and Computing center</publisher>
 <pubPlace>University of Victoria</pubPlace>
 <date when="2011-08-04">19 August 2011</date>
 <idno type="filename">maladies_des_femmes.xml</idno>
 <availability status="free">
  <p>Copyright 2011. This text is freely available provided the text is distributed
     with the header information provided.</p>
  <p xml:lang="fr">Les droits de reproduction des gravures ont été achetés de la
     Bibliothèque Nationale de France grâce à une subvention accordée par le <ref target="">Conseil de recherches en sciences humaines
       du Canada</ref>. Les autres éléments du projet (les contributions des éditeurs,
     les transcriptions des textes, l’encodage et le code) sont distribués sous les
     termes de cette licence: <ref
       Commons Paternité - Pas d’Utilisation Commerciale - Pas de Modification 2.5

9This example shows a typical mixture of structured elements and informal prose. The name and address of the agency responsible for distribution of the file have been distinguished as <publisher> and <pubPlace> respectively (a more detailed address, using the <address> element we saw above, could also be used, of course); in addition a date of publication and a filename to identify the resource have been provided. Since the terms of availability here are a little complex, they have been presented informally as a sequence of paragraphs of prose, containing references to other online documents as appropriate. In a simpler situation, the TEI <licence> element might have been used.

Varieties of source description

10The next and only other mandatory component of the <fileDesc> is the source description, represented by the <sourceDesc> element. Even for documents which are born digital and thus have no pre-existing source, this element must be provided. Its purpose is to document formally the object or objects from which the TEI document has been derived, using traditional bibliographic terms. The <sourceDesc> may contain a simple paragraph of description, or it may contain one or more of the specialised elements for bibliographic description provided by the TEI.

11As a first example, consider a document which has no form of existence beyond its digital version. We may represent this using a pared-down <bibl>:

  <title>Manifeste des Digital humanities</title>. <author>Marin Dacos et al.</author>
   Available from <ref target="">​318</​ref>
  <date when="2010-05-21"/>

or simply give a short paragraph of explanation

 <p>No source: this is a born digital document.</p>

12It is often the case that a digital edition derives from a specific printed source. This may also be described using the <bibl> element:

 <bibl xml:id="Sue1846">
   <surname>Sue</surname>, <forename>Eugène</forename>
  <title level="m">Martin, l’enfant trouvé : Mémoires d’un valet de chambre</title>
   <publisher>C. Muquardt</publisher>
   <date when="1846">MDCCCXLVI</date>

13For digital transcriptions of audio or video recordings, a specialised <recordingStmt> element should be used. This can be used to store any technical details of the recording itself, and also to store detailed biographical or sociological data about the participants in a transcribed dialogue.

  <recording type="audio" dur="P30M">
    <resp>Location recording by</resp>
    <name>Sound Services Ltd.</name>
    <p>Multiple close microphones mixed down to stereo Digital Audio Tape, standard
         play, 44.1 KHz sampling frequency</p>
   <date>12 Jan 1987</date>

14For other non-book sources, such as the postcard mentioned above, the <bibl> element can also be used:

  <title level="m">The Bathing Beach, Brighton, in 1845 [postcard]</title>
   <resp>Lithograph by</resp>
   <name>G. F. Bragg</name>
   <resp>after a drawing by</resp>
   <name>R. H. Nibbs</name>
  <publisher>K. J. Bredon’s Bookshop</publisher>
  <pubPlace>10 East Street, Brighton</pubPlace>

15For a digital edition of a manuscript or early print source, where it is important to record the characteristics of the specific copy being transcribed, the detailed elements proposed by the TEI for the descriptive cataloguing of manuscripts may be more appropriate. Such descriptions use a distinct element, the <msDesc> which has quite an elaborate internal structure, as the following example shows:

   <repository>Archives nationales</repository>
   <collection>Commerce et Industrie</collection>
   <p>Minute d’un rapport de proposition à la Légion d’honneur fait, en 1850, par le
       ministre du Commerce et de l’Agriculture et président de la Société de
       géographie, Jean-Baptiste Dumas, au Président de la République, en faveur des
       frères d’Abbadie, Antoine (1810-1897) et Arnaud (1815-1893), auteurs d’un voyage
       en Abyssinie.</p>
   <p>Deux feuilles de papier 24 x 12 cm ; écriture à l’encre noire.</p>
    <handNote xml:id="AA" scope="major">Antoine d’Abbadie</handNote>
    <handNote xml:id="DJB" scope="minor">Jean-Baptiste Dumas</handNote>
    <handNote xml:id="EPR" scope="minor">membre inconnu du cabinet du

The encoding description

16The second major division of the TEI Header is the encoding description, which is represented by an <encodingDesc> element. This optional element may be used to supply information about almost any aspect of the encoding process itself, either simply summarized as running text, or provided within more specific elements. Taken as a whole, the content of a full <encodingDesc> approximates to the kind of information typically found in a technical manual associated with a project.

17Some of its components are entirely documentary, for example:

  • <projectDesc> : notes on the overall goals of the project;
  • <samplingDecl> : notes on the sampling principles applied;
  • <editorialDecl> : notes on the editorial principals applied, for which further specialised elements such as <correction> , <normalization> , <quotation> , <hyphenation> , <segmentation> , <interpretation> are provided.

18Here is an example showing some of these elements in use:

  <p>Texts collected for use in the Claremont Shakespeare Clinic, June 1990.</p>
  <p>Each text contains a sample of up to 2000 words, running from the start of the
     document to the end of the sentence after the 2000 word mark. For the purposes of
     word counting, hyphens and apostrophes were treated as spaces. </p>
   <p>Word forms broken by end of line hyphenation have been reconstructed without
       comment. The hyphen has been removed except for hyphenated forms attested
       elsewhere in the text. </p>
  <quotation marks="all" form="std">
   <p>All quotation marks have been removed. Direct speech is represented by the use
       of the <gi>said</gi> tag; other quoted material is represented by means of the
   <gi>q</gi> tag. </p>

19Such documentation is of course useful only to a human reader. However, other components of the encoding description are intended for use by automated processes. Typically they provide a set of declarations for particular codes which are subsequently referenced or used in the body of the text. Examples include:

  • <charDecl> : XML requires the use of Unicode throughout a document, Non-standard glyphs or characters may however be indicated in a TEI document using the <g> element to reference definitions for such things provided by this element;
  • <classDecl> : any kind of classification system or taxonomy can be declared using this element; parts of a text can then indicate the classification code or codes associated with them by using (for example) the @ana attribute. In a TEI Corpus, this element is typically provided by the corpus header so that individual text headers can point to it using the <catRef> element.
  • <refsDecl>, <geoDecl>, <metDecl>, <fsdDecl>, <variantEncoding>: provide a home for information concerning the encoding of reference systems, geographical information, systems of metrical analysis, feature systems for linguistic analyses, or the encoding of textual variation. Other similarly technical declarations can be added.

20We give more detailed examples for each of these three below.

21First, a typical <charDecl> element might define a variant form of the character Z which the encoder wishes to distinguish in a transcription. This variant has two strokes, but can be replaced by a normal Z.

 <glyph xml:id="z103">
  <glyphName>LATIN LETTER Z WITH TWO STROKES</glyphName>
  <mapping type="standardized">z</mapping>
  <mapping type="PUA">U+E304</mapping>
  • 1 PUA is short for Private Use Area: a Unicode concept permitting the definition of private codes for (...)

22Occurrences of this variant form in the transcription can now be distinguished using a <g> element to reference the above definition by means of its @xml:id value as usual. A processor can choose to render it using either the standardized mapping or the nonstandard code given by the PUA1 mapping.

<p> ... mulct<g ref="#z103"/> ... </p>

23Next we consider the <classDecl> element. This can be used to define any kind of private classification system or taxonomy. For a collection of newspaper articles we might use a taxonomy like the following:

 <taxonomy xml:id="size">
  <category xml:id="large">
   <catDesc>story occupies more than half a page</catDesc>
  <category xml:id="medium">
   <catDesc>story occupies between quarter and a half page</catDesc>
  <category xml:id="small">
   <catDesc>story occupies less than a quarter page</catDesc>
<!-- etc -->
 <taxonomy xml:id="topic">
  <category xml:id="politics-domestic">
   <catDesc>Refers to domestic political events</catDesc>
  <category xml:id="politics-foreign">
   <catDesc>Refers to foreign political events</catDesc>
  <category xml:id="social-women">
   <catDesc>refers to role of women in society</catDesc>
  <category xml:id="social-servants">
   <catDesc>refers to role of servants in society</catDesc>
<!-- etc -->

24An individual text containing (say) a story of less than a quarter page concerning the role of women in society would then reference this classification using the <catRef> element as follows:

<catRef target="#small #social-women"/>

25The same mechanism can be used to document the codes used in simple linguistic analyses such as those discussed in the previous chapter.

26Finally, we consider the <tagsDecl> element. This can be used just to list the elements actually used within a document, and also to define default formatting styles for them (typically using the W3C Cascading Stylesheet Language CSS). In the following example, we first define two font styles, Italic and Roman, using CSS. We then state that within the TEI namespace anything tagged as <emph> or <hi> is by default in italic. We also state that the <text> element, and by default everything contained by it, uses Roman Font.

 <rendition xml:id="IT" scheme="css">font-style: italic</rendition>
 <rendition xml:id="FontRoman" scheme="css">font-family: serif</rendition>
 <namespace name="​ns/​1.0">
  <tagUsage gi="emph" render="#IT"/>
  <tagUsage gi="hi" render="#IT"/>
  <tagUsage gi="text" render="#FontRoman"/>

27Within the body of a document, the @rendition attribute can over-ride the default styling for an element.

The profile and revision descriptions

28The third major division of the TEI header is the rather oddly-named Profile Description, represented by a <profileDesc> element. Like the others, this is a group of optional notes or more specialised elements; they have in common simply that they are ‘non-bibliographic’. Default members of the model.profileDescPart class include:

  • <creation> : information about the origination of the intellectual content of the text, e.g. time and place. In a genetic edition, this may include a structured <listChange> element documenting each significant stage identified in the evolution of a text;
  • <langUsage> : information about languages, registers, writing systems etc. used in the text; each language used being identified by means of a <language> element and an identifying code taken from an ISO standard;
  • <textDesc> and <textClass> : classifications applied to the text by means of a list of specified criteria or by means of a collection of pointers, respectively;
  • <particDesc> and <settingDesc> : information about the ‘participants’, either real or depicted, in the text.

29We noted above the availability of the <catRef> element as a means of classifying a text with respect to a predefined taxonomy. The <profileDesc> provides several complementary ways of doing this:

  • using catRef by referring to a locally defined (e.g. in the corpus header) category,
  • using classCode by referring to some commonly agreed and externally defined category, such as the Universal Decimal Classification system,
  • using keywords by assigning descriptive terms taken from a bibliographic controlled vocabulary or a tag cloud.

30In the following example, taken from the British National Corpus, a text is classified using all three possible methods:

  <date when="1962"/>
  <classCode scheme="DLEE">W nonAc: humanities arts</classCode>
  <keywords scheme="COPAC">
   <term>History, Modern - 19th century</term>
   <term>Capitalism - History - 19th century</term>
   <term>World, 1848-1875</term>

31Note that this categorization applies to the whole text. For more fine grained classification, the @decls attribute may be used to select the classification applicable to any declarable elemnt, for example to an individual <div>.

32The fourth and last part of the TEI Header is the optional revision description, represented by a <revisionDesc> element which contains a list of <change> elements, each with @date and @who attributes, and each indicating significant stages in the evolution of a document; by convention the most recent such element is given first. The <listChange> element mentioned above may also be used here to refer to identified stages in the evolution of the electronic file, as distinct from the text encoded. In a production environment an automated version control system such as subversion will be used to keep detailed track of the evolution of a dcument; the TEI encoding of significant stages in the development of a document may be performed semi-automatically by such tools, or manually.

  <change when="2013-05-11">First complete draft</change>
  <change when="2013-04-07">Created header and document structure</change>


1 PUA is short for Private Use Area: a Unicode concept permitting the definition of private codes for non-interchangeable characters.


Volume papier
Rechercher dans OpenEdition Search

Vous allez être redirigé vers OpenEdition Search