TEI by Example Module 3: Prose Ron Van den Branden Edward Vanhoutte Melissa Terras Association for Literary and Linguistic Computing (ALLC) Centre for Data, Culture and Society, University of Edinburgh, UK 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
Edward Vanhoutte Melissa Terras
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 integrated examples in a single file
Module 3: Prose
British Printed Images

The next example contains Dr Malcolm Jones’ (University of Sheffield) description of printed images from early modern England, in the context of the project British Printed Images to 1700 by the Centre for Computing in the Humanities of King’s College, London.

This prose description of an image is wrapped in a div element, consisting of a head and multiple paragraphs. The first paragraph contains the image, with a pointer to its digital representation in the graphic element’s url attribute. Notice how the rend attribute is used to encode specific information for rendition of the image as a thumbnail. Although the caption of the image is encoded as bold text inside a p, it could as well have been encoded as head. The text contains a quote, marked as q and containing a poem, organised in line groups and lines. Inside the paragraphs, highlighted text is marked with hi, titles with title, and notes with note. For a discussion of these elements, see .

No. 2, September 2006

‘A New yeares guift for shrews’

A New yeares guift for shrews is a diminutive sheet engraved c.1630 and signed by the relatively unknown Thomas Cecill, who seems to have been active between 1625 and 1640. It bears the imprint of the even less known Edward Lee, whose only other issue is a large equestrian portrait of Charles I.

In a series of unified scenes, it depicts the traditional nagging wife eventually beaten by her husband, and ultimately chased off by the devil. It is accompanied by the following rhyme of a traditional type, reminiscent of the ditty about Solomon Grundy, who was Born on Monday, and then on successive days christened, married, taken fatally ill and Buried on Sunday:

Who marieth a wife uppon a Moneday, If she will not be good uppon a Tewesday, Lett him go to the wood uppon a Wensday, And cutt him a cudgell uppon the Thursday, And pay her soundly uppon a Fryday; And And: if she mend not, the Divil take her a Saterday Then may he eate his meate in peace on the Sonday.

In the final scene the husband is shown happily enjoying a jug of ale at an ale-bench outside ‘The Swan’ - to judge from the inn-sign. Another interesting detail of the contemporary street-scene is the latticed box attached to the tavern wall: at lattice, the Oxford English Dictionary explains: A window of lattice-work (usually painted red), or a pattern on the shutter or wall imitating this, formerly a common mark of an alehouse or inn. The Dictionary illustrates this usage with a quotation from Richard Harvey's Plaine Percevall (1590), and one not inappropriate to our print: As they which determine upon an Ale bench whether the passenger that passeth by the lettise be a Saint or a Divell.

It was clearly popular, for it appears in Peter Stent’s advertisements of 1654 and 1662, and is still listed in his successor John Overton’s catalogue of 1673,Alexander Globe, Peter Stent, London Printseller, c. 1642-65 (Vancouver, 1985), p. 123 (no.*448). yet only the unique impression in the British Museum's Department of Prints & Drawings survives - testimony to the great rarity of such popular material.

David Kunzle was the first to point out the likely dependence of A New yeares guift on a contemporary German sheet, Ein köstlich gutes bewertes Recept vor die Männer so böse Weiber haben [A precious and valuable prescription for men who have such evil wives], though in the German sheet the process of correction takes nine days; he drives into the wood on Monday, cuts sticks on Tuesday, beats her on Wednesday, and so on.D. Kunzle, The Early Comic Strip, c. 1450-1825 (Berkeley and Los Angeles, 1973), pp. 230-1 (fig. 8-9). The English shrew is shown fleeing before a sturdy devil, his pitchfork raised, as he pursues her – into hell, presumably.

British Museum 1850,1109.10. Dimensions of original: 189 mm x 206 mm.

Adapted from the TEI P4 XML source encoding of Malcolm Jones’ article Print of the month, September 2006 (Jones 2006). TEI XML source is no longer available online.
Charles Muller: biblStruct Examples

In the technical documentation of the Yogācāra Bibliography, Charles Muller illustrates the encoding conventions used for the bibliographic encoding of different types of publications, using biblStruct.

A Standard Published Manuscript

As for any independently published work, the most common bibliographic facts of interest are the work’s author, title, place and date of publication, and publisher. These are encoded with their relevant TEI elements, and grouped in a monogr element. Notice, how the level attribute on the title element indicates the status of this work as monography (by means of the m value).

Lusthaus, Dan Buddhist Phenomenology: A Philosophical Investigation of Yogācāra Buddhism and the Ch'eng Wei-shih Lun London RoutledgeCurzon 2002 A biblStruct encoding of a standard published manuscript (Muller).
An Article in a Volume

When a bibliographic item is part of a larger bibliographic item, both can be described in a single biblStruct element. The details of the smallest bibliographic item (the article) are grouped in an analytic element. Notice, how the status of the article’s title is pointed out in the level attribute on the title element: a for analytic.

The containing bibliographic item is described in the monogr element, with the usual bibliographic elements. Notice, how the scope of the article within the larger work is encoded with biblScope, whose unit of measurement is identified as pages in a unit attribute.

Weinstein, Stanley The Ālaya-vijñāna in Early Yogācāra Buddhism--a Comparison of the Meaning in the Saṃdhinirmocana-sūtra and Vijñapti-mātratā-siddhi of Dharmapāla Transactions of the International Conference of Orientalists in Japan 46-58 Tokyo Toho Gakkai 1958 Adapted from a TEI P4 biblStruct encoding of an article in a volume (Muller).
An Article in a Journal

The encoding of a journal article closely resembles that of an article in a volume: details of the article go in analytic, while those of the larger work are enclosed in monogr. Notice, how the status of journal title is identified by the j value for the title’s level attribute. Here, the biblScope element is used both for identifying the pages on which the article appears (unit="page"), and the journal volume in which the article appears (unit="volume").

Sponberg, Alan Dynamic Liberation in Yogācāra Buddhism Journal of the International Association of Buddhist Studies 2(1) 44-64 1979 Adapted from a TEI P4 biblStruct encoding of an article in a journal (Muller).
An Edited Volume

The encoding of an edited volume closely resembles that of any other independently published work, only here the editor element is used instead of author.

Kawamura, Leslie The Bodhisattva Doctrine in Buddhism Canada Wilfred Laurier University Press 1978 A biblStruct encoding of an edited volume (Muller).
An Unpublished Dissertation

For the bibliographic description of an unpublished dissertation, as much information as possible can be given in the usual places, while its unpublished status can be indicated with the value u for the type attribute of the title element. Also, in the following example, the work’s status as Ph.D dissertation is pointed out in an extra note element inside monogr.

Anacker, Stefan Vasubandhu: Three Aspects Ph.D dissertation University of Wisconsin Madison 1969 A biblStruct encoding of an unpublished dissertation (Muller).
Emily Bronte: Wuthering Heights

The following example is a fragment of Emily Bronte’s novel Wuthering Heights, encoded and made available by the University of Virginia Library, for their Text Collection. The work consists of two volumes, containing 34 chapters. These are encoded as numbered text divisions. Each volume is encoded as div1 type="volume"; each chapter occurs one level deeper as div2 type="chapter". Structurally, the text is fairly simple, consisting mainly of paragraphs (p). Page breaks are encoded as pb elements, whose n attributes record the number of the respective pages. The transcription contains one quoted song, encoded as a q element, in which each quoted song line occurs as l: "It was far in the night, and the bairnies grat, The mither beneath the mools heard that" — One more complex structure consists of an embedded epistle, concluding the 17th chapter. This is encoded as a div3 type="epistle" element. The text’s concluding formula The End is transcribed as trailer inside the last chapter.

Volume 1 Chapter 1.13

For two months the fugitives remained absent; in those two months, Mrs. Linton encountered and conquered the worst shock of what was denominated a brain fever. No mother could have nursed an only child more devotedly than Edgar tended her. Day and night he was watching, and patiently enduring all the annoyances that irritable nerves and a shaken reason could inflict: and, though Kenneth remarked that what he saved from the grave would only recompense his care by forming the source of constant future anxiety — in fact, that his health and strength were being sacrificed to preserve a mere ruin of humanity — he knew no limits in gratitude and joy, when Catherine's life was declared out of danger; and hour after hour he would sit beside her, tracing the gradual return to bodily health, and flattering his too sanguine hopes with the illusion that her mind would settle back to its right balance also, and she would soon be entirely her former self.

The first time she left her chamber, was at the commencement of the following March. Mr. Linton had put on her pillow, in the morning, a handful of golden crocuses; her eye, long stranger to any gleam of pleasure, caught them in waking, and shone delighted as she gathered them eagerly together.

"These are the earliest flowers at the Heights!" she exclaimed. "They remind me of soft thaw winds, and warm sunshine, and nearly melted snow — Edgar, is there not a south wind, and is not the snow almost gone ?"

"The snow is quite gone down here, darling," replied her husband, "and I only see two white spots on the whole range of moors. The sky is blue, and the larks are singing, and the becks and brooks are all brim full. Catherine, last spring at this time I was longing to have you under this roof; now I wish you were a mile or two up those hills; the air blows so sweetly, I feel that it would cure you."

"I shall never be there but once more," said the invalid; "and then you'll leave me, and I shall remain for ever. Next spring you'll long again to have me under this roof, and you'll look back and think you were happy to-day."

Linton lavished on her the kindest caresses, and tried to cheer her by the fondest words; but, vaguely regarding the flowers, she let the tears collect on her lashes and stream down her cheeks unheeding. We knew she was really better, and therefore decided that long confinement to a single place produced much of this despondency, and it might be partially removed by a change of scene. The master told me to light a fire in the many-weeks-deserted parlour, and to set an easy-chair in the sunshine by the window; and then he brought her down, and she sat a long while enjoying the genial heat, and, as we expected, revived by the objects round her, which, though familiar, were free from the dreary associations investing her hated sick chamber. By evening she seemed greatly exhausted, yet no arguments could persuade her to return to that apartment; and I had to arrange the parlour sofa for her bed, till another room could be prepared. To obviate the fatigue of mounting and descending the stairs, we fitted up this, where you lie at present, on the same floor with the parlour; and she was soon strong enough to move from one to the other, leaning on Edgar's arm. Ah, I thought myself she might recover, so waited on as she was. And there was double cause to desire it, for on her existence depended that of another; we cherished the hope that in a little while Mr. Linton's heart would be gladdened, and his lands secured from a stranger's gripe, by the birth of an heir.

I should mention that Isabella sent to her brother, some six weeks from her departure, a short note announcing her marriage with Heathcliff. It appeared dry and cold, but at the bottom was dotted in with pencil an obscure apology, and an entreaty for kind remembrance and reconciliation, if her proceeding had offended him, asserting that she could not help it then, and, being done, she had now no power to repeal it. Linton did not reply to this, I believe; and in a fortnight more I got a long letter which I considered odd, coming from the pen of a bride just out of the honeymoon. I'll read it, for I keep it yet. Any relic of the dead is precious if they were valued living.

DEAR ELLEN, it begins, I came last night to Wuthering Heights, and heard for the first time that Catherine has been, and is yet, very ill. I must not write to her, I suppose, and my brother is either too angry or too distressed to answer what I sent him. Still, I must write to somebody, and the only choice left me is you.

Inform Edgar that I'd give the world to see his face again — that my heart returned to Thrushcross Grange in twenty-four hours after I left it, and is there at this moment, full of warm feelings for him and Catherine. I can't follow it, though (those words are underlined); they need not expect me; and they may draw what conclusions they please, taking care, however, to lay nothing at the door of my weak will or deficient affection.

The remainder of the letter is for yourself alone. I want to ask you two questions; the first is — How did you contrive to preserve the common sympathies of human nature when you resided here? I cannot recognize any sentiment which those around share with me.

The second question I have great interest in; it is this — Is Mr. Heathcliff a man? If so, is he mad? And if not, is he a devil? I shan't tell my reasons for making this inquiry, but I beseech you to explain, if you can, what I have married — that is, when you call to see me; and you must call, Ellen, very soon. Don't write, but come, and bring me something from Edgar.

Now you shall hear how I have been received in my new home, as I am led to imagine the Heights will be. It is to amuse myself that I dwell on such subjects as the lack of external comforts; they never occupy my thoughts, except at the moment when I miss them. I should laugh and dance for joy if I found their absence was the total of my miseries, and the rest was an unnatural dream.

The sun set behind the Grange as we turned on to the moors: by that I judged it to be six o'clock; and my companion halted half an hour to inspect the park and the gardens, and probably the place itself, as well as he could; so it was dark when we dismounted in the paved yard of the farmhouse, and your old fellow-servant Joseph issued out to receive us by the light of a dip candle. He did it with a courtesy that redounded to his credit. His first act was to elevate his torch to a level with my face, squint malignantly, project his under lip, and turn away. Then he took the two horses and led them into the stables, reappearing for the purpose of locking the outer gate, as if we lived in an ancient castle.

I do hate him — I am wretched — I have been a fool Beware of uttering one breath of this to any one at the Grange. I shall expect you every day. Don't disappoint me.


Volume 2 Chapter 2.20

I lingered round them under that benign sky, watched the moths fluttering among the heath and harebells, listened to the soft wind breathing through the grass, and wondered how any one could ever imagine unquiet slumbers for the sleepers in that quiet earth.

The End
Adapted from a TEI P4 XML encoding of Emily Bronte’s novel Wuthering Heights (Bronte 1847. TEI XML source available from .
Willa Cather: Roll Call on the Prairies

The following example is an excerpt from Willa Carther’s Roll Call on the Prairies in The Red Cross Magazine, 1919. This prose account of life during the first World War in the plains of Nebraska is encoded in paragraphs. Page numbers occur in pb tags, with the actual page number as the value of the n attribute.

This example contains the encoding of a picture in a figure element, grouping together a heading (head) and a description of the image (figDesc. The actual digital representation of the picture is pointed to with the graphic element, whose url attribute carries the URL of the digital scan.

Notice that in this example, a couple of things could have been further encoded. The foreign mail phrase could be identified with a soCalled tag; the fragment And in this country pride, could be encoded as direct speech with a q element, either with or without retaining the quotation marks in the actual transcription.

Letters from the front usually reached our town on Saturday nights. The "foreign mail" had become a feature of life in Kansas and Nebraska. The letters came in bunches; if one mother heard from her son, so did half a dozen others. One could hear them chatting to each other about what Vernon thought of Bordeaux, or what Roy had to say about the farming country along the Oise, or how much Elmer had enjoyed his rest leave in Paris. To me, knowing the boys, nearly all of these letters were remarkable. The most amusing were those which made severe strictures upon American manners; the boys were afraid the French would think us all farmers! One complained that his comrade

Fifty dollars saved from egg money for a needed new dress and coat went for a Liberty Bond "to help fight Austria"

Illustration of two women standing in a parlor, one the Liberty Bond canvasser and the other the woman of the house who buys a Liberty Bond with her egg money.

talked and pushed chairs about in the Y hut while the singers who came to entertain them were on the platform. "And in this country, too, the Home of Politeness! Some yaps have no pride," he wrote bitterly. I can say for the boys from our town that they wanted to make a good impression.

A fragment of a TEI encoding of Willa Cather’s Roll Call on the Prairies (Cather 1919). TEI XML source available from .
Eric Lease Morgan: Clarence meets Alcuin

The following example is a fragment of the essay Clarence meets Alcuin by Eric Lease Morgan, dealing with the application of expert systems on librarianship. This example features the concluding section to the prose essay. Notice how the author has used numbered divs to reflect the document structure, each with its own heading in a head element. Both subsections (properly encoded inside nesting div2 elements) contain lists. The notes are listed in a numbered list, indicated by the ordered value for its type attribute, while the numbering has been retained as actual contents of the list items. The bibliographical list is encoded as a bulleted list, for which the actual rendering of the bullets is probably left to the application processing the text.

Notes 1. This essay can also be found at http://www.lib.ncsu.edu/staff/morgan/clarence-meets-alcuin.html, and you can see the very beginnings of Ask Alcuin at http://www.lib.ncsu.edu/staff/morgan/alcuin/. 2. Alex Goodall, The guide to expert systems (Oxford: Learned Information, 1985), 11. 3. Donald A. Waterman, A guide to expert systems (Reading, MA: Addison-Wesley, 1985), 11. 4. Ralph Alberico and Mary Micco, Expert systems for reference and information retrieval (Westport, CT: Meckler, 1990) 86. Suggested Readings John V. Richardson, Knowledge-based systems for general reference work: applications, problems, and progress (San Diego: Academic Press, 1995). This relatively new book is the most scholarly of the of readings listed here. It outlines definitions of reference work as well as knowlege-based (expert) systems. It then suggests ways to incorporate the two disciplines into a cohesive whole. Included are many references. If you are going to only read one of the suggested readings, then this is the one to choose. Rao Aluri and Donald E. Riggs, eds., Expert systems in libraries (Norwood, NJ: Ablex Publsihing, 1990). This collection of essays describe numerous expert systems for reference work. Contains many references and a large selected bibliography. Ralph Alberico and Mary Micco, Expert systems for reference and information retrieval (Westport, CT: Meckler, 1990). This book "attempts to address the development of expert systems for reference and information retrieval." It contains recommended readings and a large bibliography. Christine Roysdon and Howard D. White, eds., Expert systems in reference services (New York: Haworth Press, 1989). Another collection of essays describing expert systems, but unfortunately some of the examples are not really "expert systems." This is a good book for understanding the principles of expert systems and methods for constructing them. Adapted from a TEI P4 XML encoding of Eric Lease Morgan’s essay Clarence meets Alcuin (Morgan 1997. TEI XML source file is not publicly available.
Bronte, Emily. 1847. Wuthering Heights. London: Thomas Cautley Newby, publisher. Encoded and made available by the University of Virginia Library, Text Collection at . Cather, Willa. 1919. Roll Call on the Prairies. The Red Cross Magazine, 14 (July 1919). 27–31. Edited by Andrew Jewell. Lincoln: Center for Digital Research in the Humanities, University of Nebraska-Lincoln. Available online at . Jones, Malcolm. 2006. Print of the month, September 2006. British Printed Images to 1700. London: Centre for Computing in the Humanities, King’s College. Available online at . Morgan, Eric Lease. 1997). Clarence meets Alcuin; or, expert systems are still an option in reference work. In: The Cybrarian’s manual. Edited by P. Ensor. Chicago: American Library Association. 127–134. Available online at . Muller, Charles. s.d. XML Technical Notes on the Yogācāra Bibliography. Accompanying documentation for the Yogācāra Buddhism Research Association. Available online at .