Skip to content
TEI & XML Encoding

To encode a critical apparatus in TEI, enable the textcrit module, declare every witness once in a listWit inside sourceDesc, and then for each point of variation wrap an app element containing one lem (your chosen reading) and one or more rdg elements (the variants), linking each to its witnesses with the wit attribute. The most common approach is parallel segmentation, where the app sits inline in the base text exactly where the variant occurs.

What is a critical apparatus in TEI terms?

A critical apparatus records, at each place the witnesses disagree, what the editor chose (the lemma) and what the alternatives are (the readings), each tied to the source that attests it. TEI represents this with three core elements: app (the apparatus entry), lem (the lemma), and rdg (a reading). It is the machine-readable equivalent of the footnote band at the bottom of a scholarly edition.

Which method should I use?

TEI defines three encoding methods. Choose before you start — mixing them is painful.

MethodApparatus locationBest for
Parallel segmentationInline, in the base textMost editions; readable, easy XSLT
Double-end-pointSeparate, with start/end anchorsOverlapping variants
Location-referencedSeparate, pointing by line/pageVery dense apparatus, print fidelity

For most projects, parallel segmentation is the right default: the variant lives where it happens, so it is easy to read in the source and straightforward to transform.

How do I set up witnesses?

Declare each witness once with an xml:id. This is your single source of truth for sigla:

xml
<sourceDesc>
  <listWit>
    <witness xml:id="A">Paris, BnF, MS lat. 4321</witness>
    <witness xml:id="B">London, BL, Harley 5678</witness>
    <witness xml:id="C">Editio princeps, Venice 1501</witness>
  </listWit>
</sourceDesc>

Now any rdg wit="#A #B" resolves to two named manuscripts, and your output stylesheet can print the siglum without hard-coding it in the text.

How do I encode a single point of variation?

Here is parallel segmentation in practice, where witnesses split between "regem" and "regnum":

xml
<l>Et venit ad
  <app>
    <lem wit="#A #B">regem</lem>
    <rdg wit="#C" type="orthographic">regnum</rdg>
  </app>
  magnum.</l>

The base reading is the lem; the variant is the rdg. Adding type to the rdg lets you later separate orthographic noise from genuine substantive differences.

How do I record an editorial conjecture?

When the editor proposes a reading no witness attests, treat the editor as a source. Declare them in the header and point resp at that id:

xml
<app>
  <lem>obscuram</lem>
  <rdg wit="#A #B #C">obscuratam</rdg>
  <rdg resp="#ER" type="conjecture">obscaenam</rdg>
</app>

Here #ER is Elara Reed declared in respStmt. This keeps editorial responsibility explicit and auditable — essential for a defensible edition.

How do I turn the apparatus into footnotes?

The TEI stays presentation-neutral; an XSLT stylesheet builds the visible apparatus. A minimal template iterates the rdg siblings and resolves each wit:

xslt
<xsl:template match="tei:app">
  <span class="lem"><xsl:value-of select="tei:lem"/></span>
  <xsl:for-each select="tei:rdg">
    <span class="rdg">
      <xsl:value-of select="."/> (<xsl:value-of
        select="for $w in tokenize(@wit,' ')
                return key('witById', substring($w,2))/text()"/>)
    </span>
  </xsl:for-each>
</xsl:template>

Because sigla live in listWit, changing a shelfmark updates every footnote automatically.

What trade-offs should I weigh?

Apparatus encoding is detailed work. Parallel segmentation can struggle when two variants overlap (the app spans must nest cleanly); that is exactly when double-end-point pays off. Resist encoding every orthographic flicker unless your edition genuinely needs it — a typed, filterable apparatus is better than an exhaustive, unreadable one. Decide your collation policy up front and document it in encodingDesc.

Key Takeaways

  • Enable the textcrit module; the core elements are app, lem, and rdg.
  • Declare each witness once in listWit with an xml:id; reference it with wit="#id".
  • Parallel segmentation is the best default; switch to double-end-point for overlapping variants.
  • Use the type attribute on rdg to separate substantive from orthographic variants.
  • Encode editorial conjectures with resp pointing to the editor in the header.
  • Keep the markup presentation-neutral and let XSLT build the footnote band.
  • Document your collation policy in encodingDesc so the apparatus is defensible.

Frequently Asked Questions

Which TEI module do I need for a critical apparatus?

The textcrit module, which defines app, lem, rdg, and related elements. Add it to your ODD or use tei_all, then declare witnesses in a listWit inside the header's sourceDesc.

What is the difference between the parallel-segmentation and location-referenced methods?

Parallel segmentation embeds the app inline in the base text, so variants sit where they occur. The location-referenced and double-end-point methods keep the apparatus separate and point back into the text by reference, better for very dense apparatus.

Give each witness an xml:id in listWit, then reference them from rdg and lem using the wit attribute with a space-separated list of hash-prefixed pointers, for example wit="#A #C".

Can I distinguish a substantive variant from a spelling variant?

Yes. Use the type attribute on rdg (for example type="substantive" or type="orthographic") so you can later filter or style classes of variant differently in the output.

How do I encode a conjecture or editorial emendation?

Use rdg with a resp attribute pointing to the editor in the header, or wrap it in <corr> / <choice> for simple emendations. A conjecture with no manuscript support is a rdg whose witness is the editor, not a siglum.

How is the apparatus rendered for readers?

An XSLT or processing step reads the app elements and generates footnotes or a separate apparatus band, resolving each wit pointer back to its siglum. The TEI markup stays presentation-neutral.