TEI by Example. Module 4: Poetry Edward Vanhoutte Ron Van den Branden Edward Vanhoutte Ron Van den Branden Melissa Terras Association for Literary and Linguistic Computing (ALLC) Centre for Digital Humanities (CDH), University College London, UK Centre for Computing in the Humanities (CCH), King's College London, UK Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium
Centre for Scholarly Editing and Document Studies (CTB) Royal Academy of Dutch Language and Literature Koningstraat 18 9000 Gent Belgium
ctb@kantl.be
Edward Vanhoutte Melissa Terras Ron Van den Branden
Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium Gent
Centre for Scholarly Editing and Document Studies (CTB) Royal Academy of Dutch Language and Literature Koningstraat 18 9000 Gent Belgium

Licensed under a Creative Commons Attribution ShareAlike 3.0 License

9 July 2010
TEI By Example. Edward Vanhoutte editor Ron Van den Branden editor Melissa Terras editor

Digitally born

TEI By Example offers a series of freely available online tutorials walking individuals through the different stages in marking up a document in TEI (Text Encoding Initiative). Besides a general introduction to text encoding, step-by-step tutorial modules provide example-based introductions to eight different aspects of electronic text markup for the humanities. Each tutorial module is accompanied with a dedicated examples section, illustrating actual TEI encoding practise with real-life examples. The theory of the tutorial modules can be tested in interactive tests and exercises.

en-GB added distinction gi -- gi scheme="..." -- tag final spellcheck release revision and added 2.3. grouping structures and 6.2. dedications added 6.2 Acrostics -added new prose with internal rhyme under 3.1inserted enjambements under 4.4 and rewrote that sectionedited summary of 4added summary to 5removed 'suggestions' div correction of text revision revision revision
Examples for Module 4: Poetry
William Blake: Songs of Innocence and of Experience

This example features a fragment of William Blake's Songs of innocence and of experience, encoded and made available by the University of Virginia Library, for their Text Collection. It forms a good example of how an anthology can be encoded. The work is considered as a single text (text) whose body contains both books. Both Songs of Innocence and Songs of Experience are encoded as div1 numbered text divisions, with a type attribute with value book. Inside these books, all 45 poems are encoded as div2 type="poem". All poems have a title (head) and are subdivided into stanzas (lg type="stanza") and lines (l). Page breaks are recorded with pb/ elements, whose n attribute contain the page number.

Songs of Innocence Introduction Piping down the valleys wild, Piping songs of pleasant glee, On a cloud I saw a child, And he laughing said to me: "Pipe a song about a Lamb!" So I piped with merry chear. "Piper, pipe that song again;" So I piped, he wept to hear. "Drop thy pipe, thy happy pipe; Sing thy songs of happy chear:" So I sung the same again, While he wept with joy to hear. "Piper, sit thee down and write In a book, that all may read." So he vanis'd from my sight, And I pluck'd a hollow reed, And I made a rural pen, And I stain'd the water clear, And I wrote my happy songs Every child may joy to hear. The Shepherd How sweet is the Shepherd's sweet lot! From the morn to the evening he strays; He shall follow his sheep all the day, And his tongue shall be filled with praise. For he hears the lamb's innocent call, And he hears the ewe's tender reply; He is watchful while they are in peace, For they know when their Shepherd is nigh. The Ecchoing Green The Sun does arise, And make happy the skies; The merry bells ring To welcome the Spring; The sky-lark and thrush, The birds of the bush, Sing louder around To the bells' chearful sound, While our sports shall be seen On the Ecchoing Green. Old John, with white hair, Does laugh away care, Sitting under the oak, Among the old folk. They laugh at our play, And soon they all say: "Such, such were the joys When we all, girls & boys, In our youth time were seen On the Ecchoing Green." Till the little ones, weary, No more can be merry; The sun does descend, And our sports have an end. Round the laps of their mothers Many sisters and brothers, Like birds in their nest, Are ready for rest, And sport no more seen On the darkening Green. The Lamb Little lamb, who made thee? Dost thou know who made thee? Gave thee life & bid thee feed, By the stream & o'er the mead; Gave thee clothing of delight, Softest clothing, wooly, bright; Gave thee such a tender voice, Making all the vales rejoice? Little Lamb, who made thee? Dost thou know who made thee? Little Lamb, I'll tell thee, Little Lamb, I'll tell thee: He is called by thy name, For he calls himself a Lamb. He is meek & he is mild; He became a little child. I a child & thou a lamb. We are called by his name. Little Lamb, God bless thee! Little Lamb, God bless thee! Based on a TEI P4 XML encoding of Blake, William (1789). Songs of Innocence and of Experience. London: W Blake. Encoded and made available by the University of Virginia Library, Text Collection at http://etext.lib.virginia.edu/toc/modeng/public/BlaSong.html
Robert Browning: Porphyria's Lover

The following example is the poem Porphyria's Lover by Robert Browning. Although no formal line groups are discerned, it has a systematic rhyme scheme repeating every 5 lines. This is indicated in the outmost lg's rhyme attribute. Some of the lines break up syntactic sentences; those have been marked with the value "yes" for an enjamb attribute.

THE rain set early in to-night, The sullen wind was soon awake, It tore the elm-tops down for spite, And did its worst to vex the lake: I listen'd with heart fit to break. When glided in Porphyria; straight She shut the cold out and the storm, And kneel'd and made the cheerless grate Blaze up, and all the cottage warm; Which done, she rose, and from her form Withdrew the dripping cloak and shawl, And laid her soil'd gloves by, untied Her hat and let the damp hair fall, And, last, she sat down by my side And call'd me. When no voice replied, She put my arm about her waist, And made her smooth white shoulder bare, And all her yellow hair displaced, And, stooping, made my cheek lie there, And spread, o'er all, her yellow hair, Murmuring how she loved me—she Too weak, for all her heart's endeavour, To set its struggling passion free From pride, and vainer ties dissever, And give herself to me for ever. But passion sometimes would prevail, Nor could to-night's gay feast restrain A sudden thought of one so pale For love of her, and all in vain: So, she was come through wind and rain. Be sure I look'd up at her eyes Happy and proud; at last I knew Porphyria worshipp'd me; surprise Made my heart swell, and still it grew While I debated what to do. That moment she was mine, mine, fair, Perfectly pure and good: I found A thing to do, and all her hair In one long yellow string I wound Three times her little throat around, And strangled her. No pain felt she; I am quite sure she felt no pain. As a shut bud that holds a bee, I warily oped her lids: again Laugh'd the blue eyes without a stain. And I untighten'd next the tress About her neck; her cheek once more Blush'd bright beneath my burning kiss: I propp'd her head up as before, Only, this time my shoulder bore Her head, which droops upon it still: The smiling rosy little head, So glad it has its utmost will, That all it scorn'd at once is fled, And I, its love, am gain'd instead! Porphyria's love: she guess'd not how Her darling one wish would be heard. And thus we sit together now, And all night long we have not stirr'd, And yet God has not said a word! TBE crafted example encoding of Porphyria's Lover. In: Browning, Robert (1842), Dramatic Lyrics.
Lewis Carroll: The Mouse's Tale

The following example is an excerpt from Lewis Carroll's The Mouse's Tale, a poem appearing in the third chapter of Alice in Wonderland. It is a concrete poem in which the lines consist of only a couple of words, laid out in such a way that they visualise the mouse's winding tail:

For the encoder, this specific visual layout challenges the TEI's orientation towards logical structures to some extent. In the example, the visual lines are encoded as logical lines (l); the visual particularities (font size, indentation) are formalised as values of a rend attribute on each line. Of course, any value system is allowed for the rend attribute; it's up to the rendition layer to decide how to interpret these values and format them on the screen / in print.

Alternatively, the lines could have been treated on a more logical level, spanning multiple physical lines. The line breaks then could have been encoded with lb/ elements, and specific visual characteristics as values for rend attributes on seg elements. Since the spaces are quite significant, the TEI special purpose element space could have been used as well.

"Fury said to a mouse, That he met in the house, 'Let us both go to law: I will prosecute you. Come, I'll take no denial; We must have a trial: For really this morning I've nothing to do.' Said the mouse to the cur, 'Such a trial, dear sir, With no jury or judge, would be wasting our breath.' 'I'll be judge, I'll be jury,' Said cunning old Fury; 'I'll try the whole cause, and condemn you to death.' " TBE crafted example encoding of Carroll, Lewis (1865). Alice's Adventures in Wonderland. New York: D. Appleton and co., 37, based on its hypertext encoding at http://bootless.net/mouse.html.
William Shakespeare: Sonnet 17

The following example illustrates very elaborate encoding of a sonnet by William Shakespeare. As most sonnets, this poem is structurally analysed in three quatrains and one couplet. The lines themselves are further divided in metrical feet (seg type="foot") whose metrical analysis is provided in their containing lg's met attribute. For feet that metrically diverge from the metrical system the actual metrical realisation is given in a real attribute. Where a foot runs over several syntactic phrases, the boundary between these phrases is marked with a caesura element. The rhyme scheme is encoded in the rhyme attribute at the stanza level. In the example, the relevant teiHeader fragment is included for clarity's sake.

Note how the original whitespace is preserved in the seg elements. +- -+ ++ -- -+- --+ metrical promimence metrical non-prominence foot boundary metrical line boundary

Metrically prominent syllables are marked '+' and other syllables '-'. Foot divisions are marked by a vertical bar, and line divisions with a solidus.

This notation may be applied to any metrical unit, of any size (including, for example, individual feet as well as groups of lines).

The 'real' attribute has been used to indicate possible variations in the iambic base metre. Where this attribute is not included, it is assumed each foot inherits the iambic metre defined for the overall division of text.

The 'met' attribute has been used in feet which have a missing or additional syllable rather than the two syllables expected, although the line may still confirm to the metre of the poem.

Sonnet 17 Who will believe my verse in time to come, If it were fill'd with your most high deserts? Though yet, heaven knows, it is but as a tomb Which hides your life and shows not half your parts. If I could write the beau ty of your eyes And in fresh num bers num ber all your graces, The age to come would say ‘This po et lies; Such heaven ly touch es ne'er touch'd earth ly faces’. So should my pap ers, yell owed with their age, Be scorn'd like old men of less truth than tongue; And your true rights be term' a po et's rage, And stretch ed me tre of an an tique song. But were some child of yours alive that time, You should live twice- in it, and in my rhyme.
Based on a TEI P4 XML encoding of Islam, Mubina (2004). A Selection of Sonnets: electronic edition encoded in XML with a TEI DTD. Unpublished Master's Dissertation, London: University College London (based on Alexander, Peter (1978) The Complete Works of William Shakespeare. London: Collins.).
Algernon Charles Swinburne: Sestina

This example features a so-called Sestina, a highly structured verse form consisting of 6 six-line stanzas followed by 1 three-line stanza. While the same set of six words conclude the lines of each stanza, in each stanza they occur in a different order. Since Swinburne in this example adheres to a strictly alternating rhyming scheme (if the internal rhyme of the tercet is not taken into account), the line ending patterns in this example vary from the traditional structural pattern for a sestina.

In this example, the rhyming scheme is indicated per stanza, using the rhyme attribute on the stanza's lg element. Rhyming words are marked with rhyme elements, with a label attribute indicating their place in the rhyming scheme. In order to trace the line ending scheme, the ending words of the first stanza have been identified with a xml:id attribute. Since they were already marked with a rhyme element, identification happens on this level. In the other stanzas, each line ending word is connected to its counterpart of the first stanza with a corresp attribute. This is one of the global linking attributes, whose value formalises a correspondence relationship with another identified element (see P5 16.4 Correspondence and Alignment). Since the reference is to a local element (an identified element in the same document), its value takes the form of a shorthand local pointer by simply preceding the target's xml:id value with a hash sign #. Here too, the rhyme element provides a sufficient peg for pointing out this correspondence. Otherwise, if no other element would have been available, a seg element could be introduced for identifying or referring to a span of text.

I saw my soul at rest upon a day As a bird sleeping in the nest of night, Among soft leaves that give the starlight way To touch its wings but not its eyes with light; So that it knew as one in visions may, And knew not as men waking, of delight. This was the measure of my soul's delight; It had no power of joy to fly by day, Nor part in the large lordship of the light; But in a secret moon-beholden way Had all its will of dreams and pleasant night, And all the love and life that sleepers may. But such life's triumph as men waking may It might not have to feed its faint delight Between the stars by night and sun by day, Shut up with green leaves and a little light; Because its way was as a lost star's way, A world's not wholly known of day or night. All loves and dreams and sounds and gleams of night Made it all music that such minstrels may, And all they had they gave it of delight; But in the full face of the fire of day What place shall be for any starry light, What part of heaven in all the wide sun's way? Yet the soul woke not, sleeping by the way, Watched as a nursling of the large-eyed night, And sought no strength nor knowledge of the day, Nor closer touch conclusive of delight, Nor mightier joy nor truer than dreamers may, Nor more of song than they, nor more of light. For who sleeps once and sees the secret light Whereby sleep shows the soul a fairer way Between the rise and rest of day and night, Shall care no more to fare as all men may, But be his place of pain or of delight, There shall he dwell, beholding night as day. Song, have thy day and take thy fill of light Before the night be fallen across thy way; Sing while he may, man hath no long delight. TBE crafted example encoding of Sestina. In: Swinburne, Algernon Charles (1924), Swinburne's Collected Poetical Works. London: William Heinemann, 330-31.