<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title type="main">TEI by Example</title>
        <title type="sub">Module 1: Common Structure, Elements, and Attributes</title>
        <author xml:id="EV">Edward Vanhoutte</author>
        <author xml:id="RvdB">Ron Van den Branden</author>
        <editor xml:id="MT">Melissa Terras</editor>
        <sponsor>Association for Literary and Linguistic Computing (ALLC)</sponsor>
        <sponsor>Centre for Data, Culture and Society, University of Edinburgh, UK</sponsor> 
        <sponsor>Centre for Digital Humanities (CDH), University College London, UK</sponsor>
        <sponsor>Centre for Computing in the Humanities (CCH), King’s College London, UK</sponsor>
        <sponsor>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</sponsor>
        <funder>
          <address>
            <addrLine>Centre for Scholarly Editing and Document Studies (CTB)</addrLine>
            <addrLine>Royal Academy of Dutch Language and Literature</addrLine>
            <addrLine>Koningstraat 18</addrLine>
            <addrLine>9000 Gent</addrLine>
            <addrLine>Belgium</addrLine>
          </address>
          <email>ctb@kantl.be</email>
        </funder>
        <principal>Edward Vanhoutte</principal>
        <principal>Melissa Terras</principal>
      </titleStmt>
      <publicationStmt>
        <publisher>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</publisher>
        <distributor>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</distributor>
        <pubPlace>Gent</pubPlace>
        <address>
          <addrLine>Centre for Scholarly Editing and Document Studies (CTB)</addrLine>
          <addrLine>Royal Academy of Dutch Language and Literature</addrLine>
          <addrLine>Koningstraat 18</addrLine>
          <addrLine>9000 Gent</addrLine>
          <addrLine>Belgium</addrLine>
        </address>
        <availability status="free">
          <p>Licensed under a <ref target="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution ShareAlike 3.0 License</ref>
                    </p>
        </availability>
        <date when="2010-07-09">9 July 2010</date>
      </publicationStmt>
      <seriesStmt>
        <title>TEI by Example.</title>
        <respStmt>
          <name>Edward Vanhoutte</name>
          <resp>editor</resp>
        </respStmt>
        <respStmt>
          <name>Ron Van den Branden</name>
          <resp>editor</resp>
        </respStmt>
        <respStmt>
          <name>Melissa Terras</name>
          <resp>editor</resp>
        </respStmt>
      </seriesStmt>
      <sourceDesc>
        <p>Digitally born</p>
      </sourceDesc>
    </fileDesc>
    <encodingDesc>
      <projectDesc>
        <p>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.</p>
      </projectDesc>
    </encodingDesc>
    <profileDesc>
      <langUsage>
        <language ident="en-GB">en-GB</language>
      </langUsage>
    </profileDesc>
    <revisionDesc>
      <change when="2020-06-22" who="#RvdB">technical revision</change>
      <change when="2010-07-13" who="#RvdB">
                <list>
                    <item>added distinction <gi>gi</gi> — <tag>gi scheme="..."</tag> — <gi>tag</gi>
                    </item>
        <item>final spellcheck</item>
                </list>
            </change>
      <change when="2010-07-09" who="#RvdB">release</change>
      <change when="2009-11-20" who="#EV">general contents completed</change>
      <change when="2009-11-13" who="#EV">intermediate update</change>
      <change when="2009-11-12" who="#EV">intermediate update</change>
      <change when="2009-11-05" who="#EV">intermediate update</change>
      <change when="2009-10-30" who="#EV">intermediate update</change>
      <change when="2009-10-28" who="#EV">intermediate update</change>
      <change when="2009-06-10" who="#EV">Authoring</change>
    </revisionDesc>
  </teiHeader>
  <text xml:id="TBED01v00" type="tutorials">
    <body>
            <head>Module 1: Common Structure, Elements, and Attributes</head>
            <div xml:id="Introduction">
        <head>Introduction</head>
        <p>The conclusions and the work of the TEI consortium are formulated as guidelines, rules, and recommendations rather than standards, because it is acknowledged that each scholar must have the freedom of expressing their own theory of text by encoding the features they think important in the text. A wide array of possible solutions to encoding matters is demonstrated in the TEI Guidelines which therefore should be considered a reference manual rather than a tutorial.</p>
        <p>Mastering the complete TEI encoding scheme implies a steep learning curve, but few projects require a complete knowledge of the TEI. Therefore, a manageable subset of the full TEI encoding scheme was published as <ref target="https://tei-c.org/Guidelines/Customization/Lite/">TEI Lite</ref>, currently describing 140 elements. Originally intended as an introduction and a didactic stepping stone to the full recommendations, TEI Lite has, since its publication in 1995, become one of the most popular TEI customizations and proves to meet the needs of 90% of the TEI community, 90% of the time.</p>
        <p>TEI by Example features freely available online tutorials walking individuals through the different stages in marking up a document in TEI (Text Encoding Initiative). It aims to help students of text encoding to cope with the full TEI guidelines and the learning curve involved.</p>
        <p>The ground rules that are discussed in this module apply to the most recent version of the TEI at the time of writing, i.e., TEI P5.<note>See <ptr type="crossref" target="TBED00v00.htm"/> for historical backgrounds of text encoding, the TEI, and the TEI Guidelines.</note>
                </p>
      </div>
            <div xml:id="generalstructure">
        <head>General TEI Document Structure</head>
        <p>The TEI makes use of XML as its governing metalanguage. This means that all TEI metadata are expressed as XML elements and thus comply with the World Wide Web Consortium XML Recommendation. Information (plain text) is contained in XML elements, delimited by start tags (e.g., <tag type="start">TEI</tag>) and end tags (e.g., <tag type="end">TEI</tag>). Additional information to these XML elements can be given in attributes, consisting of a name (e.g., <code>xml:id</code>) and a value (e.g., <val>text1</val>). XML comments are delimited by start markers (<code>&lt;!--</code>) and end markers (<code>--&gt;</code>).<note>In these TEI by Example tutorials, names of TEI components are formatted in a specific way:
          <list rend="bulleted">
            <item>
                                <term>Element</term> names are printed in monospace between pointy brackets, e.g., <gi>TEI</gi>
                            </item>
            <item>
                                <term>Attribute</term> are displayed in monospace, and prefixed with the <soCalled>at</soCalled> sign, e.g., <att>n</att>
                            </item>
            <item>
                                <term>Class</term>, <term>datatype</term>, and <term>macro</term> names are displayed in monospace, e.g., <ident type="class">att.global</ident>
                            </item>
          </list>
          All of these components are being presented as hyperlinks to their declaration in the TEI Guidelines. This should make it easier to look up the reference documentation.</note>
                </p>
        <p>A full TEI document consists of one single <gi>TEI</gi> element, which consists of two major components:
          <list rend="bulleted">
            <item>
                            <gi>teiHeader</gi>: an element containing all the metadata describing the document.</item>
            <item>
                            <gi>text</gi>: an element containg the actual document</item>
          </list>
          This common structure is mandatory for all <soCalled>standard</soCalled> TEI documents. 
          <figure xml:id="example1">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <TEI>
                <teiHeader>
                  <!---...-->
                </teiHeader>
                <text>
                  <!--...-->
                </text>
              </TEI>
            </egXML>
            <head type="legend">The minimal structure of a TEI document.</head>
          </figure>
        </p>
        <p>This is an example of a TEI XML text, containing both information and meta-information. This example, as any TEI text, is recognizable as a TEI text by the outermost <gi>TEI</gi> element, which is declared in the dedicated TEI namespace (<ident type="ns">http://www.tei-c.org/ns/1.0</ident>). Before proceeding, let’s first have a look at the namespace declaration. In the previous example, the TEI namespace is declared as the <soCalled>default</soCalled> namespace, i.e., without any <term>prefix</term>. It could have been expressed equally as follows:
          <figure xml:id="example2">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <tei:TEI xmlns:tei="http://www.tei-c.org/ns/1.0_TBEeg_">
                <tei:teiHeader>
                  <!---...-->
                </tei:teiHeader>
                <text>
                  <!--...-->
                </text>
              </tei:TEI>
            </egXML>
            <head type="legend">A TEI document with mixed namespace prefixes.</head>
          </figure>
        </p>
        <p>Here, the namespace declaration <code>xmlns:tei="http://www.tei-c.org/ns/1.0"</code> on the <tag>TEI</tag> element binds the TEI namespace URI (<ident type="ns">http://www.tei-c.org/ns/1.0</ident>) to the namespace prefix <code>tei</code>. All descendant elements using that prefix before the actual element name belong to this namespace (e.g., <tag>tei:teiHeader</tag>). Yet, the <tag>text</tag> element contains its own namespace declaration: <code>xmlns="http://www.tei-c.org/ns/1.0</code>, only this time it is binding it to an <emph>empty</emph> namespace prefix. All descendant elements without a namespace prefix (in the <soCalled>default</soCalled> namespace), will belong to this namespace. Since both namespace declarations in the previous example are referencing the same namespace URI, the previous example is equivalent to the first.</p>
        <p>Because the TEI namespace is vital to any TEI element, the examples in these TEI by Example tutorials will explicitly render their top-level element(s) with a <soCalled>default</soCalled> (i.e., without namespace prefix) namespace declaration for the TEI namespace URI. In order not to hamper legibility, no namespace prefix will be used, and the namespace declaration won’t be repeated on any descendant elements.</p>
        <div xml:id="teiHeader">
          <head>TEI Header</head>
          <p>The TEI header (<gi>teiHeader</gi>) is mandatory and contains descriptive meta-information about the document. The <gi>teiHeader</gi> minimally contains a description of the electronic file inside a (<gi>fileDesc</gi>). The latter element consists of three mandatory components:
            <list rend="bulleted">
              <item>the title statement (<gi>titleStmt</gi>), providing information about the title (<gi>title</gi>), author (<gi>author</gi>), and others responsible for the electronic text</item>
              <item>the publication statement (<gi>publicationStmt</gi>), providing publication details about the electronic text in a structured way or as prose inside a paragraph (<gi>p</gi>)</item>
              <item>a description of the source (<gi>sourceDesc</gi>), documenting bibliographic details about the electronic text’s material source (if any) in a structured way or in a prose paragraph (<gi>p</gi>)</item>
            </list>
            <figure xml:id="example3">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <teiHeader>
                  <fileDesc>
                    <titleStmt>
                      <title>The Strange Adventures of Dr. Burt Diddledygook: a machine-readable transcription</title>
                      <respStmt>
                        <resp>editor</resp>
                        <name xml:id="EV">Edward Vanhoutte</name>
                      </respStmt>
                    </titleStmt>
                    <publicationStmt>
                      <p>Not for distribution.</p>
                    </publicationStmt>
                    <sourceDesc>
                      <p>Transcribed from the diaries of the late Dr. Roy Offire.</p>
                    </sourceDesc>
                  </fileDesc>
                </teiHeader>
              </egXML>
              <head type="legend">A minimal TEI header.</head>
            </figure>
          </p>
          <note type="reference">See <ptr type="crossref" target="TBED02v00.htm"/> for detailed information on <gi>teiHeader</gi>.</note>
        </div>
        <div xml:id="text">
          <head>Text</head>
          <div xml:id="tei_body">
            <head>Body</head>
            <p>The actual text (<gi>text</gi>) contains a single text of any kind. This commonly contains the actual text and other encodings. A text <gi>text</gi> minimally contains a text body (<gi>body</gi>). The body contains lower-level text structures like paragraphs (<gi>p</gi>), or different structures for text genres other than prose: lines (<gi>l</gi>) for poetry, speeches (<gi>sp</gi>) for drama.
              <figure xml:id="example4">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <text>
                    <body>
                      <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of theRAW weren't even going to notice his absence.</p>
                    </body>
                  </text>
                </egXML>
                <head type="legend">A <gi>body</gi> element with paragraphs.</head>
              </figure>
            </p>
          </div>
          <div xml:id="front">
            <head>Front</head>
            <p>Next to the <gi>body</gi>, a text can optionally contain front matter which may be encoded with <gi>front</gi>. Clear examples are title pages, headers, prefaces, or dedications. Prologues in drama or forewords and introductions in prose may also be considered prefatory material. May, because the encoder may choose simply not to encode the front matter of a text as such. With exception of the title page, for which the TEI defines specific elements, front matter should be encoded using the same elements as the rest of a text. This means that there are no specific elements to encode prefaces, dedications, abstracts, frontispieces etc. Instead, either numbered or un-numbered divisions <gi>div</gi> with an attribute <att>type</att> are used to distinguish between the different components of a <gi>front</gi> section. The following suggested values for the <att>type</att> attribute may be used for this purpose: 
              <list rend="bulleted">
                <item>
                                    <val>preface</val>: a foreword or preface addressed to the reader</item>
                <item>
                                    <val>ack</val>: a formal declaration of acknowledgement by the author</item>
                <item>
                                    <val>dedication</val>: a formal offering or dedication of a text by the author</item>
                <item>
                                    <val>abstract</val>: a summary of the content of a text as continuous prose</item>
                <item>
                                    <val>contents</val>: a table of contents. A <gi>list</gi> element should be used to mark its structure</item>
                <item>
                                    <val>frontispiece</val>: a pictorial frontispiece, possibly including some text</item>
              </list>
              <figure xml:id="example5">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <front>
                    <div type="dedication">
                      <p>In memory of Lisa Wheeman.</p>
                    </div>
                    <div type="contents">
                      <head>Table of Contents</head>
                      <list>
                        <item>I. The Decision</item>
                        <item>II. The Fuss</item>
                        <item>III. The Celebration</item>
                      </list>
                    </div>
                  </front>
                </egXML>
                <head type="legend">A <gi>front</gi> section with a dedication and table of contents.</head>
              </figure>
            </p>
          </div>
          <div xml:id="back">
            <head>Back</head>
            <p>All back matter to a text may be grouped within <gi>back</gi>. As is the case with <gi>front</gi>, either numbered or un-numbered divisions <gi>div</gi> with a <att>type</att> attribute are used to distinguish the different components. The following attribute values may be supplied for the <att>type</att> in order to distinguish various kinds of division characteristic of back matter: 
              <list rend="bulleted">
                <item>
                                    <val>appendix</val>: an appended self-contained section of a work, often providing additional information or text</item>
                <item>
                                    <val>glossary</val>: contains a list <gi>list</gi>of terms and their explanations</item>
                <item>
                                    <val>notes</val>: a section in which textual or other kinds of notes are gathered together</item>
                <item>
                                    <val>bibliogr</val>: contains a list of bibliographical citations <gi>listBibl</gi>
                                </item>
                <item>
                                    <val>index</val>: any form of index to the work</item>
                <item>
                                    <val>colophon</val>: a statement appearing at the end of a book describing the conditions of its physical production</item>
              </list>
              <figure xml:id="example6">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <back>
                    <div type="colophon">
                      <p>Typeset in Haselfoot 37 and Henry 8. Printed and bound by Whistleshout, South Africa.</p>
                    </div>
                  </back>
                </egXML>
                <head type="legend">A <gi>back</gi> section with a colophon.</head>
              </figure>
            </p>
          </div>
          <div xml:id="fullexample">
            <head>Full Example <gi>text</gi>
                        </head>
            <figure xml:id="example7">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <text>
                  <front>
                    <div type="dedication">
                      <p>In memory of Lisa Wheeman.</p>
                    </div>
                    <div type="contents">
                      <head>Table of Contents</head>
                      <list>
                        <item>I. The Decision</item>
                        <item>II. The Fuss</item>
                        <item>III. The Celebration</item>
                      </list>
                    </div>
                  </front>
                  <body>
                    <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                  </body>
                  <back>
                    <div type="colophon">
                      <p>Typeset in Haselfoot 37 and Henry 8. Printed and bound by Whistleshout, South Africa.</p>
                    </div>
                  </back>
                </text>
              </egXML>
              <head type="legend">A full <gi>text</gi> structure.</head>
            </figure>
          </div>
          <div xml:id="composite">
            <head>Unitary or Composite Texts</head>
            <p>Apart from simple texts, TEI provides means to encode composite texts, either by grouping structurally related texts in a <gi>group</gi> element inside <gi>text</gi>, or treating them as a corpus of diverse texts, using <gi>teiCorpus</gi> as the outermost element.</p>
          </div>
          <div xml:id="summary1">
            <head>Summary</head>
            <p>The following example shows the empty framework of a basic TEI document structure:
              <figure xml:id="example8">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <TEI>
                    <teiHeader>
                      <fileDesc>
                        <titleStmt>
                          <title>
                            <!--Title-->
                          </title>
                        </titleStmt>
                        <publicationStmt>
                          <p>
                            <!--Publication Information-->
                          </p>
                        </publicationStmt>
                        <sourceDesc>
                          <p>
                            <!--Information about the source-->
                          </p>
                        </sourceDesc>
                      </fileDesc>
                    </teiHeader>
                    <text>
                      <body>
                        <!--Some structural division, paragraph, line group, speech, ...-->
                      </body>
                    </text>
                  </TEI>
                </egXML>
                <head type="legend">A minimal structure for the <gi>TEI</gi> element.</head>
              </figure>
            </p>
            <p>The following example fills this empty framework with the text of the examples:
              <figure xml:id="example9">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <TEI>
                    <teiHeader>
                      <fileDesc>
                        <titleStmt>
                          <title>The Strange Adventures of Dr. Burt Diddledygook: a machine-readable transcription</title>
                          <respStmt>
                            <resp>editor</resp>
                            <name xml:id="EV">Edward Vanhoutte</name>
                          </respStmt>
                        </titleStmt>
                        <publicationStmt>
                          <p>Not for distribution.</p>
                        </publicationStmt>
                                                <sourceDesc>
                          <p>Transcribed from the diaries of the late Dr. Roy Offire.</p>
                        </sourceDesc>
                                            </fileDesc>
                    </teiHeader>
                    <text>
                      <front>
                        <div type="dedication">
                          <p>In memory of Lisa Wheeman.</p>
                        </div>
                        <div type="contents">
                          <head>Table of Contents</head>
                          <list>
                            <item>I. The Decision</item>
                            <item>II. The Fuss</item>
                            <item>III. The Celebration</item>
                          </list>
                        </div>
                      </front>
                      <body>
                        <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaan (RAW). It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                      </body>
                      <back>
                        <div type="colophon">
                          <p>Typeset in Haselfoot 37 and Henry 8. Printed and bound by Whistleshout, South Africa.</p>
                        </div>
                      </back>
                    </text>
                  </TEI>
                </egXML>
                <head type="legend">The example text encoded as a TEI text with <gi>TEI</gi>.</head>
              </figure>
            </p>
          </div>
        </div>
      </div>
            <div xml:id="textualphenomena">
        <head>Textual Phenomena</head>
        <p>The TEI Guidelines define a set of rules to mark up the phenomena in a wide range of texts and textual objects in a descriptive fashion. Generally speaking, there are four classes of textual phenomena that can be described:
          <list rend="ordered">
            <item>Structural</item>
            <item>Renditional</item>
            <item>Logical &amp; Semantic</item>
            <item>Analytic</item>
          </list>
        </p>
        <p>Structural and renditional features are best understood because they concern a natural kind of textual, though culturally defined, organisation. Books mainly consist of chapters, sections, and paragraphs; poetry is mostly organised in poems, stanzas, and lines; whereas scenes, acts, and parts of speech are structural features of performance texts. In these texts, linguistic units are highlighted by the use of distinct fonts, colours, alignments, italics, underlinings, font weight, etc. These textual codes signal underlying logical and semantic features and functions such as names of organisations, titles of books, distinctive languages, emphatic language use, etc. However, semantic and logical features don’t need to be highlighted by means of typographic codes and can occur in texts without any special typographic marking. It needs a thorough understanding of the text and the language to identify them. Semantic and syntactic interpretations added to a text or part of a text that together constitute a new text, we call analytical features. Examples are linguistic (wordclass, morpheme, ...) and narrative (theme, motive, ...) categorisations.</p>
        <div xml:id="structuralfeatures">
          <head>Structural Features</head>
          <div xml:id="structgeneral">
            <head>General</head>
            <floatingText type="challenge">
              <body>
                                <div xml:id="question1" type="challenge.question" corresp="#solution1">
                  <p>Which structural features can commonly be found in prose, verse, and drama?</p>
                </div>
                                <div xml:id="solution1" type="challenge.solution">
                  <list rend="bulleted">
                    <item>Prose: paragraphs <gi>p</gi>, divisions <gi>div</gi>, headings <gi>head</gi>, lists <gi>list</gi>, listitem <gi>item</gi>, quotations <gi>q</gi>, page breaks <gi>pb</gi>, segments <gi>seg</gi>, figures <gi>figure</gi>, and tables <gi>table</gi>. See <ptr type="crossref" target="TBED03v00.htm"/>.</item>
                    <item>Verse: line groups <gi>lg</gi> and lines <gi>l</gi>. See <ptr type="crossref" target="TBED04v00.htm"/>.</item>
                    <item>Drama: divisions <gi>div</gi>, speeches <gi>sp</gi>, paragraphs <gi>p</gi>, line groups <gi>lg</gi>, lines <gi>l</gi>. and segments <gi>seg</gi>. See <ptr type="crossref" target="TBED05v00.htm"/>.</item>
                  </list>
                </div>
                            </body>
            </floatingText>
            <p>The following example demonstrates a simple use of TEI   markup for the encoding of structural features in prose text:
              <figure xml:id="example10">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <text>
                    <body>
                      <div>
                        <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                        <p>Or worse, what would happen when another Academy member had decided to go for a stroll in the park instead? He quickly thought up several possible plans:</p>
                        <list>
                          <item>hide behind a tree and duck</item>
                          <item>catch the duck as subject material for a speech on the annual meeting</item>
                          <item>be frank, meet his colleague, and <list>
                            <item>1. pat him on the shoulder</item>
                            <item>2. tell a joke</item>
                            <item>3. hand him the duck</item>
                            <item>4. offer him a sip from his 2.5 l bottle of coke</item>
                            <item>5. pull his beard</item>
                          </list>
                                                    </item>
                        </list>
                        <p>Or maybe he could still announce his absence from the meeting by sending an antedated letter of apology to Professor M. Orkelidius, Royal Academy of Whoopledywhaa, Queenstreet 81, TB90 00E Whoopledywhaa.</p>
                        <p>
                                                    <q>Plenty of options</q>, he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. It was titled 'While thou art here', by Sir Edmund Peckwood. While reading the first sentence, his placid expression turned to a certain je ne sais quoi: <q>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</q>
                                                </p>
                      </div>
                    </body>
                  </text>
                </egXML>
                <head type="legend">Encoding structural features in prose text.</head>
              </figure>
            </p>
          </div>
          <div xml:id="titlepage">
            <head>Title Pages</head>
            <p>Title pages may be encoded within <gi>front</gi> or <gi>back</gi> by using the element <gi>titlePage</gi>.<note>
                                <gi>titlePage</gi> must not be confused with <gi>fileDesc</gi>, which may contain <gi>titleStmt</gi> and <gi>publicationStmt</gi>. Whereas <gi>titlePage</gi> is used for the transcription and encoding of the physical title page in <gi>text</gi>, <gi>fileDesc</gi> is part of the <gi>teiHeader</gi> section containing meta-information, in this case a bibliographic description of the electronic file.</note> A title page commonly contains the title of the work (<gi>docTitle</gi>), which can consist of several subsections or divisions (<gi>titlePart</gi>), with an <att>type</att> attribute documenting their role. The name of the author of the document (<gi>docAuthor</gi>) often occurs inside a byline (<gi>byline</gi>), which contains the primary statement of responsibility given for a work. Other components of <gi>titlePage</gi> may be the edition statement (<gi>docEdition</gi>), the date of a document (<gi>docDate</gi>), and the imprint statement (<gi>docImprint</gi>), which may further contain the place of publication (<gi>pubPlace</gi>), a date (<gi>date</gi> or <gi>docDate</gi>), and names (<gi>name</gi>) of, e.g., the publisher (<gi>publisher</gi>). Besides this information, a <gi>titlePage</gi> may also contain an anonymous or attributed quotation (<gi>epigraph</gi>), a formal statement authorizing the publication of a work (<gi>imprimatur</gi>), and/or an inline graphic, illustration, or figure (<gi>graphic</gi>).
              <figure xml:id="example11">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <front>
                    <titlePage>
                      <docAuthor>Roy Offire</docAuthor>
                      <docTitle>
                        <titlePart type="main">The Strange Adventures of Dr. Burt Diddledygook</titlePart>
                        <titlePart type="sub">Wanderings in the life of a buoyant academic</titlePart>
                      </docTitle>
                      <byline>Transcribed from the diaries.</byline>
                      <docEdition>First Edition</docEdition>
                      <docImprint>
                                                <pubPlace>Kirkcaldy</pubPlace>, <publisher>Bucket Books</publisher>, <docDate>1972</docDate>
                                            </docImprint>
                    </titlePage>
                  </front>
                </egXML>
                <head type="legend">Encoding a title page with <gi>titlePage</gi>.</head>
              </figure>
            </p>
          </div>
        </div>
        <div xml:id="renditionalfeatures">
          <head>Renditional Features</head>
          <p>Some textual features are commonly rendered in a text using some kind of highlighting. The TEI Guidelines define highlighting as <quote source="#quoteref1">the use of any combination of typographic features (font, size, hue, etc.) in a printed or written text in order to distinguish some passage of a text from its surroundings</quote> (<bibl xml:id="quoteref1">TEI Guidelines, section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#COHQW">3.3.1 What Is Highlighting?</ref>
                        </bibl>). If the encoder prefers only to signal this highlighting, and not the underlying reason, the generic element <gi>hi</gi> (highlighting) can be used with a <att>rend</att> or <att>rendition</att> attribute describing its appearance in the text. Since these attributes may need to express a wide range of typographic features, no formal values are being defined by the TEI Guidelines: encoders should device their own value system. 
            <figure xml:id="example12">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the <hi rend="italic">Royal Academy of Whoopledywhaa</hi> (RAW). It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
              </egXML>
              <head type="legend">Encoding typograhpically marked text without indicating the underying meaning, with <gi>hi</gi>.</head>
            </figure>
            Encoders, however, commonly prefer to indicate the reason underlying the highlighting by documenting logical or semantic information about the highlighted word or phrase. Where possible, this can be done using the elements discussed in the following sections.
          </p>
        </div>
        <div xml:id="logicalfeatures">
          <head>Logical and Semantic Features</head>
          <p>Highlighted words or phrases in a text are commonly distinguished from their surroundings for a reason. Only a thorough understanding of the text and the language can lead to a correct identification and interpretation. The underlying semantics may be encoded with more specific elements than the generic <gi>hi</gi> element. Highlighting is commonly used to render the following logical and semantic features: 
            <list rend="bulleted">
              <item>Emphasis (<gi>emph</gi>), foreign words (<gi>foreign</gi>), and other linguistically distinct uses (<gi>distinct</gi>) of highlighting.</item>
              <item>The use of quotation marks in the representation of speech and thought (<gi>said</gi>), quotation (<gi>quote</gi>), cited quotation (<gi>cit</gi>), words or phrases mentioned (<gi>mentioned</gi>), and words or phrases for which the author or narrator indicates a disclaiming of responsibility (<gi>soCalled</gi>). See <ptr type="crossref" target="TBED03v00.htm#quotation"/>.</item>
              <item>Technical terms (<gi>term</gi>), glosses (<gi>gloss</gi>), or documentation of XML elements, attributes, and classes with <gi>altIdent</gi>, <gi>desc</gi>, <gi>equiv</gi>. See <ptr type="crossref" target="TBED03v00.htm#quotation"/>, and <ptr type="crossref" target="TBED08v00.htm"/>.</item>
            </list>
          </p>
          <figure xml:id="example13">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <p>
                                <q>Plenty of options</q>, he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. It was titled 'While thou art here', by Sir Edmund Peckwood. While reading the first sentence, his placid expression turned to a certain <foreign>je ne sais quoi</foreign>: <quote>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</quote>
                            </p>
            </egXML>
            <head type="legend">Encoding the reason for text highlighting with specific TEI elements.</head>
          </figure>
          <p>However, words or phrases carrying semantic and logical information don’t need to be highlighted by means of typographic codes and can occur in texts unmarked. Think about titles (<gi>title</gi>), names (<gi>name</gi>), numbers (<gi>num</gi>), measures (<gi>measure</gi>), dates (<gi>date</gi>), addresses (<gi>address</gi>), and abbreviations (<gi>abbr</gi>).</p>
          <div xml:id="referringstring">
            <head>Referring Strings</head>
            <p>Proper nouns name people, places, and objects and are easily traceable in a text, since they commonly appear with the first letter in upper case. This may be encoded with <gi>name</gi> carrying a <att>type</att> attribute specifying the kind of object referred to.
              <figure xml:id="example14">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. It was titled 'While thou art here', by Sir <name type="person">Edmund Peckwood.</name> While reading the first sentence, his placid expression turned to a certain je ne sais quoi: 'For the first time in twenty-five years, Dr <name type="person">Burt Diddledygook</name> decided not to turn up to the annual meeting of the <name type="organisation">Royal Academy of Whoopledywhaa</name>.'</p>
                </egXML>
                <head type="legend">Encoding proper names with the <gi>name</gi> element.</head>
              </figure>
            </p>
            <p>However, people, places, and objects may also be referred to with common nouns, for which the element <gi>rs</gi> (referring string) may be used. This element may also carry a <att>type</att> attribute specifying the kind of object referred to.<note>The <gi>rs</gi> element may be used for any reference to a person, place or object in the form of a proper noun, a noun phrase, or a common noun. The <gi>name</gi> element may be used synonymously with the <gi>rs</gi> element in the special cases of referencing strings which consist only of proper nouns. The choice between <gi>rs</gi> or <gi>name</gi> in these cases is the encoder’s. Both elements can nest: for example, <gi>name</gi> may also nest inside <gi>rs</gi> where a proper name is part of a larger referring string, as in <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                    <rs type="organisation">Royal Academy of <name type="place">Whoopledywhaa</name>
                                    </rs>
                                </egXML>
                            </note>
              <figure xml:id="example15">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>'Plenty of options', <rs type="person">he</rs> thought, sat on a bench and opened the book <rs type="person">he</rs> had taken from the <rs type="organisation">Whoopledywhaaian National Library</rs>. It was titled 'While thou art here', by Sir <name type="person">Edmund Peckwood.</name> While reading the first sentence, <rs type="person">his</rs> placid expression turned to a certain je ne sais quoi: 'For the first time in twenty-five years, Dr <name type="person">Burt Diddledygook</name> decided not to turn up to the annual meeting of the <name type="organisation">Royal Academy of Whoopledywhaa</name>.'</p>
                </egXML>
                <head type="legend">Encoding referring strings with <gi>rs</gi>.</head>
              </figure>
            </p>
          </div>
          <div xml:id="date">
            <head>Dates and Time</head>
            <p>Any expression defining a date or time may be encoded with the corresponding elements <gi>date</gi> and <gi>time</gi>. The system or calendar to which the date belongs may be documented using a <att>calendar</att> attribute. The <att>when</att> attribute supplies the value of a date or time in a standard form, which is useful for text processing.</p>
            <p>The normalised representation of the content of the <gi>date</gi> element should conform to a valid W3C schema datatype for expressing temporal data: 
              <list rend="bulleted">
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="2009" calendar="Gregorian">2009</date>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="2009-12" calendar="Gregorian">December 2009</date>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="2009-12-31" calendar="Gregorian">31 Dec 2009</date>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="2009-12-31" calendar="Gregorian">New Year’s Eve 2009</date>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="2009-12-31" calendar="Persian">Panjshanbeh 10 Dey 1388</date>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="--12-31">last day of December</date>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="--12">December</date>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <date when="---31">thirty-first of the month</date>
                                    </egXML>
                                </item>
              </list>
            </p>
            <p>The same counts for the normalized representation of the content of <gi>time</gi>: 
              <list rend="bulleted">
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <time when="23:55:00">11:55 pm</time>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <time when="23:55:00">five minutes before midnight</time>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <time when="2009-12-31T23:55:00">five minutes before the new year 2010</time>
                                    </egXML>
                                    <note>The last example also includes a date string and can equally well be tagged as <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                            <date when="2009-12-31T23:55:00">five minutes before the new year 2010</date>
                                        </egXML>.</note>
                                </item>
              </list>
            </p>
            <p>The <gi>date</gi> element can also be used to mark a span of time, using the <att>from</att> and <att>to</att> attributes, or a range of time, using the <att>notBefore</att> and <att>notAfter</att> attributes:
              <figure xml:id="example16">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in <date from="1935" to="1960">twenty-five years</date>, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). It was a sunny day in <date notBefore="1960-09-15" notAfter="1960-09-30">late September 1960</date> bang on <time when="12:00:00">noontime</time> and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                </egXML>
                <head type="legend">Expressing more dating nuances with <att>from</att>, <att>to</att>, <att>notBefore</att>, and <att>notAfter</att>.</head>
              </figure>
              In this example, the <att>from</att> and <att>to</att> attributes in the first <gi>date</gi> element express a period of time, spanning from 1935 to 1960. In the second <gi>date</gi> element, the combination of <att>notBefore</att> and <att>notAfter</att> indicates a time range in the second half of September 1960.</p>
            <note type="reference">See section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/ND.html#NDATTSda">13.1.2 Dating Attributes</ref> of the TEI Guidelines for a comprehensive explanation of the use and combinations of these dating attributes.</note>
          </div>
          <div xml:id="number">
            <head>Numbers and Measures</head>
            <p>Numbers and measures may be encoded using <gi>num</gi> and <gi>measure</gi> respectively.</p>
            <p>
                            <gi>num</gi> may contain numbers, written in any form. The attribute <att>type</att> can be used to indicate the type of numeric value, and <att>value</att> to supply the value of the number in standard form.
              <figure xml:id="example17">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in <num type="cardinal" value="25">twenty-five</num> years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</p>
                  </egXML>
                <head type="legend">Encoding numbers with <gi>num</gi>.</head>
              </figure>
            </p>
            <p>Here are more examples of the standardisation of numbers: 
              <list rend="bulleted">
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <num value="25">xxv</num>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <num type="percentage" value="25">twenty-five percent</num>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <num type="percentage" value="25">25%</num>
                                    </egXML>
                                </item>
                <item>
                                    <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="inline omit-ns">
                                        <num type="ordinal" value="25">25th</num>
                                    </egXML>
                                </item>
              </list>
            </p>
            <p>In its fullest form, a measure consists of a number, a phrase expressing units of measure, and a phrase expressing the commodity being measured, though not all of these components need to be present in every case. These three components may be encoded on a <gi>measure</gi> element with the attributes <att>quantity</att>, <att>unit</att>, and <att>commodity</att>.
              <figure xml:id="example18">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>Or worse, what would happen when another Academy member had decided to go for a stroll in the park instead? He quickly thought up several possible plans:</p>
                  <list>
                    <item>hide behind a tree and duck</item>
                    <item>catch the duck as subject material for a speech on the annual meeting</item>
                    <item>be frank, meet his colleague, and <list>
                      <item>1. pat him on the shoulder</item>
                      <item>2. tell a joke</item>
                      <item>3. hand him the duck</item>
                      <item>4. offer him a sip from his <measure type="volume" quantity="2.5" unit="litre" commodity="coca-cola">2.5 l bottle of coke</measure>
                                                </item>
                      <item>5. pull his beard</item>
                    </list>
                                        </item>
                  </list>
                </egXML>
                <head type="legend">Encoding measures with <gi>measure</gi>.</head>
              </figure>
            </p>
          </div>
          <div xml:id="address">
            <head>Addresses</head>
            <p>E-mail addresses can be encoded with the <gi>email</gi> element.
              <figure xml:id="example19">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <email>M.Orkelidius@raw.org</email>
                </egXML>
                <head type="legend">Encoding an e-mail address with <gi>email</gi>.</head>
              </figure>
            </p>
            <p>A postal address can be encoded with the <gi>address</gi> element. It can contain a number of <gi>addrLine</gi> elements, one for each address line.
              <figure xml:id="example20">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>Or maybe he could still announce his absence from the meeting by sending an antedated letter of apology to 
                    <address>
                      <addrLine>Professor M. Orkelidius</addrLine>
                      <addrLine>Royal Academy of Whoopledywhaa</addrLine>
                      <addrLine>Queenstreet 81</addrLine>
                      <addrLine>TB90 00E Whoopledywhaa</addrLine>
                    </address>
                  </p>
                </egXML>
                <head type="legend">Encoding a postal address with <gi>address</gi>.</head>
              </figure>
            </p>
            <p>Alternatively, an address can be encoded in more detail, with more semantically rich elements such as <gi>street</gi>, <gi>postCode</gi> and <gi>postBox</gi>. Names of people, organisations, companies, etc. may be encoded using <gi>name</gi>, with a <att>type</att> attribute indicating the type of object which is being named.
              <figure xml:id="example21">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>Or maybe he could still announce his absence from the meeting by sending an antedated letter of apology to 
                    <address>
                      <name type="person">Professor M. Orkelidius</name>
                      <name type="organisation">Royal Academy of Whoopledywhaa</name>
                      <street>Queenstreet 81</street>
                      <postCode>TB90 00E</postCode>
                      <name type="city">Whoopledywhaa</name>
                    </address>
                  </p>
                </egXML>
                <head type="legend">Encoding the components of a postall address with specific elements.</head>
              </figure>
            </p>
          </div>
          <div xml:id="abbreviation">
            <head>Abbreviations and Expansions</head>
            <p>It is sometimes useful to encode abbreviations and their expansions in texts. This facilitates special processing, regularisation by the full form of an abbreviation, or the rendering of different possible expansions of an abbreviation. Abbreviations may be marked using <gi>abbr</gi>. The <att>type</att> attribute may be used to distinguish types of abbreviations by their function:
              <figure xml:id="example22">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in twenty-five years, <abbr type="title">Dr</abbr> Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (<abbr type="acronym">RAW</abbr>). It was a sunny day in late September 1960 bang on noontime and <abbr>Dr</abbr> Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the <abbr type="acronym">RAW</abbr> weren't even going to notice his absence.</p>
                </egXML>
                <head type="legend">Encoding abbreviations with <gi>abbr</gi>.</head>
              </figure>
            </p>
            <p>Alternatively, and depending on the encoder’s preference, the expansion of an abbreviation may be encoded with <gi>expan</gi>. This is often done when the editor or encoder of a text has silently expanded the abbreviation for whatever reason. It is equally possible to record both the (original) abbreviation and the (editorial) expansion by wrapping both in a <gi>choice</gi> element.
              <figure xml:id="example23">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in twenty-five years, <choice>
                                            <abbr type="title">Dr</abbr>
                                            <expan>Doctor</expan>
                                        </choice> Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (<choice>
                                            <abbr type="acronym">RAW</abbr>
                                            <expan>Royal Academy of Whoopledywhaa</expan>
                                        </choice>).</p>
                </egXML>
                <head type="legend">Combining both abbreviations and their expansions in <gi>choice</gi>.</head>
              </figure>
            </p>
          </div>
        </div>        
        <div xml:id="analyticalfeatures">
          <head>Analytical Features</head>
          <p>The analysis of texts can generate information which may be added to the text and encoded as metadata or as part of the text. Explicit notes are the most common example of the latter while editorial statements like correction of errors, regularisation of spelling variants, or the marking of the text for indexing purposes are examples of the former. The creation of index entries also enhances further analysis of the text.</p>
          <div xml:id="notes">
            <head>Notes and Annotations</head>
            <p>The most explicit form of textual annotation is the addition of notes to the text using <gi>note</gi>. This element serves for the encoding of all kinds of annotations, whether they are already present in the text or supplied by the editor; whether they appear as block notes in the main text area, at the foot of the page, at the end of the chapter or volume, in the margin, or in some other place. The <att>type</att> attribute can be used to distinguish between different types of annotations. In a <att>resp</att> attribute, the person or other agency responsible for the content of the note can be identified, pointing to the <att>xml:id</att> value of an element that identifies this person or agency. Where possible, a note can be inserted in the text at the point where its identifier or mark first appears. The location of the note may be documented using a <att>place</att> attribute.
              <figure xml:id="example24">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library<note n="1" place="foot" type="authorial">The National Library of Whoopledywhaa was founded in 1886 with the acquisition of the library of the late King Anthony.</note>. It was titled 'While thou art here', by Sir Edmund Peckwood<note type="editorial" resp="#EV">The manuscript reads 'Petwood'.</note>. While reading the first sentence, his placid expression turned to a certain je ne sais quoi: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.'</p>
                </egXML>
                <head type="legend">Encoding an editorial annotation with <gi>note</gi>.</head>
              </figure>
              Here, an editorial annotation is inserted into the text, using the <gi>note</gi> element. Its <att>type</att> attribute indicates it is an <val>editorial</val> annotation; the person responsible for its content is pointed to with the <att>resp</att> attribute. In this case, it is referring to another element in the same document, with <att>xml:id</att>=<val>EV</val>. In the <att>resp</att> attribute, this ID value is preceded with a hash character (<code>#</code>), in order to indicate it as the identifier part of a formal URI reference.</p>
            <note type="reference">See section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#COXR">3.6. Simple Links and Cross-References</ref> in the TEI Guidelines for a full discussion of notes which are encoded not at the point of attachment but at the point of appearance, e.g., at the end of a chapter or a volume. See chapter <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/SA.html">16. Linking, Segmentation, and Alignment</ref> for mechanisms to encode multiple views of larger or heterogeneous spans of text. See section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/AI.html#AISP">17.3. Spans and Interpretation</ref> for a discussion of advanced interpretive annotations.</note>
          </div>
          <div xml:id="index">
            <head>Index Entries</head>
            <p>Pre-existing indexes may be encoded as plain lists (<gi>list</gi>) inside <gi>div</gi> in the <gi>front</gi> or <gi>back</gi> sections of a <gi>text</gi>, for example. On the other hand, in order to generate new indexes from machine readable text, the location to be indexed can be marked with an <gi>index</gi> element. When the text is being indexed on multiple levels, the name of the index can be given in an <att>indexName</att> attribute. The term to be indexed should appear in a <gi>term</gi> element inside <gi>index</gi>.
              <figure xml:id="example25">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library<index indexName="institutions">
                                            <term>Library</term>
                                            <index>
                                                <term>National</term>
                                            </index>
                                        </index>. It was titled 'While thou art here', by Sir Edmund Peckwood. While reading the first sentence, his placid expression turned to a certain je ne sais quoi: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaaw<index indexName="institutions">
                                            <term>Academy</term>
                                            <index>
                                                <term>Royal</term>
                                            </index>
                                        </index>.'</p>
                </egXML>
                <head type="legend">Encoding index entries with <gi>index</gi>.</head>
              </figure>
            </p>
            <p>Notice, how <gi>index</gi> entries can nest in order to create multi-level index entries. With this encoding in place, it will be possible to create an <soCalled>institutions</soCalled> index, with the terms <q>Library, National</q> and <q>Academy, Royal</q>, referencing the location of the original <gi>index</gi> element in the text.</p>
            <note type="reference">See section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#CONOIX">3.8.3 Index Entries</ref> of the TEI Guidelines for a full discussion of the TEI encoding strategies applied to indexes.</note>
          </div>
          <div xml:id="errors">
            <head>Apparent Errors</head>
            <p>Apparent errors in the text may be indicated using the <gi>sic</gi> element, or corrected inside <gi>corr</gi>.
              <figure xml:id="example26">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While thou art here', by Sir Edmund <sic>Petwood</sic>.</p>
                </egXML>
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While thou art here', by Sir Edmund <corr>Peckwood</corr>.</p>
                </egXML>
                <head type="legend">Alternative encodings: an apparent error with <gi>sic</gi>, or its correction with <gi>corr</gi>.</head>
              </figure>
            </p>
            <p>Alternatively, the encoder may both record the original source text and provide a correction by using both <gi>sic</gi> and <gi>corr</gi> (in either order) wrapped in a <gi>choice</gi> element.
              <figure xml:id="example27">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While thou art here', by Sir Edmund <choice>
                                            <corr>Peckwood</corr>
                                            <sic>Petwood</sic>
                                        </choice>.</p>
                </egXML>
                <head type="legend">Combining both errors and their corrections in <gi>choice</gi>.</head>
              </figure>
            </p>
            <p>The encoder may encode the degree of certainty associated with the intervention or interpretation using a <att>cert</att> attribute, and indicate the agency responsible for the intervention or interpretation (for instance an editor or transcriber), using <att>resp</att>. The value of <att>resp</att> is a pointer to an element in the document header that is associated with a person responsible for the intervention.
              <figure xml:id="example28">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While thou art here', by Sir Edmund <choice>
                                            <corr cert="high" resp="#EV">Peckwood</corr>
                                            <sic>Petwood</sic>
                                        </choice>.</p>
                </egXML>
                <head type="legend">Identifying the person responsible for a correction with <att>resp</att>, and indicating a degree of certainty with <att>cert</att>.</head>
              </figure>
            </p>
            <p>The attribute value <val>#EV</val> points to a <gi>name</gi> element in the <gi>teiHeader</gi>, for example in the <gi>respStmt</gi> section:
              <figure xml:id="example29">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <respStmt>
                    <resp>editor</resp>
                    <name xml:id="EV">Edward Vanhoutte</name>
                  </respStmt>
                </egXML>
                <head type="legend">Identifying an editor for the electronic text with <gi>respStmt</gi>.</head>
              </figure>
            </p>
            <note type="reference">See <ptr type="crossref" target="TBED06v00.htm#editorialInterventions"/> for a fuller treatment of editorial interventions.</note>
          </div>
          <div xml:id="regularisation">
            <head>Regularisation and Normalisation</head>
            <p>Standard or regularised forms for variant forms or non-standard spelling may be provided for a number of reasons. This is called regularisation or normalisation. The original, non-normalized form may be flagged using the <gi>orig</gi> element.
              <figure xml:id="example30">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While <orig>thou</orig> <orig>art</orig> here', by Sir Edmund Peckwood.</p>
                </egXML>
                <head type="legend">Explicitly encoding a word as an original form in the source text, with <gi>orig</gi>.</head>
              </figure>
            </p>
            <p>If the encoder wants to indicate that certain words have been normalised, which means modernisation of spelling in this example, the <gi>reg</gi> element may be used.
              <figure xml:id="example31">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While <reg>you</reg> <reg>are</reg> here', by Sir Edmund Peckwood.</p>
                </egXML>
                <head type="legend">Encoding a regularised form with <gi>reg</gi>.</head>
              </figure>
            </p>
            <p>Alternatively, the encoder may decide to record both the original form <gi>orig</gi> and the regularised form <gi>reg</gi>, wrapped inside a <gi>choice</gi>. In the case of the modernisation of spelling, an electronic text could thus serve as the basis of an old- or new-spelling edition.
              <figure xml:id="example32">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While <choice>
                                            <orig>thou</orig>
                                            <reg>you</reg>
                                        </choice> <choice>
                                            <orig>art</orig>
                                            <reg>are</reg>
                                        </choice> here', by Sir Edmund Peckwood.</p>
                </egXML>
                <head type="legend">Combining both original forms and their regularisations in <gi>choice</gi>.</head>
              </figure>
            </p>
            <p>The <att>resp</att> attribute may be used to specify the person or agency responsible for the regularisation or normalisation.
              <figure xml:id="example33">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>It was titled 'While <choice>
                                            <orig>thou</orig>
                                            <reg resp="#EV">you</reg>
                                        </choice> <choice>
                                            <orig>art</orig>
                                            <reg resp="#EV">are</reg>
                                        </choice> here', by Sir Edmund Peckwood.</p>
                </egXML>
                <head type="legend">Identifying the person responsible for a normalisation with <att>resp</att>.</head>
              </figure>
            </p>
          </div>
          <div xml:id="additions">
            <head>Additions, Deletions, and Omissions</head>
            <p>Another editorial intervention in the text may be the documentation and creation of additions, deletions, and omissions. When transcribing a source document, <gi>gap</gi> may be used to indicate a point where material has been omitted, both because the material is illegible, invisible, or inaudible in the source, and because the editor or transcriber has decided to omit material for editorial reasons or as part of sampling practice. The reason for omission may be given in a <att>reason</att> attribute. Sample values include <val>sampling</val>, <val>illegible</val>, <val>inaudible</val>, <val>irrelevant</val>, <val>cancelled</val>. Additional attributes like <att>extent</att> and <att>unit</att> may document the amount of characters, words, lines or any other unit omitted.<note>If the omission is an editorial policy decision, e.g., the systematic exclusion of marginal commentaries from an encoding, the full details of the policy should be documented in <gi>editorialDecl</gi> inside the <gi>encodingDesc</gi> of the TEI Header. See <ptr type="crossref" target="TBED02v00.htm#encodingDesc"/>.</note>
              <figure xml:id="example34">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). <gap reason="irrelevant" unit="words" extent="32"/>It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                </egXML>
                <head type="legend">Encoding omitted text with <gi>gap</gi>.</head>
              </figure>
            </p>
            <p>The <gi>gap</gi> element may appear as an empty element, but my also contain a description of the material omitted using <gi>desc</gi>.
              <figure xml:id="example35">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). <gap reason="irrelevant" unit="words" extent="32">
                                            <desc>Commentary on the founding charter of the RAW</desc>
                                        </gap> It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                </egXML>
                <head type="legend">Describing text fragments omitted with <gi>desc</gi> inside <gi>gap</gi>.</head>
              </figure>
            </p>
            <p>Where words or phrases of moderate lengths have been added or deleted in the source text, this may be recorded using <gi>add</gi> and <gi>del</gi>. As with all TEI elements, information on the actual rendition of the additions and deletions can be provided in the global <att>rend</att> attribute. Additionally, the place of the addition may also be recorded using <att>place</att>. See <ptr type="crossref" target="TBED06v00.htm#simpleAddDel"/> for a detailed discussion of these elements and their attributes.<note>When an editor wants to mark his or her own additions as editorial interventions in the text, <gi>corr</gi> or <gi>supplied</gi> should be used, not <gi>add</gi>. See <ptr type="crossref" target="TBED06v00.htm#editorialInterventions"/>. For longer additions and deletions, <gi>addSpan</gi> and <gi>delSpan</gi> may be used. See <ptr type="crossref" target="TBED06v00.htm#complexAddDel"/>.</note>
              <figure xml:id="example36">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). It was a sunny day in <add place="supralinear">late</add> September 1960 bang on noontime and Dr Burt was looking forward to a <del rend="overstrike">walk</del>
                                        <add place="infralinear">stroll</add> in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                </egXML>
                <head type="legend">Encoding <soCalled>authorial</soCalled> additions and deletions in the source text with <gi>add</gi> and <gi>del</gi>, respectively.</head>
              </figure>
            </p>
            <p>When additions and deletions can be considered a single intervention in the text, <gi>add</gi> and <gi>del</gi> can be grouped inside <gi>subst</gi> (substition).
              <figure xml:id="example37">
                <egXML xmlns="http://www.tei-c.org/ns/Examples">
                  <p>For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa (RAW). It was a sunny day in <add place="supralinear">late</add> September 1960 bang on noontime and Dr Burt was looking forward to a <subst>
                                            <del rend="overstrike">walk</del>
                                            <add place="infralinear">stroll</add>
                                        </subst> in the park instead. He hoped his fellow members of the RAW weren't even going to notice his absence.</p>
                </egXML>
                <head type="legend">Grouping related additions and deletions that together make up one substitution in the text, inside <gi>subst</gi>.</head>
              </figure>
            </p>
            <p>Where deletions in the source text cannot be read with confidence, <gi>unclear</gi> should be used with the <att>reason</att> attribute indicating that the difficulty of transcription is due to deletion. See <ptr type="crossref" target="TBED06v00.htm#supplied"/>.</p>
          </div>
        </div>
      </div>
            <div xml:id="nontextual">
        <head>Non-Textual Phenomena</head>
        <p>Textual documents often include non-textual phenomena such as images and graphics (illustrations, diagrams, drawings, artwork, ...). These non-textual phenomena serve different purposes: some are an integral part of the text, e.g., in comic books and graphic novels, others just function as illustrations to the text; some are essential for a good understanding of the text, others add very little to that text. The decision how to encode these non-textual materials is once more up to the encoder and the encoding policy in force.</p>
        <p>From a structural point of view, images and graphics may be anchored to a particular point in the text. This inline location can be indicated by using the empty element <gi>graphic</gi>. Typically, a <att>url</att> attribute will reference a digital representation of the image. This can be a local path or a reference to an online image or graphical file.
          <figure xml:id="example38">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. <graphic url="http://www.whoopledywhaa.info/library/facade.png"/> It was titled 'While thou art here', by Sir Edmund Peckwood. <graphic url="wtatcover.jpg"/> While reading the first sentence, his placid expression turned to a certain je ne sais quoi: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</p>
            </egXML>
            <head type="legend">Encoding an image with <gi>graphic</gi>.</head>
          </figure>
        </p>
        <p>Alternatively, encoded binary data representing an inline graphic or image may be embedded directly within the document. In this case, the <gi>binaryObject</gi> element may be used to represent an encoded version of its binary data.</p>
        <p>An image or a graphic will often be accompanied by associated text such as a caption, a label, or a heading which may be encoded using <gi>head</gi>. More extensive comments or discussions on the figure or graphic may be given inside one or more <gi>p</gi> or <gi>ab</gi> elements. Both the graphic or figure (<gi>graphic</gi> or <gi>binaryObject</gi>), associated text(s) (<gi>head</gi>, <gi>p</gi> or <gi>ab</gi>), and descriptions of the image (<gi>figDesc</gi>) are grouped in a wrapping <gi>figure</gi> element:
          <figure xml:id="example39">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <figure>
                <graphic url="http://www.whoopledywhaa.info/library/facade.png"/>
                <head>The National Library of Whoopledywhaa.</head>
              </figure>
              <figure>
                <graphic url="wtatcover.jpg"/>
                <head>Figure 2. The cover of the first print edition of "While thou art here" by Sir Edmund Peckwood from the rare books collection of the National Library of Whoopledywhaa.</head>
              </figure>
            </egXML>
            <head type="legend">Grouping information related to a graphical element inside <gi>figure</gi>.</head>
          </figure>
        </p>
        <note type="summary">The <gi>figure</gi> element is used to contain images, captions, and textual descriptions of the pictures. The images themselves are specified using the <gi>graphic</gi> element, whose <att>url</att> attribute provides the location of an image and whose optional <att>n</att> and <att>xml:id</att> attributes provide opportunities for numbering and identification.</note>
        <p>Figures consisting of several figures or sub-figures can be encoded with nesting <gi>figure</gi> elements:
          <figure xml:id="example40">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <figure n="2">
                <figure n="2a">
                  <graphic url="wtatcoverfront.jpg"/>
                  <head>Front</head>
                </figure>
                <figure n="2b">
                  <graphic url="wtatcoverback.jpg"/>
                  <head>Back</head>
                </figure>
                <head>Figure 2. Front and back cover of the first print edition of "While thou art here" by Sir Edmund Peckwood from the rare books collection of the National Library of Whoopledywhaa.</head>
              </figure>
            </egXML>
            <head type="legend">Encoding composite figures with nesting <gi>figure</gi> elements.</head>
          </figure>
        </p>
        <p>Note, how in the previous example the different nesting figures are numbered in an <att>n</att> attribute. This is one of the global attributes available to all TEI elements. For a discussion of this and other global attributes, see <ptr type="crossref" target="#globalattributes"/>.</p>
        <p>For the purpose of reading devices that cannot represent images, e.g., reading software for the visually impaired, a description of the figure or graphic may be supplied by the editor of the electronic text in a <gi>figDesc</gi> element:
          <figure xml:id="example41">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <figure>
                <graphic url="http://www.whoopledywhaa.info/library/facade.png"/>
                <head>The National Library of Whoopledywhaa.</head>
                <figDesc>The figure shows the front of the National Library of Whoopledywhaa with the two typical towers in the so called Whooply-Gothic style. The towers are 145 metres high and the facade of the building is 48 metres wide. The 16 windows in the front are made of recycled stained glass windows of the nearby Saint-Morkel's church which now serves as a swimming pool.</figDesc>
              </figure>
            </egXML>
            <head type="legend">Providing an editorial description of a graphic element with <gi>figDesc</gi>.</head>
          </figure>
        </p>
        <note type="reference">For more information on the treatment of non-textual phenomena in TEI, see <ptr type="crossref" target="TBED03v00.htm#figures"/>, and chapter <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/FT.html">14 Tables, Formulæ, and Graphics</ref> of the TEI Guidelines.</note>
      </div>
            <div xml:id="globalattributes">
        <head>Global Attributes</head>
        <p>Just as any XML element, TEI elements can carry one or more attributes which provide additional information, and function as their qualifiers and quantifiers. The full list of all attributes defined in TEI is available as <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/REF-ATTS.html">Appendix D Attributes</ref> of the TEI Guidelines. A couple of these attributes can occur on all TEI elements: those are defined as <soCalled>global attributes</soCalled>, in the <ident type="class">att.global</ident> attribute class, and its subclasses. Not all of those subclasses are always present for all TEI documents (see <ptr type="crossref" target="TBED08v00.htm#modulesElements"/> for more information on including TEI modules in a TEI schema), but a number of attribute classes are <emph>always</emph> present in any TEI schema (since they are defined in the <ident type="moduke">tei</ident> module). Together, they define 11 global attributes, available on any TEI element:
          <list type="gloss">
            <label>
                            <ident type="class">att.global</ident>
                        </label>
            <item>
              <list type="gloss">
                <label>
                                    <att>xml:id</att>
                                </label>
                <item>provides a unique identifier for an element.</item>
                <label>
                                    <att>n</att>
                                </label>
                <item>provides a number or other label for an element, which does not need to be unique within the document.</item>
                <label>
                                    <att>xml:lang</att>
                                </label>
                <item>indicates the language of an element using a <soCalled>tag</soCalled> generated according to <ref target="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">BCP 47</ref>.</item>
                <label>
                                    <att>xml:base</att>
                                </label>
                <item>provides a base URI reference with which applications can resolve relative URI references into absolute URI references.</item>
                <label>
                                    <att>xml:space</att>
                                </label>
                <item>signals an intention about how white space should be managed by applications.</item>
              </list>
            </item>
            <label>
                            <ident type="class">att.global.rendition</ident>
                        </label>
            <item>
              <list type="gloss">
                <label>
                                    <att>rend</att>
                                </label>
                <item>indicates how the element was rendered or presented in the source text.</item>
                <label>
                                    <att>style</att>
                                </label>
                <item>contains an expression in some formal style definition language which defines the rendering or presentation used for this element in the source text.</item>
                <label>
                                    <att>rendition</att>
                                </label>
                <item>points to a description of the rendering or presentation used for this element in the source text.</item>
              </list>
            </item>
            <label>
                            <ident type="class">att.global.responsibility</ident>
                        </label>
            <item>
              <list type="gloss">
                <label>
                                    <att>cert</att>
                                </label>
                <item>signifies the degree of certainty associated with the intervention or interpretation</item>
                <label>
                                    <att>resp</att>
                                </label>
                <item>indicates the agency responsible for the intervention or interpretation</item>
              </list>
            </item>
            <label>
                            <ident type="class">att.global.source</ident>
                        </label>
            <item>
              <list type="gloss">
                <label>
                                    <att>source</att>
                                </label>
                <item>specifies the source from which some aspect of this element is drawn.</item>
              </list>
            </item>
          </list>
        </p>
        <div xml:id="xmlid">
          <head>
                        <att>xml:id</att>
                    </head>
          <p>The <att>xml:id</att> attribute provides a unique identifier for the element bearing the attribute. The identifier must be unique in the whole XML document. If there is another element in the XML document bearing the same identifier as a value for this attribute, a validating XML parser will signal a syntax error. Conforming to the World Wide Web Consortium’s XML Recommendations, the attribute value must be a legal name, which means that it must start with a letter or the underscore character and contain no characters other than letters, digits, hyphens, underscores, full stops, and certain combining and extension characters. The use of the colon in a unique identifier is forbidden as it has the specific purpose of indicating namespace prefixes in XML.</p>
          <floatingText type="challenge">
            <body>
                            <div xml:id="question2" type="challenge.question" corresp="#solution2">
                <p>Which one of the following examples demonstrates a correct use of <att>xml:id</att> and why? 
                  <list rend="ordered">
                    <item>
                      <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="omit-ns">
                        <p xml:id="p:1">For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</p>
                        <p xml:id="p:2">It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead.</p>
                        <p xml:id="p:2">He hoped his fellow members of the Royal Academy weren't even going to notice his absence.</p>
                      </egXML>
                    </item>
                    <item>
                      <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="omit-ns">
                        <p xml:id="1">For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</p>
                        <p xml:id="2">It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead.</p>
                        <p xml:id="3">He hoped his fellow members of the Royal Academy weren't even going to notice his absence.</p>
                      </egXML>
                    </item>
                    <item>
                      <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="omit-ns">
                        <p xml:id="p1">For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</p>
                        <p xml:id="p2">It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead.</p>
                        <p xml:id="p3">He hoped his fellow members of the Royal Academy weren't even going to notice his absence.</p>
                      </egXML>
                    </item>
                  </list>
                </p>
              </div>
                            <div xml:id="solution2" type="challenge.solution">
                <p>Example 3 demonstrates a correct use of the <att>xml:id</att> attribute: the attribute value is unique, it starts with a letter, and contains no illegal characters. The attribute values in example 1 are not unique and the use of a colon is forbidden. The attribute values in example 2 start with a number, which is not allowed.</p>
              </div>
                        </body>
          </floatingText>
        </div>
        <div xml:id="n">
          <head>
                        <att>n</att>
                    </head>
          <p>The <att>n</att> attribute also provides an identifier for an element, but its value doesn’t need to be a legal XML name. This means that they don’t have to be unique inside the XML document and they may start with and contain any character. Typically <att>n</att> is used to number or label elements. All <att>n</att> values in the following examples are legal:
            <figure xml:id="example42">
              <egXML xmlns="http://www.tei-c.org/ns/Examples" rend="omit-ns">
                <p n="1">For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</p>
                <p n="p2">It was a sunny day in late September 1960 bang on noontime and Dr Burt was looking forward to a stroll in the park instead.</p>
                <p n="paraghraph 3">He hoped his fellow members of the Royal Academy weren't even going to notice his absence.</p>
              </egXML>
              <head type="legend">Providing informal labels for elements in the <att>n</att> attribute.</head>
            </figure>
          </p>
          <p>Although by no means mandatory, it often makes sense to enrich the structural units of a document (e.g., lines in a poem) with some sort of identification (in <att>xml:id</att>) or reference mechanism (in <att>n</att>). Of course, when dealing with complex and/or long documents, this labelling could become a rather demanding task in itself. Fortunately, this job can be done automatically by an XML processor, which can identify the sequential position of one element within another in an XML document without any additional tagging. Instead of manually providing mechanical references for a long poem or collection of poems, you could as well instruct an XML processor to either enrich the TEI encoding and add <att>xml:id</att> or <att>n</att> attributes with appropriate values, or to automatically deduct such reference systems from your markup and present them while rendering the document (e.g., in an HTML version of a poem).</p>
          <note type="reference">See section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/CO.html#CORS2">3.10.2 Creating New Reference Systems</ref> of the TEI Guidelines for guidance on creating sensible reference systems for text structures.</note>
        </div>
        <div xml:id="xmllang">
          <head>
                        <att>xml:lang</att>
                    </head>
          <p>The language of the content of a given element may be documented as the value of an <att>xml:lang</att> attribute. If it is not specified, the value is inherited from that of the immediately enclosing element. Therefore, it is simplest to specify the base language of a text on the <gi>TEI</gi> element and override that with <att>xml:lang</att> attributes only for those elements with a different language.
            <figure xml:id="example43">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <p xml:lang="en">'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. It was titled 'While thou art here', by Sir Edmund Peckwood. While reading the first sentence, his placid expression turned to a certain <foreign xml:lang="fr">je ne sais quoi</foreign>: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.'</p>
              </egXML>
              <head type="legend">Specifying the language of the content of an element with the <att>xml:lang</att> attribute.</head>
            </figure>
          </p>
          <note type="reference">The values for the <att>xml:lang</att> attribute must be constructed in a uniform way as explained in section <ref target=" https://tei-c.org/release/doc/tei-p5-doc/en/html/CH.html#CHSH">vi.1. Language identification</ref> of the TEI Guidelines.</note>
                </div>
        <div xml:id="base">
          <head>
                        <att>xml:base</att>
                    </head>
          <p>Many TEI attributes take a URI reference as their value. Those can be either <term>absolute</term> (starting with the protocol, such as <code>http:</code>, <code>ftp:</code>, ...) or <term>relative</term> (either starting with a local file name, such as <code>names.xml</code>, and/or a fragment identifier, such as <code>#EV</code>). The <att>xml:base</att> attribute can be used to set a context for all relative URLs appearing within the element on which the <att>xml:base</att> attribute is specified. For example:
            <figure xml:id="example44">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <p xml:base="../xml/">'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library<note n="1" place="foot" type="authorial">The National Library of Whoopledywhaa was founded in 1886 with the acquisition of the library of the late King Anthony.</note>. It was titled 'While thou art here', by Sir Edmund Peckwood<note type="editorial" resp="names.xml#EV">The manuscript reads 'Petwood'.</note>. While reading the first sentence, his placid expression turned to a certain je ne sais quoi: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.'</p>
              </egXML>
              <head type="legend">Providing a context for the resolution of relative URIs with the <att>xml:base</att> attribute.</head>
            </figure>
            In this example, the relative URI <code>names.xml#EV</code> will be resolved to a subfolder named <ident type="file">xml</ident> of the folder containing the electronic text containing that reference. Hence, the URI reference will be evaluated as  <code>../xml/names.xml#EV</code>.</p>
        </div>
        <div xml:id="space">
          <head>
                        <att>xml:space</att>
                    </head>
          <p>This global attribute provides a mechanism for indicating to systems processing an XML file how they should treat white space. It has two possible values: <val>default</val> (white space will most probably be normalised during processing) and <val>preserve</val> (white space should be preserved as is during processing).
            <figure xml:id="example45">
              <egXML xmlns="http://www.tei-c.org/ns/Examples" xml:space="preserve">
                <choice>
                  <sic xml:space="preserve">white     space</sic>
                  <corr>white space</corr>
                </choice>
              </egXML>
              <head type="legend">Specifying how white space should be handled during processing with <att>xml:space</att>.</head>
            </figure>
            In this example, the <att>xml:space</att> on the <gi>sic</gi> element specifies that the (unusual) spacing in the original form should be preserved when this document is being processed.</p>
          <p>Notice, how the <att>xml:space</att> attribute is rarely used in TEI documents because such layout features are generally expressed more confidently, and descriptively, with TEI elements such as <gi>lb</gi> or <gi>space</gi>, or using the renditional attributes described next.</p>
        </div>        
        <div xml:id="rend">
                    <head>
                        <att>rend</att>
                    </head>
          <p>The <att>rend</att> attribute is used to document information about the physical appearance of the text in the source. In the following example, it is used to indicate that the title, the French phrase, and the name of the Royal Academy are printed in italics:
            <figure xml:id="example46">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. It was titled <title type="m" rend="italics">While thou art here</title>, by Sir Edmund Peckwood. While reading the first sentence, his placid expression turned to a certain <hi rend="italics">je ne sais quoi</hi>: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the <name type="organisation" rend="italics">Royal Academy of Whoopledywhaa</name>.'</p>
              </egXML>
              <head type="legend">Indicating specific renditional features in the source text with <att>rend</att>.</head>
            </figure>
            The value for <att>rend</att> can take the form of a white space separated list of idiosyncratic keywords, which an XML processor can act upon when rendering the document. This means that multiple renditional features can be enumerated with <att>rend</att>.
          </p>
        </div>
        <div xml:id="style">
                    <head>
                        <att>style</att>
                    </head>
          <p>The <att>style</att> attribute can also be used to document information about the physical appearance of the text in the source. Contrary to <att>rend</att>, <att>style</att> must express this information in some formal style definition language. This will most often be <ref target="https://www.w3.org/TR/CSS2/">CSS</ref>, although others are possible as well. The name of that formal style definition language can be given in the <gi>encodingDesc</gi> section of the header, in a <gi>styleDefDecl</gi> element: 
            <figure xml:id="example47">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <TEI>
                  <teiHeader>
                    <!-- ... -->
                    <encodingDesc>
                      <styleDefDecl scheme="css" schemeVersion="2.1"/>
                      <!-- ... -->
                    </encodingDesc>
                    <!-- ... -->
                  </teiHeader>
                  <text>
                    <body>
                      <!-- ... -->
                      <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. It was titled <title type="m" style="font-style:italic;">While thou art here</title>, by Sir Edmund Peckwood. While reading the first sentence, his placid expression turned to a certain <hi rend="italics">je ne sais quoi</hi>: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the <name type="organisation" style="font-weight:italic;">Royal Academy of Whoopledywhaa</name>.'</p>
                      <!-- ... -->                      
                    </body>
                  </text>
                </TEI>
              </egXML>
              <head type="legend">Indicating specific renditional features in the source text with <att>rend</att>.</head>
            </figure>
          </p>
        </div>
        <div xml:id="rendition">
                    <head>
                        <att>rendition</att>
                    </head>
          <p>Whereas the <att>rend</att> and <att>style</att> attributes documents the appearance of text locally, i.e., attached to an element, the <att>rendition</att> attribute points to a description of the rendering or appearance in the header (<gi>teiHeader</gi>), more specifically inside a <gi>tagsDecl</gi> inside the <gi>encodingDesc</gi> section. This is done in free text or using a formal language inside a <gi>rendition</gi> element. This way, only one description of the rendering must be given, which can be referred to with <att>rendition</att> attributes on elements in the text. The advantage of this system becomes clear when both <att>rendition</att> and <att>rend</att> are used for occurrences of a given element. While the former refers to an overall description of the appearance of that element in the source, the latter documents the local deviation from that generally imposed rendition.</p>
          <p>In the following example, we see a description of the overall rendering of <gi>hi</gi> elements in a document, in the <gi>tagsDecl</gi> element inside the <gi>encodingDesc</gi> section of <gi>teiHeader</gi>. The <att>gi</att> attribute of <gi>tagUsage</gi> names the elements for which the rendition described in <gi>rendition</gi> is documented. The formal namespace in which the tags described in <gi>tagUsage</gi> are defined, must be specified in the <att>name</att> attribute of a surrounding <gi>namespace</gi> element. The value of the <att>rendition</att> attribute of <gi>tagUsage</gi> refers to <gi>rendition</gi> by way of the latter’s <att>xml:id</att> attribute. This way, all <gi>hi</gi> elements inside <gi>text</gi> have the style, defined as <val>italic</val>, as their default rendition. In the following example, the third occurrence of the <gi>hi</gi> element in the text documents a deviant rendition, by means of the <att>rend</att> attribute.
            <figure xml:id="example48">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <TEI>
                  <teiHeader>
                    <!-- ... -->
                    <encodingDesc>
                      <!-- ... -->
                      <tagsDecl>
                        <rendition xml:id="italic">font-style:italic;</rendition>
                        <namespace name="http://www.tei-c.org/ns/1.0">
                          <tagUsage gi="hi" rendition="#italic"/>
                        </namespace>
                      </tagsDecl>
                      <!-- ... -->
                    </encodingDesc>
                    <!-- ... -->
                  </teiHeader>
                <text>
                  <body>
                    <!-- ... -->
                    <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. It was titled <hi>While thou art here</hi>, by Sir Edmund Peckwood. While reading the first sentence, his placid expression turned to a certain <hi>je ne sais quoi</hi>: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the <hi rend="roman">Royal Academy of Whoopledywhaa</hi>.'</p>
                    <!-- ... -->
                  </body>
                </text>
                </TEI>
              </egXML>
              <head type="legend">Referring to central definitions of rendition styles with <att>rendition</att>.</head>
            </figure>
          </p>
        </div>
        <div xml:id="cert">
          <head>
                        <att>cert</att>
                    </head>
          <p>The <att>cert</att> attribute provides a method of indicating the encoder’s certainty concerning an intervention or interpretation represented by the markup. This can be done with an informal classification, such as <val>high</val>, <val>medium</val>, or <val>low</val>, or more formal systems, such as a probability scale between <val>1</val> and <val>0</val>.
            <figure xml:id="example49">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <choice>
                  <sic cert="low">Pekwood</sic>
                  <sic cert="high">Petwood</sic>
                  <corr>Peckwood</corr>
                </choice>
              </egXML>
              <head type="legend">Expressing certainty for an editorial interpretation with <att>resp</att>.</head>
            </figure>
            In this example, two alternatives are presented for the transcription of the original form, with an indication of the certainty in their respective <att>cert</att> attributes.
          </p>
        </div>
        <div xml:id="resp">
          <head>
                        <att>resp</att>
                    </head>
          <p>The <att>resp</att> attribute is used to indicate the person or agency considered responsible for some aspects of the information encoded by an element. This responsible party should be identified formally in an element with an <att>xml:id</att> attribute, either in the same document, or elsewhere.
            <figure xml:id="example50">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <choice>
                  <sic cert="low">Pekwood</sic>
                  <sic cert="high">Petwood</sic>
                  <corr resp="#EV">Peckwood</corr>
                </choice>
              </egXML>
              <head type="legend">Identifying the person responsible for a correction with <att>resp</att>.</head>
            </figure>
          </p>
        </div>
        <div xml:id="source">
          <head>
                        <att>source</att>
                    </head>
          <p>The <att>source</att> attribute is used to indicate the source of an element and its content, for example by pointing to a bibliograhpic citation.
            <figure xml:id="example51">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <text>
                  <body>
                    <!-- ... -->
                    <p>
                                            <q>Plenty ​of ​options</q>,​ ​he ​thought,​ ​sat ​on ​a ​bench ​and ​opened ​the ​book ​he ​had ​taken ​from ​the ​Whoopledywhaaian ​National ​Library.​ ​It ​was ​titled ​'​While ​thou ​art ​here'​,​ ​by ​Sir ​Edmund ​Peckwood.​ ​While ​reading ​the ​first ​sentence,​ ​his ​placid ​expression ​turned ​to ​a ​certain ​<foreign>je ​ne ​sais ​quoi</foreign>:​ ​<quote source="#peckwood1935">For ​the ​first ​time ​in ​twenty-​five ​years,​ ​Dr ​Burt ​Diddledygook ​decided ​not ​to ​turn ​up ​to ​the ​annual ​meeting ​of ​the ​Royal ​Academy ​of ​Whoopledywhaa.​</quote>
                                        </p>
                    <!-- ... -->
                  </body>
                  <back>
                    <div type="bibliography">
                      <listBibl>
                        <!-- ... -->
                        <bibl xml:id="peckwood1935">
                                                    <author>Peckwood, Edmund</author>. <date when="1935">1935</date>. <title level="m">While thou art here</title>. <pubPlace>​Whoopledywhaa</pubPlace>: <publisher>​Whoopledywhaaian Press</publisher>.</bibl>
                        <!-- ... -->
                      </listBibl>
                    </div>
                  </back>
                </text>
              </egXML>
              <head type="legend">Formally indicating the source for a quotation with <att>source</att>.</head>
            </figure>
          </p>
        </div>
      </div>
            <div xml:id="generalsummary">
        <head>Summary</head>
        <p>After this overview of the most common structures and elements of a TEI document, it is time to put them all together:
          <figure xml:id="example52">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <TEI>
                <teiHeader>
                  <fileDesc>
                    <titleStmt>
                      <title>The Strange Adventures of Dr. Burt Diddledygook: a machine-readable transcription</title>
                      <respStmt>
                        <resp>editor</resp>
                        <name xml:id="EV">Edward Vanhoutte</name>
                      </respStmt>
                    </titleStmt>
                    <publicationStmt>
                      <p>Not for distribution.</p>
                    </publicationStmt>
                                        <sourceDesc>
                      <p>Transcribed from the diaries of the late Dr. Roy Offire.</p>
                    </sourceDesc>
                  </fileDesc>
                  <encodingDesc>
                    <tagsDecl>
                      <rendition xml:id="italic">font-style:italic;</rendition>
                      <namespace name="http://www.tei-c.org/ns/1.0">
                        <tagUsage gi="hi" rendition="#italic"/>
                      </namespace>
                    </tagsDecl>
                  </encodingDesc>
                </teiHeader>
                <text>
                  <front>
                    <div type="dedication">
                      <p>In memory of Lisa Wheeman.</p>
                    </div>
                    <titlePage>
                      <docAuthor>Roy Offire</docAuthor>
                      <docTitle>
                        <titlePart type="main">The Strange Adventures of Dr. Burt Diddledygook</titlePart>
                        <titlePart type="sub">Wanderings in the life of a buoyant academic</titlePart>
                      </docTitle>
                      <byline>Transcribed from the diaries.</byline>
                      <docEdition>First Edition</docEdition>
                      <docImprint>
                                                <pubPlace>Kirkcaldy</pubPlace>, <publisher>Bucket Books</publisher>, <docDate>1972</docDate>
                      </docImprint>
                    </titlePage>
                    <div type="contents">
                      <head>Table of Contents</head>
                      <list>
                        <item>I. The Decision</item>
                        <item>II. The Fuss</item>
                        <item>III. The Celebration</item>
                      </list>
                    </div>
                  </front>
                  <body>
                    <p n="1">For the first time in <date from="1935" to="1960">twenty-five years</date>, <choice>
                                                <abbr type="title">Dr</abbr>
                                                <expan>Doctor</expan>
                                            </choice> Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa<index indexName="institutions">
                                                <term>Academy</term>
                                                <index>
                                                    <term>Royal</term>
                                                </index>
                                            </index> (<abbr type="acronym">RAW</abbr>). <gap reason="irrelevant" unit="words" extent="32">
                                                <desc>Commentary on the founding charter of the RAW</desc>
                                            </gap> It was a sunny day in <date notBefore="1960-09-15" notAfter="1960-09-30">
                                                <add place="supralinear">late</add> September 1960</date> bang on <time when="12:00:00">noontime</time> and <abbr type="title">Dr</abbr> Burt was looking forward to a <subst>
                                                <del rend="overstrike">walk</del>
                                                <add place="infralinear">stroll</add>
                                            </subst> in the park instead. He hoped his fellow members of the <abbr type="acronym">RAW</abbr> weren't even going to notice his absence.</p>
                    <p n="2">Or worse, what would happen when another Academy member had decided to go for a stroll in the park instead? He quickly thought up several possible plans:</p>
                    <list>
                      <item>hide behind a tree and duck</item>
                      <item>catch the duck as subject material for a speech on the annual meeting</item>
                      <item>be frank, meet his colleague, and <list>
                        <item>1. pat him on the shoulder</item>
                        <item>2. tell a joke</item>
                        <item>3. hand him the duck</item>
                        <item>4. offer him a sip from his <measure type="volume" quantity="2.5" unit="litre" commodity="coca-cola">2.5 l bottle of coke</measure>
                                                    </item>
                        <item>5. pull his beard</item>
                      </list>
                                            </item>
                    </list>
                    <p n="3">Or maybe he could still announce his absence from the meeting by sending an antedated letter of apology to <address>
                      <name type="person">Professor M. Orkelidius</name>
                      <name type="organisation">Royal Academy of Whoopledywhaa</name>
                      <street>Queenstreet 81</street>
                      <postCode>TB90 00E</postCode>
                      <name type="city">Whoopledywhaa</name>
                    </address>
                                        </p>
                    <p n="4" xml:lang="en">'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library<index indexName="institutions">
                                                <term>Library</term>
                                                <index>
                                                    <term>National</term>
                                                </index>
                                            </index>
                                            <note n="1" place="foot" type="authorial">The National Library of Whoopledywhaa was founded in 1886 with the acquisition of the library of the late King Anthony.</note>. It was titled <title type="m" rend="italics">While <choice>
                      <orig>thou</orig>
                      <reg resp="#EV">you</reg>
                    </choice>
                      <choice>
                        <orig>art</orig>
                        <reg resp="#EV">are</reg>
                      </choice> here</title>, by Sir Edmund <choice>
                        <corr>Peckwood</corr>
                        <sic>Petwood</sic>
                      </choice>
                                            <note type="editorial" resp="#EV">The manuscript reads 'Petwood'.</note>.
                      <figure n="2">
                        <figure n="2a">
                          <graphic url="wtatcoverfront.jpg"/>
                          <head>Front</head>
                        </figure>
                        <figure n="2b">
                          <graphic url="wtatcoverback.jpg"/>
                          <head>Back</head>
                        </figure>
                        <head>Figure 2:</head>
                        <p>Front and back cover of the first print edition of "While thou art here" by Sir Edmund Peckwood from the rare books collection of the National Library of Whoopledywhaa.</p>
                      </figure>
                      While reading the first sentence, his placid expression turned to a certain <hi xml:lang="fr" rend="italics">je ne sais quoi</hi>: 'For the first time in twenty-five years, <choice>
                                                <abbr type="title">Dr</abbr>
                                                <expan>Doctor</expan>
                                            </choice> Burt Diddledygook decided not to turn up to the annual meeting of the <name type="organisation" rend="italics">Royal Academy of Whoopledywhaa</name>
                                            <index indexName="institutions">
                                                <term>Academy</term>
                                                <index>
                                                    <term>Royal</term>
                                                </index>
                                            </index>.'</p>
                  </body>
                  <back>
                    <div type="colophon">
                      <p>Typeset in Haselfoot 37 and Henry 8. Printed and bound by Whistleshout, South Africa.</p>
                    </div>
                  </back>
                </text>
              </TEI>
            </egXML>
            <head type="legend">A fully encoded transcription of the example text.</head>
          </figure>
        </p>
      </div>
            <div xml:id="whatsnext">
        <head>What’s Next?</head>
        <p>You have reached the end of this tutorial module covering common structure, elements, and attributes. You can now either</p>
        <list rend="bulleted">
          <item>proceed with <ref target="../modules/">other TEI by Example modules</ref>
                    </item>
          <item>have a look at the <ref target="../examples/TBED01v00.htm">examples section</ref> for the common structure, elements, and attributes module</item>
          <item>take an interactive test. This comes in the form of a set of multiple choice questions, each providing a number of possible answers. Throughout the quiz, your score is recorded and feedback is offered about right <emph>and</emph> wrong choices. Can you score 100%? Test it <ref target="../tests/TBED01v00.htm">here</ref>!</item>
        </list>
      </div>
        </body>
  </text>
  <!-- 
        $Date$
        $Id$  -->
</TEI>