Overlapping and fragmented elements: q, quote, l, and lg
Strategies for handling overlapping textual features, particularly quotations and poetry
The overlap of multiple textual features is a recurring topic in the text encoding world, and the TEI provides several mechanisms for dealing with it. The general entry on overlap discusses this issue at a broader level; here, we discuss the specific problem of overlapping quotations and verse lines, which in practice is the most frequent and troublesome instance of overlap in the literary and historical texts this Guide addresses.
When quotations and verse lines overlap, as in example 1, one set of elements must be broken into fragments that nest cleanly inside the other. In order to be able to recompose the fragmented elements into wholes (so that for instance a quotation can be understood as a single unit), some method must be used to indicate that each fragment is part of a larger whole. The TEI provides two methods for doing this.
- The part attribute
The simplest method of recomposing fragmented elements is the part attribute. TEI provides the part attribute for l and lg for use in fragmenting and linking these elements. (It is not intended only to deal with overlap, but also to handle lines of verse that are shared among multiple dramatic speakers.) The part attribute may have the following values: I for initial M for medial F for final
Each fragmented line should have at least one initial and one final part; it may have as many medial parts as necessary (zero or more).
We also feel it is useful to have the part attribute available on the q and quote elements for this same purpose, and the DTD extensions that accompany this Guide include this provision.
- The next and prev
attributes
For more complex cases the TEI also provides the next and prev attributes on l, q, and quote. These allow the encoder to indicate that a given fragment is part of a sequence whose parts are explicitly named and ordered. This method requires that each element fragment be given an id to which the next and prev attributes can refer. This method is more complex and time-consuming, and we recommend that you use this method only for cases where part is not adequate: for instance, in cases where a quotation is nested inside another quotation, making the identification of part sequences impossible. See example 3 below.
When encoding overlapping verse and quotations, the simplest encoding (the encoding with the least fragmentation) may be one in which the nesting of l and quote or q runs counter to the intuitive nesting of these elements. For instance, under normal circumstances, where a poetic stanza which contains a piece of quoted speech, it would be natural to nest the q element inside the lg element, since the quotation is part of the poetry. Nesting the lg inside the q would imply that a person outside the poem was quoting or reciting the poem. But this reversed nesting in some cases may produce a much simpler encoding than the proper nesting. See example 4. You will need to decide whether the nesting of these elements is important to you, and whether you will be consistent in using it to express the text’s semantics, or whether you will treat it as arbitrary and choose whatever encoding is simplest.
Examples
Example 1. Simple use of part for q
“I never thought,” said he, “that I’d live to see the day.” <p><q part="I">I never thought</q>, said he, <q part="F">that I’d live to see the day</q></p>
Example 2. Simple use of part for l (a single line of verse split between two lg elements)
<lg type="verse.para"> <l>Hence my obeisance, my devotion hence,</l> <l part="I">And hence my transport.</l></lg> <lg type="verse.para"><l part="F">Nor should this, perchance,</l> <l>Pass unrecorded, that I still had loved</l> ...</lg>
Example 3. More complex encoding using part for the outer quotation and next and prev for the inner quotation.
<q part="I"> <l>I’ll tell thee how it came about</l> <l>She fell upon me and turned me out.</l> <l>I cried <q id="q01" next="q02">But surely you’re mistaken,</q></l> <l><q id="q02" prev="q01">To leave me thus poor and forsaken</q></l> <l>But nothing did my words avail.</l> </q> <l>Jane paused for breath in great travail</l> <l>But then resumed, no whit deterred,</l> <q part="F"> <l>I thought perhaps she hadn’t heard.</l> </q>