Text only | Skip links
Skip links||IT Services, University of Oxford

Contents

1. Elements Available in All TEI Documents

The so-called Core module groups together elements which may appear in any kind of text and the tags used to mark them in all TEI documents. This includes:
  • paragraphs
  • highlighting, emphasis and quotation
  • simple editorial changes
  • basic names numbers, dates, addresses
  • simple links and cross-references
  • lists, notes, annotation, indexing
  • graphics
  • reference systems, bibliographic citations
  • simple verse and drama

1.1. Elements Defined in Core

abbr add addrLine address analytic author bibl biblScope biblStruct binaryObject cb choice cit corr date del desc distinct divGen editor email emph expan foreign gap gloss graphic head headItem headLabel hi imprint index item l label lb lg list listBibl measure measureGrp meeting mentioned milestone monogr name note num orig p pb postBox postCode ptr pubPlace publisher q quote ref reg relatedItem resp respStmt rs said series sic soCalled sp speaker stage street teiCorpus term time title unclear

1.2. Paragraphs

<p> (paragraph) marks paragraphs in prose
  • Fundamental unit for prose texts
  • <p> can contain all the phrase-level elements in the core
  • <p> can appear directly inside <body> or inside divisions
<p>From the listless repose of the place, and the
peculiar character of its inhabitants, who are
descendants from the original Dutch settlers, this
sequestered glen has long been known by the name of
<name type="place">SLEEPY HOLLOW</name>, and its
rustic lads are called the Sleepy Hollow Boys
throughout all the neighboring country.</p>

1.3. Highlighting

By highlighting we mean the use of any combination of typographic features (font, size, hue, etc.) in a printed or written text in order to distinguish some passage of a text from its surroundings. For words and phrases which are:
  • distinct in some way (e.g. foreign, archaic, technical)
  • emphatic or stressed when spoken
  • not really part of the text (e.g. cross references, titles, headings)
  • a distinct narrative stream (e.g. an internal monologue, commentary)
  • attributed to some other agency inside or outside the text (e.g. direct speech, quotation)
  • set apart in another way (e.g. proverbial phrases, words mentioned but not used)

1.4. Highlighting Examples

  • <hi> (general purpose highlighting)
    Ichabod prided himself upon his
    <hi rend="RedUnderline">dancing</hi>
    as much as upon his vocal powers.
  • <distinct> (linguistically distinct)
    a worthy wight of the name of Ichabod Crane; who
    sojourned, or, as he expressed it,
    <distinct>tarried</distinct>, in Sleepy Hollow
  • Other similar elements include: <emph>, <mentioned>, <soCalled>, <term> and <gloss>

1.5. Quotation

Quotation marks can be used to set off text for many reasons, so the TEI has the following elements:
  • <q> (separated from the surrounding text with quotation marks)
  • <said> (speech or thought)
  • <quote> (passage attributed to an external source)
  • <cit> (groups a quotation and citation)
Summoning up, therefore, a show of courage, he demanded in
stammering accents, <said who="#ICrane">Who are you?</said>
He received no reply.

1.6. Simple Editorial Changes: <choice> and Friends

  • <choice> (groups alternative editorial encodings)
  • Errors:
    • <sic> (apparent error)
    • <corr> (corrected error)
  • Regularization:
    • <reg> (regularized form)
    • <orig> (original form)
  • Abbreviation:
    • <abbr> (abbreviated form)
    • <expan> (expanded form)

1.7. Choice Example

I profess not to know how women's
<choice>
 <orig>heartes</orig>
 <reg>hearts</reg>
</choice> are wooed and won. To me they have
always been <choice>
 <sic>maters</sic>
 <corr>matters</corr>
</choice> of riddle and <choice>
 <abbr>admirat'n</abbr>
 <expan>admiration</expan>
</choice>.

1.8. Additions, Deletions, and Omissions

  • <add> (addition to the text, e.g. marginal gloss)
  • <del> (phrase marked as deleted in the text)
  • <gap> (indicates point where material is omitted)
  • <unclear> (contains text unable to be transcribed clearly)

1.9. Example of <add>, <del>, <gap>, and <unclear>

<add place="left">The Cause</add> The immediate
cause, however, of the prevalence of supernatural

<del>tales</del>
<add place="supra">stories</add>
in these parts, was doubtless owing to the
<unclear reason="blood splatter">vicinity</unclear>
of Sleepy Hollow.
<gap reason="illegible">
 <desc>The rest of this paragraph is covered
   in dried blood.</desc>
</gap>

1.10. Basic Names

  • <name> (a name in the text, contains a proper noun or noun phrase)
  • <rs> (a general-purpose name or referencing string )

The 'type' attribute is useful for categorizing these, and they both also have 'key', 'ref', and 'nymRef' attributes.

1.11. Basic Names Example

<p> Such is the general purport of this legendary
superstition, which has furnished materials for
many a wild story in that region of shadows; and
<rs corresp="#HHSH">the spectre</rs> is known,
at all the country firesides, by the name of the
<name xml:id="HHSHref="myths.xml#HeadlessHorsemantype="spirit">Headless Horseman of
 <name key="SleepyH001type="place">Sleepy
     Hollow</name>
 </name>.</p>

1.12. Addresses

  • <email> (an electronic mail address)
  • <address> (a postal address)
  • <addrLine> (a non-specific address line)
  • <street> (a full street address)
  • <postCode> (a postal (or zip) code)
  • <postBox> (a postal box number)
  • <name> can also be used
  • and the 'namesdates' module extends this with more geographic names

1.13. Basic Address Example

<email>HeadlessHorseman@cummingsfamily.org.uk</email>
<address>
 <name>Ichabod Crane, Schoolmaster</name>
 <addrLine>The Schoolhouse</addrLine>
 <street>5 Headless Horseman Way</street>
 <addrLine>Sleepy Hollow, Tarrytown, NY</addrLine>
 <postCode>10591</postCode>
</address>

1.14. Basic Numbers and Measures

  • <num> (marks a number of any sort)
  • <measure> (marks a quantity or commodity)
  • <measureGrp> (groups specifications relating to a single object)
  • While <num> has simple 'type' and 'value' attributes, <measure> has 'type', 'quantity', 'unit' and 'commodity' attributes

1.15. Number and Measure Example


He had <num value="3">three</num> or
<num value="4">four</num> boon companions.
This road leads through a sandy hollow,
shaded by trees for about
<measure commodity="distancequantity="402.34unit="m">a quarter of a mile</measure>, where it
crosses the bridge famous in goblin story, and just
beyond swells the green knoll on which stands the
whitewashed church.

1.16. Dates

  • <date> (contains a date in any format and includes a 'when' attribute for a regularised form and a 'calendar' attribute to specify what calendar system)
  • <time> (contains a time in any format and includes a 'when' attribute for a regularised form)
<p>
 <date when="1792-11-01">The next morning</date>
the old horse was found without his saddle,
and with the bridle under his feet, soberly
cropping the grass at his master's gate.
Ichabod did not make his appearance at
<time when="1792-11-01T07:30:00">breakfast</time> --
<time when="18:30:00">dinner-hour</time>
came, but no Ichabod.
</p>

1.17. Simple Linking

  • <ptr> (defines a pointer to another location)
  • <ref> (defines a reference to another location, with optional linking text)
  • Both elements have:
    • 'target' attribute taking a URI reference
    • 'cRef' attribute for canonical referencing schemes
  • If the linking text is able to be generated, <ptr> and <ref> might be used in the same place.

1.18. Simple Linking Example


See <ref target="#Section12">section 12 on page 34</ref>.

See <ptr target="#Section12"/>.

1.19. Lists

  • <list> (a sequence of items forming a list)
  • <item> (one component of a list)
  • <label> (label associated with an item)
  • <headLabel> (heading for column of labels)
  • <headItem> (heading for column of items)

1.20. Simple List Example

<div>
 <head>Lists</head>
 <p>
  <list type="unordered">
   <item rend="pause">
    <gi>list</gi> (a sequence of
       items forming a list)</item>
   <item rend="pause">
    <gi>item</gi> (one component of
       a list)</item>
   <item rend="pause">
    <gi>label</gi> (label
       associated with an item)</item>
   <item rend="pause">
    <gi>headLabel</gi> (heading for
       column of labels)</item>
   <item rend="pause">
    <gi>headItem</gi> (heading for
       column of items)</item>
  </list>
 </p>
</div>

1.21. Notes

  • <note> (contains a note or annotation)
  • Notes can be those existing in the text, or provided by the editor of the electronic text
  • A 'place' attribute can be used to indicate the physical location of the note
  • Although notes should usually be encoded where its identifier/mark first appears, notes can also be kept separately and point back to their location with a 'target' attribute

1.22. Note Example


Then, as he wended his way, by swamp and stream
and awful woodland, every sound of nature, at that
witching hour, fluttered his excited imagination:
the moan of the whip-poor-will
<note place="foottype="auth">The whip-poor-will
is a bird which is only heard at night. It receives its
name from its note, which is thought to resemble
those words.</note> from the hill-side; the boding
cry of the tree-toad, that harbinger of storm;

1.23. Indexing

  • If converting an existing index, use nested lists. For auto-generated indexes:
  • <index> (marks an index entry) with optional 'indexName' attribute
  • The <term> element is used to mark a term inside an <index> element
  • The <index> element can self-nest for hierarchical index entries

1.24. Indexing Example

<p> As Ichabod jogged slowly on his way,
his eye, ever open to every symptom of
culinary abundance, ranged with delight over
the treasures of jolly autumn<index>
  <term>Seasons, Autumn</term>
 </index>. On all sides he beheld vast store
of apples<index>
  <term>Fruit, Apples</term>
 </index>; some hanging in oppressive
opulence on the trees; some gathered into
baskets and barrels for the market; others
heaped up in rich piles for the cider-press<index>
  <term>Machinery</term>
  <index>
   <term>Cider Presses</term>
  </index>
 </index>. </p>

1.25. Graphics

  • <graphic> (indicates the location of an inline graphic, illustration, or figure)
  • <binaryObject> (encoded binary data embedding a graphic or other object)
  • The 'figure' module would provide <figure> and <figDesc> for more complex graphics
<p>The following engraving shows Brom Bones chasing
Ichabod Crane: <graphic url="BromBonesAndIchabod.png"/>
</p>

1.26. Bibliographic Citations

  • <bibl> (loosely structured bibliographic citation)
  • <biblStruct> (structured bibliographic citation)
  • <listBibl> (a list of bibliographic citations such as a bibliography)
  • The 'header' module also includes <biblFull> (fully-structured bibliographic citation based on the TEI fileDesc element)

1.27. Simple <bibl> Example


He was, moreover, esteemed by the women as a
man of great erudition, for he had read several
books quite through, and was a perfect master of
<bibl>
 <author>Cotton Mather's</author>
 <title>History of New England Witchcraft</title>
</bibl>, in which, by the way, he most firmly
and potently believed.

1.28. Simple <biblStruct> Example

<biblStruct>
 <monogr>
  <title>Magnalia Christi Americana: or, The
     ecclesiastical history of New-England, ...</title>
  <author>Mather, Cotton (1663-1728)</author>
  <imprint>
   <publisher>Printed for Thomas Parkhurst, at the
       Bible and Three Crowns in Cheapside.</publisher>
   <pubPlace>London</pubPlace>
   <date when="1702">MDCCII</date>
  </imprint>
 </monogr>
</biblStruct>

1.29. Verse

  • <l> (a line of verse)
  • <lg>(a line group such as stanza or paragraph)
<lg>
 <l>A pleasing land of drowsy head it was,</l>
 <l> Of dreams that wave before the half-shut eye;</l>
 <l>And of gay castles in the clouds that pass,</l>
 <l> For ever flushing round a summer sky.</l>
 <trailer>CASTLE OF INDOLENCE.</trailer>
</lg>

1.30. Drama

  • <sp> (an individual speech in a performance text)
  • <speaker> (the name of the speaker(s) as given in the performance text)
  • <stage> (a stage direction of any sort within a dramatic text)

1.31. Sleepy Hollow: The Play

<sp>
 <speaker>Brom Bones</speaker>
 <stage>Said boastfully whilst crossing
   downstage-right to his horse</stage>
 <p>I will double the schoolmaster up, and lay him on a
   shelf of his own school-house;</p>
</sp>
<stage>Brom mounts horse and rides away</stage>

2. Representation of Non-standard Characters and Glyphs

Chapter 1 of the TEI Guidelines discusses the use of non-standard characters.
  • In most cases a Unicode glyph already exists for the character, make sure and if it exists use it!
  • This chapter creates the 'gaiji' module which includes elements for describing and referencing non-standard characters
  • As fonts differ from system to system, if the exact appearance of a character or glyph is important, it should be documented.

2.1. 'Gaiji' Module Elements

  • This module includes:
    • <charDecl> (declaration about nonstandard characters and glyphs)
    • <char> (descriptive information about a character)
    • <charName> (name of the character)
    • <charProp> (some property of the character)
    • <g> (represents a non-standard character or glyph)
    • <glyph> (descriptive information about a glyph)
    • <glyphName> (name of the glyph)
    • <localName> (locally defined name for a property)
    • <unicodeName> (name of a registered Unicode normative property)
    • <value> (single value for some property or attribute)
    • <mapping> (one or more characters related to the current character or glyph)

2.2. <charDecl> Example

<charDecl>
 <glyph xml:id="z103">
  <glyphName>LATIN LETTER Z WITH TWO STROKES</glyphName>
  <mapping type="standardized">Z</mapping>
  <mapping type="PUA">U+E304</mapping>
 </glyph>
</charDecl>

2.3. Another <charDecl> Example

<charDecl>
 <glyph xml:id="r1">
  <glyphName>LATIN SMALL LETTER R WITH ONE FUNNY STROKE</glyphName>
  <charProp>
   <localName>entity</localName>
   <value>r1</value>
  </charProp>
  <graphic url="r1img.png"/>
 </glyph>
 <glyph xml:id="r2">
  <glyphName>LATIN SMALL LETTER R WITH TWO FUNNY STROKES</glyphName>
  <charProp>
   <localName>entity</localName>
   <value>r2</value>
  </charProp>
  <graphic url="r2img.png"/>
 </glyph>
</charDecl>

2.4. Referencing Character Declarations

One references the character declarations and glyphs by pointing to their 'xml:id' attribute with a 'ref' attribute on the <g> element:
<p>Wo<g ref="#r1">r</g>ds in this
manusc<g ref="#r2">r</g>ipt are sometimes
written in a funny way.</p>

3. Summary

Core module: abbr add addrLine address analytic author bibl biblScope biblStruct binaryObject cb choice cit corr date del desc distinct divGen editor email emph expan foreign gap gloss graphic head headItem headLabel hi imprint index item l label lb lg list listBibl measure measureGrp meeting mentioned milestone monogr name note num orig p pb postBox postCode ptr pubPlace publisher q quote ref reg relatedItem resp respStmt rs said series sic soCalled sp speaker stage street teiCorpus term time title unclear

Gaiji module: char charDecl charName charProp g glyph glyphName localName mapping unicodeName value

4. Next...?

Next, after a 10-15 minute coffee break we'll hear from Dot about Editing Options for TEI Users.



James Cummings. Date: 2007-10-31
Copyright University of Oxford