Customising TEI, ODD, Roma

5. Summary

This tutorial started from a sample encoding project: encoding of Lewis Carroll's novel Alice's Adventures in Wonderland. An analysis of this mini-project's needs identified following encoding goals:
  • Encoding of structural elements: the document, title page, document title, chapters, headings, (sub)divisions, paragraphs, quotations, citations, page breaks, figures, line groups.
  • Encoding of names for persons, places and animals in the story, with an additional requirement for an experimental analysis of the ontological status of their referents.
The realisation of these encoding goals allow encoders to mark up the text's basic structure, and support a specific (tentative) analysis of the names in the story, as exemplified by the encoded fragment at the end of this section. The encoded text could be used to generate an edition, analyse the distribution of realistic vs fantastic vs mythological characters throughout the story, isolate the quotations from the different characters (for a qualitative analysis of their language), and so on.
Throughout this tutorial, a TEI customisation was developed step-by-step that should be able to generate TEI schemas that fit these needs. After selection of relevant TEI modules and elements, selecting individual attributes within the declarations of elements and attribute classes, and adding new elements and attributes, this is the final version of the ODD file for our TBEcustom customisation:
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title>A TBE customisation</title>
<author>The TBE Crew</author>
</titleStmt>
<publicationStmt>
<p>for use by whoever wants it</p>
</publicationStmt>
<sourceDesc>
<p>created on Wednesday 05th November 2008 09:03:56 AM</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<front>
<divGen type="toc"/>
</front>
<body>
<p>My TEI Customization starts with modules tei, core, textstructure and header</p>
<schemaSpec ident="TBEcustom" docLang="en" prefix="tei_" start="TEI" xml:lang="en">
<moduleRef key="core"/>
<moduleRef key="tei"/>
<moduleRef key="header"/>
<moduleRef key="textstructure"/>
<moduleRef key="figures"/>
<elementSpec module="figures" ident="cell" mode="delete"/>
<elementSpec module="figures" ident="formula" mode="delete"/>
<elementSpec module="figures" ident="row" mode="delete"/>
<elementSpec module="figures" ident="table" mode="delete"/>
<elementSpec ident="name" module="core" mode="change">
<attList>
<attDef ident="type" mode="change">
<defaultVal>person</defaultVal>
<valList type="open" mode="replace">
<valItem ident="person"/>
<valItem ident="place"/>
<valItem ident="animal"/>
</valList>
</attDef>
<attDef ident="nymRef" mode="delete"/>
</attList>
</elementSpec>
<classSpec ident="att.naming" module="tei" mode="change" type="atts">
<attList>
<attDef ident="nymRef" mode="delete"/>
<attDef ident="ontStatus" mode="add" ns="http://www.teibyexample.org/">
<desc>describes the ontological status of a name's referent</desc>
<datatype minOccurs="1" maxOccurs="unbounded">
<rng:ref xmlns:rng="http://relaxng.org/ns/structure/1.0" name="data.enumerated"/>
</datatype>
<valList type="open">
<valItem ident="realistic"/>
<valItem ident="mythological"/>
<valItem ident="fantastic"/>
</valList>
</attDef>
</attList>
</classSpec>
<moduleRef key="namesdates"/>
<elementSpec module="namesdates" ident="addName" mode="delete"/>
<elementSpec module="namesdates" ident="affiliation" mode="delete"/>
<elementSpec module="namesdates" ident="age" mode="delete"/>
<elementSpec module="namesdates" ident="birth" mode="delete"/>
<elementSpec module="namesdates" ident="bloc" mode="delete"/>
<elementSpec module="namesdates" ident="climate" mode="delete"/>
<elementSpec module="namesdates" ident="country" mode="delete"/>
<elementSpec module="namesdates" ident="death" mode="delete"/>
<elementSpec module="namesdates" ident="district" mode="delete"/>
<elementSpec module="namesdates" ident="education" mode="delete"/>
<elementSpec module="namesdates" ident="event" mode="delete"/>
<elementSpec module="namesdates" ident="faith" mode="delete"/>
<elementSpec module="namesdates" ident="floruit" mode="delete"/>
<elementSpec module="namesdates" ident="forename" mode="delete"/>
<elementSpec module="namesdates" ident="genName" mode="delete"/>
<elementSpec module="namesdates" ident="geo" mode="delete"/>
<elementSpec module="namesdates" ident="geogFeat" mode="delete"/>
<elementSpec module="namesdates" ident="geogName" mode="delete"/>
<elementSpec module="namesdates" ident="langKnowledge" mode="delete"/>
<elementSpec module="namesdates" ident="langKnown" mode="delete"/>
<elementSpec module="namesdates" ident="listNym" mode="delete"/>
<elementSpec module="namesdates" ident="listOrg" mode="delete"/>
<elementSpec module="namesdates" ident="listPerson" mode="delete"/>
<elementSpec module="namesdates" ident="listPlace" mode="delete"/>
<elementSpec module="namesdates" ident="location" mode="delete"/>
<elementSpec module="namesdates" ident="nameLink" mode="delete"/>
<elementSpec module="namesdates" ident="nationality" mode="delete"/>
<elementSpec module="namesdates" ident="nym" mode="delete"/>
<elementSpec module="namesdates" ident="occupation" mode="delete"/>
<elementSpec module="namesdates" ident="offset" mode="delete"/>
<elementSpec module="namesdates" ident="org" mode="delete"/>
<elementSpec module="namesdates" ident="orgName" mode="delete"/>
<elementSpec module="namesdates" ident="person" mode="delete"/>
<elementSpec module="namesdates" ident="personGrp" mode="delete"/>
<elementSpec module="namesdates" ident="place" mode="delete"/>
<elementSpec module="namesdates" ident="population" mode="delete"/>
<elementSpec module="namesdates" ident="region" mode="delete"/>
<elementSpec module="namesdates" ident="relation" mode="delete"/>
<elementSpec module="namesdates" ident="relationGrp" mode="delete"/>
<elementSpec module="namesdates" ident="residence" mode="delete"/>
<elementSpec module="namesdates" ident="roleName" mode="delete"/>
<elementSpec module="namesdates" ident="settlement" mode="delete"/>
<elementSpec module="namesdates" ident="sex" mode="delete"/>
<elementSpec module="namesdates" ident="socecStatus" mode="delete"/>
<elementSpec module="namesdates" ident="state" mode="delete"/>
<elementSpec module="namesdates" ident="surname" mode="delete"/>
<elementSpec module="namesdates" ident="terrain" mode="delete"/>
<elementSpec module="namesdates" ident="trait" mode="delete"/>
<elementSpec ident="animalName" ns="http://www.teibyexample.org/" mode="add">
<desc>contains a proper noun referring to an animal</desc>
<classes>
<memberOf key="model.nameLike"/>
<memberOf key="model.nameLike.agent"/>
<memberOf key="model.persStateLike"/>
<memberOf key="att.datable"/>
<memberOf key="att.editLike"/>
<memberOf key="att.naming"/>
<memberOf key="att.typed"/>
</classes>
<content>
<rng:ref xmlns:rng="http://relaxng.org/ns/structure/1.0" name="macro.specialPara"/>
</content>
</elementSpec>
</schemaSpec>
</body>
</text>
</TEI>
This ODD file allows the generation of a TEI schema for the encoding of the document. The following example illustrates how the encoding could make use of the features defined in the ODD file (note how the 'http://www.teibyexample.org/' namespace is used to distinguish the added elements and attributes, and bound to the namespace prefix "TBE"):
<TEI xmlns:TBE="http://www.teibyexample.org/" xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Alice's Adventures in Wonderland: an electronic transcription</title>
<author>Lewis Carroll</author>
<respStmt>
<resp>illustrations</resp>
<name>John Tenniel</name>
</respStmt>
</titleStmt>
<publicationStmt>
<p>Sample transcription for TEI by Example.</p>
</publicationStmt>
<sourceDesc>
<biblStruct>
<monogr>
<author>Lewis Carroll</author>
<title>Alice's Adventures in Wonderland</title>
<imprint>
<publisher>D. Appleton and co.</publisher>
<pubPlace>
<address>
<addrLine>445, Broadway</addrLine>
<addrLine>New York</addrLine>
</address>
</pubPlace>
<date>1866</date>
</imprint>
</monogr>
</biblStruct>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<!-- ... -->
<div type="chapter">
<!-- ... -->
<pb n="157"/>
<figure>
<graphic url="images/lobster.jpg"/>
<figDesc>The lobster sugaring its hair.</figDesc>
</figure>
<p> <q who="alice">"How the creatures order one about, and make one repeat lessons!"</q> thought <persName TBE:ontStatus="realistic">Alice</persName>, <q who="alice">"I might just as well be at school at once."</q> However, she got up, and began to repeat it, but her head was so full of the <title type="song"><TBE:animalName TBE:ontStatus="realistic">Lobster</TBE:animalName>-Quadrille</title>, that she hardly knew what she was saying, and the words came very queer indeed:—</p>
<q rend="blockquote" who="alice">
<lg>
<l>"'Tis the voice of the <TBE:animalName TBE:ontStatus="realistic">lobster</TBE:animalName>; I heard him declare,</l>
<l>
<q who="lobster">'You have baked me too brown, I must sugar my hair.'</q>
</l>
<l>As a duck with its eyelids, so he with his nose</l>
<l>Trims his belt and his buttons, and turns out his toes."</l>
</lg>
</q>
<p> <q who="gryphon">"That's different from what <emph>I</emph> used to say when I was a child,"</q> said the <TBE:animalName TBE:ontStatus="mythological">Gryphon</TBE:animalName>.</p>
<pb n="158"/>
<p>
<q who="mockTurtle">"Well, I never heard it before,"</q>
said the <TBE:animalName TBE:ontStatus="realistic fantastic">Mock Turtle</TBE:animalName>;
<q who="mockTurtle">"but it sounds uncommon nonsense."</q>
</p>
<p><persName TBE:ontStatus="realistic">Alice</persName> said nothing; she had sat down with her face in her hands, wondering if anything would <emph>ever</emph> happen in a natural way again.</p>
<p><q who="mockTurtle">"I should like to have it explained,"</q> said the <TBE:animalName TBE:ontStatus="realistic fantastic">Mock Turtle</TBE:animalName>.</p>
<p>
<q who="gryphon">"She can't explain it,"</q>
said the
<TBE:animalName TBE:ontStatus="mythological">Gryphon</TBE:animalName>
hastily.
<q who="gryphon">"Go on with the next verse."</q>
</p>
<p>
<q who="mockTurtle">"But about his toes?"</q>
the
<TBE:animalName TBE:ontStatus="realistic fantastic">Mock Turtle</TBE:animalName>
persisted.
<q who="mockTurtle">"How <emph>could</emph> he turn them out with his nose, you know?"</q>
</p>
<p>
<q who="aliceI">"It's the first position in dancing."</q>
<persName TBE:ontStatus="realistic">Alice</persName>
said; but she was dreadfully puzzled by the whole thing, and longed to change the subject.</p>
<p>
<q who="gryphon">"Go on with the next verse,"</q>
the
<TBE:animalName TBE:ontStatus="mythological">Gryphon</TBE:animalName>
repeated impatiently:
<q who="gryphon">"it begins <quote>'I passed by his garden.'</quote>"</q>
</p>
<p><persName TBE:ontStatus="realistic">Alice</persName> did not dare to disobey, though she felt sure it would all come wrong, and she went on in a trembling voice:—</p>
<pb n="159"/>
<!-- ... -->
</div>
<!-- ... -->
</body>
</text>
</TEI>