Glossary of terms used in the TEI XML critical edition guides
Collection glossary · Collection overview · First guide: Understanding TEI documents for critical editions
Contents
- 1 How to use this glossary
- 2 The vocabulary by subject
- 3 Textual criticism and scholarly editing
- 4 XML structures and syntax
- 5 TEI structures
- 6 Identifiers, references, and validation
- 7 Lua and data processing
- 8 ConTeXt and typesetting
- 9 Quick correspondence table
- 10 The four principal layers
- 11 Alphabetical glossary
- 12 Principal TEI elements and attributes
- 13 Common distinctions
- 14 The complete workflow in one view
This glossary explains the principal terms used in the collection Building critical editions from TEI XML.
The six guides bring together several kinds of vocabulary:
- textual criticism and scholarly editing;
- XML;
- the Text Encoding Initiative;
- identifiers and references;
- validation and data processing;
- Lua;
- ConTeXt and typesetting.
These vocabularies describe different levels of the same workflow:
textual evidence
↓
editorial interpretation
↓
TEI XML encoding
↓
validation and processing
↓
ConTeXt typesetting
↓
critical edition
The same object may therefore be described in several ways.
For example:
editorial statement:
witness B reads “soul”
TEI representation:
<rdg wit="#B">soul</rdg>
processing operation:
resolve the reference #B
printed result:
soul B
The glossary explains how these levels are related.
It is not a complete dictionary of textual criticism, XML, TEI, Lua, or ConTeXt. It concentrates on the terms required to read and use the six guides.
How to use this glossary
The glossary can be consulted in three different ways.
By subject
Readers unfamiliar with one part of the workflow can begin with the thematic sections:
- Textual criticism and scholarly editing
- XML structures and syntax
- TEI structures
- Identifiers, references, and validation
- Lua and data processing
- ConTeXt and typesetting
Alphabetically
The detailed entries are organised alphabetically in the second half of the page.
Through the guides
Each guide introduces a particular group of terms.
| Guide | Principal vocabulary |
|---|---|
| Understanding TEI documents for critical editions | XML, element, attribute, hierarchy, root element, namespace,
TEI document, TEI header, validation |
| Declaring witnesses in TEI critical editions | witness, siglum, identifier, witness declaration, witness list,
source description, witness family |
| Encoding a basic critical apparatus in TEI | apparatus entry, lemma, reading, <app>,
|
| Encoding complex textual variation in TEI | omission, addition, correction, conjecture, transposition,
reading group, positive apparatus, negative apparatus |
| Processing TEI critical apparatus data with Lua | XML tree, node, Lua table, selection, filtering, sorting,
reference resolution, validation rule |
| Typesetting TEI critical editions with ConTeXt | XML setup, rendering, lineation, apparatus paragraph,
apparatus layer, layout, output |
The vocabulary by subject
Textual criticism and scholarly editing
The terms in this section describe the scholarly objects and editorial decisions represented in a critical edition.
They answer questions such as:
- Which sources preserve the text?
- Which readings differ?
- Which reading is printed?
- How are the alternatives reported?
- What kind of editorial intervention has taken place?
witnesses
↓
readings
↓
comparison
↓
editorial decision
↓
critical apparatus
The principal terms are:
- apparatus
- apparatus entry
- conjecture
- correction
- critical apparatus
- critical edition
- diplomatic transcription
- edited text
- lemma
- negative apparatus
- omission
- positive apparatus
- reading
- reading text
- siglum
- source
- textual variant
- transposition
- witness
- witness agreement
- witness family
XML structures and syntax
The terms in this section describe the general XML structures used by TEI.
XML provides the syntax:
elements
↓
attributes
↓
nesting
↓
document tree
It does not by itself define the scholarly meaning of a witness, lemma, or reading.
The principal terms are:
- attribute
- child element
- document tree
- element
- empty element
- encoding
- hierarchy
- markup
- namespace
- node
- parent element
- parser
- root element
- schema
- sibling element
- textual content
- well-formed XML
- XML
- XML declaration
- XML tree
TEI structures
TEI supplies a scholarly vocabulary expressed in XML.
It defines structures for representing:
- the document and its metadata;
- the encoded text;
- witnesses;
- apparatus entries;
- lemmas and readings;
- editorial interventions.
The principal terms are:
- inline apparatus
- location-referenced apparatus
- stand-off apparatus
- TEI
- TEI document
- TEI Guidelines
- TEI header
- witness list
- <app>
- <lem>
- <listWit>
- <rdg>
- <rdgGrp>
- <TEI>
- <teiHeader>
- <witness>
- @wit
Identifiers, references, and validation
Structured editions rely on explicit links between declarations and uses.
For example:
witness declaration
xml:id="B"
↑
│
reading reference
wit="#B"
The principal terms are:
Lua and data processing
Lua is used when the encoded information must be selected, checked, grouped, sorted, or transformed before typesetting.
TEI XML
↓
Lua processing
↓
structured records
↓
ConTeXt output
The principal terms are:
ConTeXt and typesetting
ConTeXt turns the encoded and processed information into a designed document.
The terms in this section describe the final presentation:
structured data
↓
ConTeXt processing
↓
paragraphs, apparatuses, line numbers, layout
↓
PDF
The principal terms are:
- apparatus layer
- apparatus paragraph
- ConTeXt
- layout
- lemma separator
- lineation
- note series
- output
- parallel text
- rendering
- typesetting
- XML setup
Quick correspondence table
| Scholarly concept | TEI representation | Processing operation | Possible printed form |
|---|---|---|---|
| Apparatus entry | <app>
|
Collect the lemma and readings | One apparatus entry |
| Lemma | <lem>
|
Identify the edited reading | mind]
|
| Variant reading | <rdg>
|
Retrieve the alternative text | soul
|
| Witness support | @wit
|
Resolve witness references | B
|
| Witness declaration | <witness> with xml:id
|
Retrieve metadata and siglum | A, B, or another siglum
|
| Group of readings | <rdgGrp>
|
Preserve or transform the grouping | Several related readings |
The four principal layers
| Layer | Main question | Typical vocabulary |
|---|---|---|
| Editorial layer | What textual evidence exists, and how should it be interpreted? | Witness, lemma, reading, omission, conjecture |
| Encoding layer | How should that information be recorded explicitly? | Element, attribute, <app>, @wit,
|
| Processing layer | How should the encoded information be selected, checked, or transformed? | Lua table, selection, filtering, sorting, reference resolution |
| Typesetting layer | How should the result be presented to the reader? | Apparatus paragraph, lineation, layout, rendering |
The same statement can therefore be followed through the four layers:
editorial:
witness B supports the reading “soul”
encoding:
<rdg wit="#B">soul</rdg>
processing:
resolve #B and retrieve its siglum
typesetting:
soul B
Alphabetical glossary
A
Apparatus
An apparatus is an organised body of information accompanying an edited text.
The term may refer to:
- textual variants;
- sources and parallels;
- editorial interventions;
- explanatory notes;
- translation notes;
- linguistic observations.
In this collection, the word usually refers to a textual apparatus recording differences between witnesses.
The term does not by itself determine where the information appears on the page.
See also:
Apparatus entry
An apparatus entry is one structured record of textual variation.
It normally relates:
- a passage in the edited text;
- a lemma;
- one or more readings;
- the witnesses supporting those readings;
- sometimes an editorial comment.
In TEI:
<app> <lem wit="#A">mind</lem> <rdg wit="#B">soul</rdg> </app>
A possible printed form is:
mind] soul B
The printed form compresses a richer structure:
apparatus entry
├── lemma
│ ├── text: mind
│ └── witness: A
└── reading
├── text: soul
└── witness: B
See also:
Apparatus layer
An apparatus layer is one distinct category of apparatus information.
A critical edition may contain separate layers for:
- textual variants;
- sources;
- editorial interventions;
- translation notes;
- explanatory commentary.
ConTeXt can give each layer a distinct visual form or placement.
For example:
main text ├── textual apparatus ├── source apparatus └── translation notes
See also:
Apparatus paragraph
An apparatus paragraph is a paragraph containing several compact apparatus entries.
For example:
12 mind] soul B 15 seeks] desires C 18 unity] harmony D
The apparatus entries may be stored separately as structured data and later assembled into one paragraph by ConTeXt.
The paragraph is therefore a typesetting result, not necessarily the storage format of the editorial data.
Attribute
An attribute adds information to an XML element.
It appears inside the start tag:
<rdg wit="#B" type="orthographic">soule</rdg>
Here:
witis an attribute;#Bis its value;typeis another attribute;orthographicis its value.
The structure is:
rdg ├── attribute: wit="#B" ├── attribute: type="orthographic" └── textual content: soule
Attribute values must be quoted.
See also:
C
Child element
A child element is an element directly contained inside another element.
In:
<app> <lem>mind</lem> <rdg>soul</rdg> </app>
both <lem> and <rdg> are children of
<app>.
app ├── lem └── rdg
See also:
Conjecture
A conjecture is a reading proposed by an editor rather than directly attested by the known witnesses.
A conjecture may be introduced when:
- all transmitted readings appear corrupt;
- part of the text appears to be missing;
- a scribal error can be reconstructed;
- the editor proposes a form not preserved in any surviving witness.
A conjecture must be distinguished from an attested reading.
The precise TEI encoding depends on the project’s policy.
See also:
ConTeXt
ConTeXt is a programmable typesetting system based on TeX and LuaMetaTeX.
In this collection, ConTeXt is used to:
- load XML documents;
- select TEI elements;
- retrieve attributes;
- call XML setups;
- interact with Lua;
- typeset the edited text;
- format apparatus entries;
- control lineation, spacing, and layout;
- produce PDF output.
ConTeXt acts primarily at the level of processing and presentation.
See also:
Correction
A correction is a change made to an earlier textual state.
A manuscript may contain:
original reading
↓
deletion
↓
replacement
↓
later correction
A correction is therefore not always equivalent to a simple variant reading.
An edition may need to identify:
- the original hand;
- a correcting hand;
- the order of corrections;
- the original and corrected forms.
See also:
Critical apparatus
A critical apparatus records textual variation and editorial decisions in relation to an edited text.
A typical entry may contain:
- a location;
- a lemma;
- one or more readings;
- witness sigla;
- an editorial explanation.
A critical apparatus may be printed at the bottom of the page, but it is not merely a footnote system.
Its entries represent structured relations between textual forms.
See also:
Critical edition
A critical edition presents a text established through the comparison and interpretation of textual evidence.
It normally includes:
- an edited text;
- a description of witnesses or sources;
- editorial principles;
- a critical apparatus;
- sometimes commentary or translation.
A critical edition is both:
a scholarly interpretation of the text
+
a publication designed for readers
D
Data record
A data record is a structured group of related values.
An apparatus entry may be represented in Lua as:
{
lemma = "mind",
readings = {
{
text = "soul",
witness = "B",
},
},
}
The record preserves the distinction between:
- lemma;
- reading;
- witness;
- other metadata.
The visible apparatus can then be generated from those values.
See also:
Diplomatic transcription
A diplomatic transcription attempts to reproduce the features of a particular witness as closely as the editorial method allows.
It may preserve:
- spelling;
- punctuation;
- abbreviations;
- line divisions;
- deletions;
- additions;
- corrections;
- scribal forms.
The same TEI source may support both a diplomatic transcription and a normalised reading text.
See also:
Document tree
A document tree is the hierarchical structure formed by the elements of an XML document.
For example:
TEI
├── teiHeader
└── text
└── body
└── p
└── app
├── lem
└── rdg
The tree makes parent, child, sibling, ancestor, and descendant relations visible.
See also:
E
Edited text
The edited text is the principal text presented by the editor.
It may:
- follow one witness closely;
- combine readings from several witnesses;
- include editorial corrections;
- include conjectures.
The edited text is not identical with:
- one individual witness;
- the complete textual tradition;
- the critical apparatus;
- the TEI file itself.
See also:
Element
An element is one of the main structural units of an XML document.
A normal element contains:
- a start tag;
- content;
- an end tag.
For example:
<rdg>soul</rdg>
This can be divided into:
| Part | Example |
|---|---|
| Start tag | <rdg>
|
| Textual content | soul
|
| End tag | </rdg>
|
Elements may contain other elements:
<app> <lem>mind</lem> <rdg>soul</rdg> </app>
See also:
Empty element
An empty element contains no textual content or child elements.
It may be written in self-closing form:
<lb/>
This is structurally equivalent to:
<lb></lb>
In TEI, an empty element may mark a boundary, reference, or other structural point.
Encoding
Encoding is the act of representing textual or editorial information through explicit markup.
For example:
printed form: mind] soul B structured description: lemma: mind reading: soul witness: B
TEI encoding records the components and their relations independently of one final printed appearance.
See also:
F
Filtering
Filtering selects records that satisfy certain conditions and excludes others.
A project may filter apparatus data in order to:
- show only substantive readings;
- omit orthographic variants;
- include only selected witnesses;
- create a shorter apparatus;
- produce a report of omissions.
Filtering may be performed with:
- ConTeXt XML selection;
- Lua;
- a combination of both.
See also:
Function
A function is a block of Lua code that performs a particular task.
A function may:
- normalise a reference;
- retrieve a witness;
- sort sigla;
- build an apparatus entry;
- report an error.
Example:
local function normalise_reference(reference)
return reference:gsub("^#", "")
end
This function removes an initial number sign from a reference such as
#B.
H
Hierarchy
A hierarchy is an organisation in which structures are nested inside other structures.
XML is hierarchical:
document
└── text
└── body
└── paragraph
└── apparatus entry
├── lemma
└── reading
Hierarchy distinguishes XML from a flat sequence of unrelated strings.
See also:
I
Identifier
An identifier is a value used to distinguish one encoded object from another.
A witness may be identified with:
<witness xml:id="B"> ... </witness>
Another element can then refer to it:
<rdg wit="#B">soul</rdg>
The identifier is primarily intended for machine-readable linking.
It is not necessarily the same as the siglum printed for readers.
See also:
Inline apparatus
An inline apparatus places the TEI apparatus entry directly in the encoded textual sequence.
For example:
<p>
The
<app>
<lem wit="#A">mind</lem>
<rdg wit="#B">soul</rdg>
</app>
seeks unity.
</p>
The apparatus entry occupies the position of the variable passage.
Advantages include:
- a direct relation between text and variation;
- simple local access to lemma and readings;
- straightforward sequential processing.
See also:
L
Layout
Layout is the spatial organisation of material on the page.
It includes:
- page size;
- margins;
- text width;
- columns;
- headers and footers;
- note areas;
- apparatus placement;
- spacing between textual layers.
Layout belongs primarily to ConTeXt rather than to TEI encoding.
Lemma
A lemma is the passage in the edited text to which an apparatus entry refers.
In:
mind] soul B
mind is the lemma.
In TEI:
<lem wit="#A">mind</lem>
A lemma may consist of:
- part of a word;
- one word;
- a phrase;
- a line;
- a longer passage.
See also:
Lemma separator
A lemma separator is the sign separating the lemma from the readings in a printed apparatus.
A common example is:
mind] soul B
The closing square bracket is a typographical convention.
It is not part of the lemma itself and does not need to be stored as editorial data in TEI.
Lineation
Lineation is the numbering or identification of lines.
Line numbers may be used to:
- locate apparatus entries;
- support citation;
- compare versions;
- connect text and commentary.
Lineation may follow:
- manuscript lines;
- printed lines;
- poetic verses;
- project-specific units.
ConTeXt renders the line numbers, while TEI records or supports the textual structure to which they refer.
Location-referenced apparatus
A location-referenced apparatus stores apparatus entries separately from the main textual sequence and identifies their locations by reference.
An entry may refer to:
- a line number;
- a paragraph;
- an identifier;
- a passage boundary.
This method separates the main text from the apparatus but requires reliable reference resolution.
See also:
Lua
Lua is a programming language integrated into LuaMetaTeX.
In this collection, Lua may be used to:
- inspect XML elements;
- retrieve attributes;
- build data records;
- resolve references;
- sort readings and witnesses;
- validate project rules;
- transform TEI data;
- prepare information for ConTeXt.
Lua processes the encoded data. It does not replace TEI or ConTeXt.
See also:
Lua table
A Lua table is Lua’s principal data structure.
It can represent:
- lists;
- associative records;
- nested structures;
- witnesses;
- readings;
- apparatus entries.
Example:
local witness = {
id = "B",
siglum = "B",
type = "manuscript",
description = "A later manuscript",
}
Each field remains separate and can be selected or transformed independently.
LuaMetaTeX
LuaMetaTeX is the engine used by current ConTeXt distributions.
It combines TeX-based typesetting with an embedded Lua environment.
This integration permits a workflow such as:
XML structures
↓
Lua data
↓
ConTeXt typesetting
M
Markup
Markup consists of signs added to content in order to identify its structure or function.
In:
<rdg wit="#B">soul</rdg>
the markup includes:
<rdg>;wit="#B";</rdg>.
The textual content is:
soul
Markup need not appear in the final edition.
Namespace
An XML namespace identifies the vocabulary to which element names belong.
A TEI document normally declares the TEI namespace on its root element:
<TEI xmlns="http://www.tei-c.org/ns/1.0"> ... </TEI>
The namespace allows an XML processor to distinguish TEI elements from elements belonging to another vocabulary.
In the guides, the namespace is declared once on
<TEI> and applies by default to the unprefixed TEI
elements inside it.
The namespace address is an identifier. It is not necessary to visit it while processing the file.
See also:
Negative apparatus
A negative apparatus normally records only the witnesses containing readings different from the lemma.
For example:
mind] soul B; understanding C
The witnesses supporting mind are not listed explicitly.
Their support is inferred from the declared witness base and the conventions of the edition.
See also:
Node
A node is one component of an XML tree.
Depending on the processing model, nodes may include:
- elements;
- text;
- attributes;
- comments;
- processing instructions.
In these guides, the term often refers more narrowly to an XML element being inspected or processed.
Note series
A note series is a separately defined class of notes in ConTeXt.
Different series may be used for:
- ordinary footnotes;
- textual variants;
- source notes;
- translation notes;
- commentary.
Each series may have its own:
- numbering;
- formatting;
- placement;
- symbol system.
A critical apparatus can use note mechanisms for placement, but its source data are more structured than an ordinary note.
O
Omission
An omission occurs when a witness lacks material present in another witness or in the edited text.
For example:
A The mind seeks unity. B The mind seeks.
Witness B omits unity.
An omission is a textual relation, not merely an empty character string.
The exact TEI representation depends on the project’s encoding policy.
See also:
Output
Output is a result generated from the encoded and processed source.
Possible outputs include:
- a critical PDF;
- a reading edition;
- an HTML edition;
- a diplomatic transcription;
- a witness report;
- a list of variants;
- a validation report.
One TEI source may therefore produce several outputs:
TEI source ├── reading text ├── critical PDF ├── HTML edition └── editorial report
P
Parallel text
A parallel text presents two or more textual streams in coordinated positions.
Examples include:
- original text and translation;
- two versions of a work;
- two witnesses;
- diplomatic and normalised text;
- text and commentary.
TEI records the structures and relations. ConTeXt controls the visual alignment.
Parent element
A parent element directly contains one or more child elements.
In:
<app> <lem>mind</lem> <rdg>soul</rdg> </app>
<app> is the parent of both
<lem> and <rdg>.
See also:
Parser
An XML parser reads an XML document and constructs its structural representation.
A parser can determine:
- whether the document is well formed;
- where elements begin and end;
- which attributes belong to which elements;
- how the document tree is organised.
A parser does not by itself understand the scholarly significance of a witness or lemma.
That meaning comes from TEI and the project’s editorial model.
Positive apparatus
A positive apparatus explicitly records the witnesses supporting the lemma as well as those supporting the alternative readings.
For example:
mind A D] soul B; understanding C
Here:
- A and D support the lemma;
- B supports
soul; - C supports
understanding.
A positive apparatus is explicit but normally occupies more space than a negative apparatus.
See also:
R
Reading
A reading is a textual form attested, reconstructed, or proposed at a particular location.
A reading may be:
- adopted in the edited text;
- attested in one or more witnesses;
- an omission;
- an addition;
- a corrected state;
- a conjecture.
In TEI, a variant reading is commonly represented by
<rdg>.
See also:
Reading text
A reading text is a version intended primarily for continuous reading.
It may:
- omit the apparatus;
- reduce editorial signs;
- normalise spelling or punctuation;
- include only selected notes.
A reading text can be generated from the same structured source as the full critical edition.
Reference
A reference connects one encoded object with another.
For example:
<rdg wit="#B">soul</rdg>
The value #B refers to:
<witness xml:id="B"> ... </witness>
The initial number sign indicates a reference to an identifier within the same document.
See also:
Reference resolution
Reference resolution is the process of following a reference and retrieving the object it identifies.
For example:
@wit="#B"
↓
interpret #B
↓
find xml:id="B"
↓
retrieve witness data
↓
print the siglum B
Reference resolution may be performed with ConTeXt XML facilities, Lua, or a combination of both.
Rendering
Rendering is the conversion of structured data into a visible form.
The same encoded reading may be rendered as:
soul B
or:
Witness B reads “soul”.
or may be omitted from a reading edition.
Rendering belongs to the processing and typesetting layers, not to the TEI data alone.
Root element
The root element is the single outermost element of an XML document.
In an individual TEI document, the root element is normally:
<TEI xmlns="http://www.tei-c.org/ns/1.0"> ... </TEI>
Everything else is contained directly or indirectly within it.
A well-formed XML document must have exactly one root element.
See also:
S
Schema
A schema describes the structures permitted in a class of XML documents.
A schema may define:
- which elements are allowed;
- where elements may occur;
- which attributes are available;
- which values are permitted;
- which structures are required.
A TEI schema can be used to check whether a document follows a selected TEI model.
A valid document may still contain editorial mistakes.
See also:
Selection
Selection is the process of locating particular XML elements or data records.
Examples include selecting:
- all
<app>elements; - all readings supported by witness B;
- all omissions;
- all witness declarations;
- all entries of a particular type.
Selection identifies the relevant material.
Filtering then determines which selected records should be retained.
Sibling element
Sibling elements are elements that share the same parent.
In:
<body> <p>First paragraph.</p> <p>Second paragraph.</p> </body>
the two <p> elements are siblings.
body ├── p └── p
Their order in the XML document is significant.
Siglum
A siglum is a short label used to identify a witness in scholarly writing.
Examples include:
A B P46 M α Vat.
A siglum is intended primarily for human readers.
It should be distinguished from an XML identifier.
| Function | Example |
|---|---|
| XML identifier | xml:id="ms-paris-123"
|
| Printed siglum | P
|
A project may use the same value for both, but the functions remain distinct.
See also:
Sorting
Sorting arranges records in a defined order.
Witnesses may be sorted:
- alphabetically;
- by siglum;
- by date;
- by family;
- according to a project-specific editorial order.
Readings may also be sorted by:
- type;
- witness support;
- sequence;
- editorial priority.
The final order should not depend accidentally on the order in which the records appear in the XML file.
Source
A source is material from which textual or editorial information is derived.
Sources may include:
- manuscripts;
- printed editions;
- papyri;
- inscriptions;
- typescripts;
- quotations;
- translations;
- previous scholarly editions.
A source is not always identical with a witness. The distinction depends on the editorial model.
Stand-off apparatus
A stand-off apparatus stores apparatus information separately from the main textual sequence.
The apparatus entries point back to passages through identifiers or references.
A simplified structure is:
text ├── passage xml:id="p1" └── passage xml:id="p2" apparatus ├── entry referring to #p1 └── entry referring to #p2
This method keeps the reading text less interrupted but requires careful reference management.
See also:
Structured data
Structured data are data whose components and relations are identified explicitly.
A printed string:
mind] soul B
can be represented as:
entry
├── lemma: mind
└── reading
├── text: soul
└── witness: B
Structured data can be:
- selected;
- checked;
- transformed;
- rendered in several forms.
See also:
T
TEI
TEI stands for the Text Encoding Initiative.
The TEI provides guidelines and an XML vocabulary for representing texts and textual scholarship.
It includes structures for:
- document metadata;
- manuscripts;
- names and places;
- quotations;
- editorial interventions;
- textual variation;
- critical apparatuses.
TEI records scholarly structures and relations. It does not prescribe one final typography.
See also:
TEI document
A TEI document is an XML document using the TEI vocabulary and namespace.
A minimal structure is:
TEI
├── teiHeader
└── text
└── body
A critical-edition document may later add:
- witness declarations;
- apparatus entries;
- lemmas;
- readings;
- editorial metadata;
- references between structures.
See also:
TEI Guidelines
The TEI Guidelines define and explain the TEI encoding model.
They document:
- TEI elements;
- TEI attributes;
- permitted structures;
- alternative encoding methods;
- manuscript description;
- critical apparatuses;
- editorial interventions.
The six guides use only a small part of the complete TEI Guidelines.
A critical-edition project should document any choices it makes between alternative TEI methods.
TEI header
The TEI header contains metadata about the encoded text and the TEI file.
It is represented by <teiHeader>.
It may contain:
- title and responsibility;
- publication information;
- source description;
- encoding practices;
- revision history;
- witness information;
- project-specific editorial policies.
The header documents the identity, origin, and editorial framework of the encoded text.
See also:
Textual content
Textual content is the character data contained inside an XML element.
In:
<rdg wit="#B">soul</rdg>
the textual content is:
soul
The tags and attributes are markup.
An element may contain:
- textual content;
- child elements;
- both.
Textual variant
A textual variant is a difference between two or more textual forms.
Variants may involve:
- spelling;
- words;
- word order;
- omissions;
- additions;
- corrections;
- punctuation;
- longer passages.
Not every difference must be printed in the final apparatus.
The edition’s policy determines which variants are recorded, selected, or suppressed.
Transformation
A transformation converts structured data from one form into another.
Examples include:
- converting TEI entries into Lua tables;
- replacing XML identifiers with display sigla;
- generating a negative apparatus from positive data;
- producing prose descriptions of variants;
- producing ConTeXt commands from TEI records.
A transformation may change the form while preserving the scholarly meaning.
Transposition
A transposition occurs when the same textual material appears in a different order.
For example:
A reason and freedom B freedom and reason
A transposition is more complex than a simple substitution because the same material remains present but is reordered.
See also:
Typesetting
Typesetting is the composition of text and related material into a designed visual form.
It includes:
- fonts;
- spacing;
- line breaking;
- page breaking;
- headings;
- notes;
- apparatus paragraphs;
- line numbers;
- layout.
In this collection, ConTeXt typesets information encoded in TEI and prepared through XML setups or Lua.
V
Validation
Validation checks whether an XML document follows a defined schema or set of rules.
Validation may detect:
- missing required elements;
- forbidden structures;
- invalid attribute values;
- elements used in the wrong context.
Project-specific checks may also detect:
- undeclared witnesses;
- duplicate identifiers;
- missing lemmas;
- unsupported reading types.
Validation improves consistency but does not prove that the editorial interpretation is correct.
well-formedness:
does the XML syntax work?
validation:
does the document follow the selected structural rules?
editorial review:
does the encoding represent the evidence correctly?
See also:
Validation rule
A validation rule is a condition that encoded data must satisfy.
Examples include:
Every @wit reference must resolve to a declared witness. Every xml:id value must be unique. Every apparatus entry must contain the structures required by the project. Every reading type must belong to an approved vocabulary.
Some rules can be expressed in a schema.
Others are better checked with Lua or project-specific processing.
W
Well-formed XML
A document is well formed when it follows the fundamental syntax rules of XML.
Among other requirements:
- there is one root element;
- every opened element is closed;
- elements are properly nested;
- tag names match exactly;
- attribute values are quoted;
- reserved characters are escaped where necessary.
Well formed:
<app> <lem>mind</lem> <rdg>soul</rdg> </app>
Not well formed:
<app> <lem>mind <rdg>soul</app>
A well-formed document is not necessarily valid TEI.
See also:
Witness
A witness is a source that preserves or transmits a form of the text.
Depending on the project, witnesses may include:
- manuscripts;
- printed editions;
- papyri;
- inscriptions;
- typescripts;
- quotations;
- translations;
- transcriptions.
A witness is normally:
- declared in the TEI document;
- assigned an identifier;
- associated with a siglum;
- referenced from readings.
For example:
<witness xml:id="B"> <abbr>B</abbr> <desc>A fifteenth-century manuscript.</desc> </witness>
See also:
Witness agreement
Witness agreement occurs when two or more witnesses support the same reading.
For example:
A D mind B C soul
In TEI:
<rdg wit="#B #C">soul</rdg>
The encoding records the agreement.
Its textual significance remains a matter of editorial interpretation.
Witness family
A witness family is a group of witnesses thought to share textual or historical characteristics.
A family may reflect:
- common ancestry;
- a recension;
- a regional tradition;
- a group of related manuscripts;
- a project-specific classification.
A witness family should not replace individual declarations where individual support matters.
Witness list
A witness list is the part of a TEI document in which witnesses are declared and described.
It is commonly represented by <listWit>:
<listWit>
<witness xml:id="A">
<abbr>A</abbr>
<desc>The principal manuscript.</desc>
</witness>
<witness xml:id="B">
<abbr>B</abbr>
<desc>A later manuscript.</desc>
</witness>
</listWit>
Readings elsewhere in the document can refer to these declarations.
See also:
X
XML
XML stands for Extensible Markup Language.
XML provides a syntax for representing structured information through:
- elements;
- attributes;
- textual content;
- hierarchy;
- references.
XML does not itself define the meaning of:
- witness;
- lemma;
- reading;
- critical apparatus.
TEI supplies a scholarly vocabulary for representing those concepts in XML.
XML └── general syntax for structured documents TEI └── scholarly vocabulary expressed in XML
See also:
XML declaration
The XML declaration may appear at the beginning of an XML file:
<?xml version="1.0" encoding="UTF-8"?>
It identifies:
- the XML version;
- the file encoding.
It is not an XML element and does not belong to the TEI vocabulary.
XML setup
An XML setup is a ConTeXt mechanism associating processing instructions with XML elements.
Conceptually:
TEI element
↓
ConTeXt XML setup
↓
typeset result
A setup may:
- retrieve attributes;
- select child elements;
- flush textual content;
- call another setup;
- call a Lua function;
- apply typography.
See also:
XML tree
An XML tree is the hierarchical representation of an XML document.
For example:
TEI
├── teiHeader
└── text
└── body
└── p
└── app
├── lem
└── rdg
Lua and ConTeXt can inspect and process nodes within this tree.
xml:id
xml:id is the standard XML attribute used to assign a unique
identifier to an element.
For example:
<witness xml:id="A"> <abbr>A</abbr> </witness>
Another element can refer to it:
<rdg wit="#A">mind</rdg>
The value of xml:id:
- must be unique within the document;
- should remain stable;
- is intended for machine-readable linking;
- is not necessarily the printed siglum.
See also:
Principal TEI elements and attributes
This section gathers the TEI names used repeatedly throughout the guides.
<app>
The TEI element <app> represents an apparatus entry.
It may contain:
- one lemma;
- one or more readings;
- groups of readings;
- notes or other editorial structures.
Example:
<app> <lem wit="#A">mind</lem> <rdg wit="#B">soul</rdg> <rdg wit="#C">understanding</rdg> </app>
Conceptually:
app ├── lem ├── rdg └── rdg
See also:
<lem>
The TEI element <lem> represents the lemma.
Example:
<lem wit="#A">mind</lem>
It may identify:
- the text adopted by the editor;
- the witnesses supporting it;
- other editorial information.
ConTeXt determines how the lemma is printed.
<listWit>
The TEI element <listWit> contains witness declarations.
Example:
<listWit> <witness xml:id="A">...</witness> <witness xml:id="B">...</witness> </listWit>
It provides a central place from which witness information can be retrieved.
<rdg>
The TEI element <rdg> represents a reading.
Example:
<rdg wit="#B">soul</rdg>
It may record:
- the textual form;
- supporting witnesses;
- the type of variation;
- certainty;
- responsibility;
- other project-specific information.
See also:
<rdgGrp>
The TEI element <rdgGrp> groups related readings.
Example:
<rdgGrp type="orthographic"> <rdg wit="#B">soule</rdg> <rdg wit="#C">soul</rdg> </rdgGrp>
The group may express:
- shared classification;
- related forms;
- hierarchical relations;
- project-specific analysis.
Its meaning should be documented by the edition.
<TEI>
The TEI element <TEI> is the root element of an
individual TEI document.
Example:
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
...
</teiHeader>
<text>
...
</text>
</TEI>
It normally contains:
- one TEI header;
- one encoded text.
<teiHeader>
The TEI element <teiHeader> contains metadata and
documentation about the encoded resource.
It may record:
- title;
- responsibility;
- publication;
- sources;
- encoding principles;
- revisions;
- witness information.
See also:
<witness>
The TEI element <witness> declares or describes a
textual witness.
Example:
<witness xml:id="A"> <abbr>A</abbr> <desc>The principal manuscript.</desc> </witness>
The element normally has an xml:id so that readings can refer
to it.
@wit
The attribute @wit identifies the witness or witnesses
supporting a lemma or reading.
One witness:
<rdg wit="#B">soul</rdg>
Several witnesses:
<rdg wit="#B #C #D">soul</rdg>
The values are references.
They are not necessarily identical with the sigla printed in the apparatus.
@wit="#B #C"
↓
split the references
↓
resolve B and C
↓
retrieve their sigla
↓
print B C
Common distinctions
A note is not an apparatus entry
| Ordinary note | Critical apparatus entry |
|---|---|
| Usually contains a relatively independent comment | Records a relation between textual forms |
| Often attached to one point in the text | May concern a word, phrase, line, or longer passage |
| May be stored as prose | Benefits from structured representation |
| Does not normally cite witness support systematically | Commonly associates readings with witnesses |
A siglum is not an XML identifier
| Siglum | XML identifier |
|---|---|
| Intended for readers | Intended for machine-readable linking |
| May contain typographical conventions | Must follow XML identifier rules |
| May vary between publications | Should remain stable in the encoded source |
Example: Par.
|
Example: ms-paris-123
|
XML is not TEI
| XML | TEI |
|---|---|
| General markup syntax | Scholarly vocabulary and encoding model |
| Defines elements, attributes, and hierarchy | Defines elements such as <app>,
|
| Does not define textual criticism | Provides recommendations for textual scholarship |
| Can express many vocabularies | Is one particular XML vocabulary |
TEI is not the printed edition
| TEI encoding | Printed rendering |
|---|---|
| Records semantic and editorial structures | Presents selected information to readers |
| May preserve more information than is printed | May abbreviate or suppress information |
| Uses elements, attributes, identifiers, and references | Uses typography, punctuation, spacing, and layout |
| Remains independent of one design | Is produced for a particular publication |
Validation is not editorial proof
A document may be valid XML and valid TEI while still containing:
- an incorrect witness attribution;
- a mistaken lemma;
- an incomplete collation;
- an unjustified conjecture;
- an inconsistent editorial decision.
Validation asks:
Does the document follow the declared structural rules?
Editorial review asks:
Does the document represent the textual evidence correctly?
Both are necessary, but they are not interchangeable.
The complete workflow in one view
TEXTUAL EVIDENCE
manuscripts, editions, inscriptions, other witnesses
↓
EDITORIAL ANALYSIS
collation, lemmas, readings, omissions, conjectures
↓
TEI XML ENCODING
elements, attributes, identifiers, references
↓
VALIDATION
schema rules and project-specific checks
↓
PROCESSING
ConTeXt XML setups and Lua functions
↓
SELECTION AND TRANSFORMATION
sorting, grouping, filtering, reference resolution
↓
TYPESETTING
edited text, apparatus paragraphs, lineation, layout
↓
OUTPUT
critical PDF, reading text, HTML edition, reports
Collection: Building critical editions from TEI XML · Guide 1: Understanding TEI documents for critical editions · Next glossary additions: terms introduced in Declaring witnesses in TEI critical editions
Related pages
- Building critical editions from TEI XML
- Building a critical apparatus with ConTeXt
- Understanding TEI documents for critical editions
- TEI XML
- XML
- ConTeXt and Lua programming
- Processing XML with Lua
Glossary · Collection overview · Guide 1: Understanding TEI documents for critical editions