<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title type="main">TEI by Example</title>
        <title type="sub">Module 5: Drama</title>
        <author xml:id="RvdB">Ron Van den Branden</author>
        <editor xml:id="EV">Edward Vanhoutte</editor>
        <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-15" 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-09-29" who="#RvdB">corrected typos</change>
      <change when="2009-06-09" who="#RvdB">authoring</change>
    </revisionDesc>
  </teiHeader>
  <text xml:id="TBED05v00" type="tutorials">
    <body>
            <div xml:id="frontBack">
        <head>Front and Back Matter</head>
        <p>Besides peculiar basic structures in the actual text, drama texts can be preceded or followed by specific structural elements. Consider following fragments preceding and succeeding the play’s body text:</p>
        <table xml:id="table1">
          <row>
            <cell role="label">
                            <gi>front</gi>
                        </cell>
            <cell role="label">
                            <gi>back</gi>
                        </cell>
          </row>
          <row>
            <cell>
              <eg>
                CHARACTERS:
                USER: a computer user
                COMP: a DECPDP-10 computer
                demigods:
                PROG: the computer programmer
                ENGI: an engineer
                helpdesk, narrator
                
                The play is situated in an anonymous computer 
                lab room, at an undetermined time. Technical 
                equipment looks outdated,  though, while 
                suggesting naive technological optimism.
                
                Prologue, spoken by USER:
                'Twas brillig, and the slithy toves
                Did gyre and gimble in the wabe;
                All mimsy were the borogoves,
                And the mome raths outgrabe.
                
                "Beware the Jabberwock, my son!
                The jaws that bite, the claws that catch!
                Beware the Jubjub bird, and shun
                The frumious Bandersnatch!"
              </eg>
            </cell>
            <cell>
              <eg>                                    
                Epilogue, spoken by PROG:
                "And hast thou slain the Jabberwock?
                Come to my arms, my beamish boy!
                O frabjous day! Callooh! Callay!"
                He chortled in his joy.
                
                'Twas brillig, and the slithy toves
                Did gyre and gimble in the wabe;
                All mimsy were the borogoves,
                And the mome raths outgrabe.
                
                Hello World, and Goodbye. Performed for 
                the first time on the Festival for Computing 
                in the Humanities, at Shakespeare's 
                New Globe Theatre, London, 
                on June 21, 2050. Actors: Alfred Brown - PROG, 
                Barry Crowne - ENGI, Douglas Everett - USER.  
              </eg>
            </cell>
          </row>
        </table>
        <floatingText type="challenge">
          <body/>
        </floatingText>
        <div xml:id="castList">
          <head>Cast List</head>
          <p>The front matter of this play starts with an enumeration of all dramatic characters, and a brief explanation of their respective roles in the play. This could be encoded as a basic TEI <gi>list</gi>, with each character and role set as a distinct <gi>item</gi>. However, the <ident type="module">drama</ident> module includes a dedicated <gi>castList</gi> element. Inside <gi>castList</gi>, each named character is to be encoded as a distinct <gi>castItem</gi> element. This description of a cast item can consist of a <gi>role</gi> element, describing the name of the dramatic role; a <gi>roleDesc</gi> element, describing the role of that character; and an <gi>actor</gi> element, naming the actor performing the role:
            <figure xml:id="example13">
              <egXML xmlns="http://www.tei-c.org/ns/Examples" valid="false">
                <castList>
                  <head>CHARACTERS:</head>
                  <castItem>
                    <role>USER</role>
                    <roleDesc>a computer user</roleDesc>
                  </castItem>
                  <castItem>
                    <role>COMP</role>
                    <roleDesc>a DECPDP-10 computer</roleDesc>
                  </castItem>
                  <seg rend="incorrect">demigods:</seg>
                  <castItem>
                    <role>PROG</role>
                    <roleDesc>the computer programmer</roleDesc>
                  </castItem>
                  <castItem>
                    <role>ENGI</role>
                    <roleDesc>an engineer</roleDesc>
                  </castItem>
                  <castItem>
                                        <roleDesc>helpdesk</roleDesc>
                                    </castItem>
                  <castItem>
                                        <roleDesc>narrator</roleDesc> </castItem>
                </castList>
              </egXML>
              <head type="legend">Encoding of a cast list with <gi>castList</gi>.</head>
            </figure>
          </p>
          <p>This example, however, is incorrect. A <gi>castList</gi> element doesn’t allow plain text, as illustrated by the highlighted phrase <q>demigods:</q>. Rather than naming or describing one single character, this functions as a kind of label for the following two character descriptions. This suggests a grouping, which can be accomplished in TEI by wrapping grouped <gi>castItem</gi> elements in a <gi>castGroup</gi> element. The label, then, can be encoded as a <gi>head</gi> for the <gi>castGroup</gi>. The <att>rend</att> attribute can be used to indicate any typographical indication of this grouping. If in our example, the PROG and ENGI character descriptions are grouped using a brace, this can be expressed by the value <val>braced</val> for the <att>rend</att> attribute:
          <figure xml:id="example14">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <castList>
                <head>CHARACTERS:</head>
                <castItem>
                  <role>USER</role>
                  <roleDesc>a computer user</roleDesc>
                </castItem>
                <castItem>
                  <role>COMP</role>
                  <roleDesc>a DECPDP-10 computer</roleDesc>
                </castItem>
                <castGroup rend="braced">
                  <head>demigods:</head>
                  <castItem>
                    <role>PROG</role>
                    <roleDesc>the computer programmer</roleDesc>
                  </castItem>
                  <castItem>
                    <role>ENGI</role>
                    <roleDesc>an engineer</roleDesc>
                  </castItem>
                </castGroup>
                <castItem>
                                        <roleDesc>helpdesk</roleDesc>
                                    </castItem>
                <castItem>
                                        <roleDesc>narrator</roleDesc> </castItem>
              </castList>
            </egXML>
            <head type="legend">Grouping related <gi>castItm</gi> descriptions in <gi>castGroup</gi>.</head>
          </figure>
          </p>
          <p>If we look closely, we can see that the last two character descriptions could be considered a group as well. Yet, they are a mere enumeration of character names (without any grouping label). Minor <soCalled>anonymous</soCalled> roles in a play are often just listed together. Such groups of <soCalled>anonymous</soCalled> roles can be grouped in a single <gi>castItem</gi> element, with a <att>type</att>=<val>list</val> attribute. Notice how these character descriptions only consist of a role description:
            <figure xml:id="example15">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <castList>
                  <head>CHARACTERS:</head>
                  <castItem>
                    <role>USER</role>
                    <roleDesc>a computer user</roleDesc>
                  </castItem>
                  <castItem>
                    <role>COMP</role>
                    <roleDesc>a DECPDP-10 computer</roleDesc>
                  </castItem>
                  <castGroup rend="braced">
                    <head>demigods:</head>
                    <castItem>
                      <role>PROG</role>
                      <roleDesc>the computer programmer</roleDesc>
                    </castItem>
                    <castItem>
                      <role>ENGI</role>
                      <roleDesc>an engineer</roleDesc>
                    </castItem>
                  </castGroup>
                  <castItem type="list">
                                        <roleDesc>helpdesk</roleDesc> <roleDesc>narrator</roleDesc>
                  </castItem>
                </castList>
              </egXML>
              <head type="legend">Grouping <soCalled>anonymous</soCalled> role descriptions in a single <gi>castItem</gi> element.</head>
            </figure>
          </p>
          <p>Notice how the <att>rend</att> attribute on this <gi>castGroup</gi> element is used to indicate that the grouping of cast items is typographically supported by using braces.</p>
          <p>Remember how other elements in the transcription of this drama text referred to the definition of dramatic characters <q>elsewhere in the transcription</q> (see <ptr type="crossref" target="#speech #stageDir"/>)? Well, this is the place! Therefore, we’ll add the identification codes to the respective <gi>role</gi> elements, using the <att>xml:id</att> attribute:
            <figure xml:id="example16">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <castList>
                  <head>CHARACTERS:</head>
                  <castItem>
                    <role xml:id="user">USER</role>
                    <roleDesc>a computer user</roleDesc>
                  </castItem>
                  <castItem>
                    <role xml:id="comp">COMP</role>
                    <roleDesc>a DECPDP-10 computer</roleDesc>
                  </castItem>
                  <castGroup rend="braced">
                    <head>demigods:</head>
                    <castItem>
                      <role xml:id="prog">PROG</role>
                      <roleDesc>the computer programmer</roleDesc>
                    </castItem>
                    <castItem>
                      <role xml:id="engi">ENGI</role>
                      <roleDesc>an engineer</roleDesc>
                    </castItem>
                    <castItem type="list">
                                            <roleDesc>helpdesk</roleDesc>, <roleDesc>narrator</roleDesc>
                                        </castItem>
                  </castGroup>
                </castList>
              </egXML>
              <head type="legend">Formally identifying <gi>role</gi>s in a cast list with <att>xml:id</att>.</head>
            </figure>
          </p>
          <note type="summary">A cast list can be encoded with the <gi>castList</gi> element. It consists of a number of <gi>castItem</gi> elements, providing information on the name of the role (<gi>role</gi>), the description of the dramatic role (<gi>roleDesc</gi>), and/or actors who perform(ed) the role (<gi>actor</gi>). Enumerations of minor characters can be encoded in a single <gi>castItem</gi> element, with a <gi>type</gi> attribute whose value is <val>list</val>. Groups of character descriptions in <gi>castItem</gi> can be wrapped in a <gi>castGroup</gi> element.</note>
        </div>
        <div xml:id="set">
          <head>Description of Setting</head>
          <p>Sometimes, the front matter of a play contains a general description of the setting. This can be encoded with the specific <gi>set</gi> element. As <gi>set</gi> can’t contain plain text, its text should be wrapped in paragraphs (or lines, for that matter). For example:<note>Caution! Whereas a general description of the settings in the <emph>front matter</emph> of a drama text is to be encoded in a <gi>set</gi> element, descriptions of the setting in the <emph>body</emph> of a drama text should be encoded as stage directions with <gi>stage</gi> (see <ptr type="crossref" target="#stageDir"/>).</note>
            <figure xml:id="example17">
              <egXML xmlns="http://www.tei-c.org/ns/Examples">
                <set>
                  <p>The play is situated in an anonymous computer lab room, at an undetermined time. Technical  equipment looks outdated, though, while suggesting naive technological optimism.</p>
                                </set>
              </egXML>
              <head type="legend">Encoding setting descriptions in <gi>set</gi>.</head>
            </figure>
          </p>
          <note type="summary">If the front part of a drama text contains descriptions of the settings in which the action of the play takes place, these should be encoded in <gi>p</gi> elements inside a <gi>set</gi> element.</note>
        </div>
        <div xml:id="prologue">
          <head>Prologue and Epilogue</head>
          <p>A drama text may be preceded and/or concluded by a short speech. Such speeches can be encoded as <gi>prologue</gi> and <gi>epilogue</gi>, respectively. They can be encoded according to their genre-characteristics (most often prose or verse), or according to their rhetoric characteristics (as a speech in <gi>sp</gi>, which is particularly meaningful if the speech contains typical dramatical elements such as stage directions). Here is an example of both approaches:<note>Notice, that the analysis of a speech as prologue or epilogue is sometimes open to interpretation. When such speeches immediately precede or follow the actual drama text, they may as well be regarded as a separate division of the text body. Notice, however, that they should then be encoded inside the existing dramatic structure, or inside a separate textual division (<gi>div</gi>). When considered as part of the actual drama text, they may <emph>not</emph> be encoded as <gi>prologue</gi> or <gi>epilogue</gi>.</note>
          </p>
          <table xml:id="table2">
            <row>
              <cell role="label">
                                <gi>front</gi>
                            </cell>
              <cell role="label">
                                <gi>back</gi>
                            </cell>
            </row>
            <row>
              <cell>
                <figure xml:id="example18">
                  <egXML xmlns="http://www.tei-c.org/ns/Examples">
                    <front>
                      <!-- ... -->
                      <prologue>
                        <head>Prologue, spoken by USER:</head>
                        <lg type="stanza">
                          <l>'Twas brillig, and the slithy toves</l>
                          <l>Did gyre and gimble in the wabe;</l>
                          <l>All mimsy were the borogoves,</l>
                          <l>And the mome raths outgrabe.</l>
                        </lg>
                        <lg type="stanza">
                          <l>"Beware the Jabberwock, my son!</l>
                          <l>The jaws that bite, the claws that catch!</l>
                          <l>Beware the Jubjub bird, and shun</l>
                          <l>The frumious Bandersnatch!"</l>
                        </lg>
                      </prologue>
                      <!-- ... -->
                    </front>
                  </egXML>
                  <head type="legend">Encoding of an introductory speech as <gi>prologue</gi>.</head>
                </figure>
              </cell>
              <cell>
                <figure xml:id="example19">
                  <egXML xmlns="http://www.tei-c.org/ns/Examples"> 
                    <back>
                      <epilogue>
                        <head>Epilogue, spoken by PROG:</head>
                        <sp>
                          <lg type="stanza">                                                    
                            <l>"And hast thou slain the Jabberwock?</l>
                            <l>Come to my arms, my beamish boy!</l>
                            <l>O frabjous day! Callooh! Callay!"</l>
                            <l>He chortled in his joy.</l>
                          </lg>
                          <lg type="stanza">
                            <l>'Twas brillig, and the slithy toves</l>
                            <l>Did gyre and gimble in the wabe;</l>
                            <l>All mimsy were the borogoves,</l>
                            <l>And the mome raths outgrabe.</l>
                          </lg>
                        </sp>
                      </epilogue>
                      <!-- ... -->
                    </back>   
                  </egXML>
                  <head type="legend">Encoding of a concluding speech as <gi>prologue</gi>.</head>
                </figure>
              </cell>
            </row>
          </table>
          <note type="summary">Speeches serving as a prologue or epilogue to a play can be encoded with <gi>prologue</gi>, or <gi>epilogue</gi>, respectively.</note>
        </div>
        <div xml:id="performance">
          <head>Performance Description</head>
          <p>The front or back matter of a drama text may include information on how it should be, or has been, performed. Such information should be encoded as structured text in one or more paragraphs. When descriptions of past performances include information on the cast, this can be captured in an embedded <gi>castList</gi> element. The back part of our example happens to feature a performance description:
          <figure xml:id="example20">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <back>
                <performance>
                  <head>Hello World, and Goodbye.</head> 
                  <p>Performed for the first time on the <name type="event">Festival for Computing 
                    in the Humanities</name>, at <name type="place.venue">Shakespeare's 
                      New Globe Theatre</name>, <name type="place.city">London</name>, 
                    on <date when="2050-06-21">June 21, 2050</date>.</p> 
                  <castList>
                    <head>Actors:</head>
                    <castItem>
                                                <actor>Alfred Brown</actor>
                                                <role>PROG</role>
                                            </castItem> 
                    <castItem>
                                                <actor>Barry Crowne</actor>
                                                <role>ENGI</role>
                                            </castItem>
                    <castItem>
                                                <actor>Douglas Everett</actor>
                                                <role>USER</role>
                                            </castItem>
                  </castList>
                </performance>
              </back>
            </egXML>
            <head type="legend">Encoding of information on the performance of a dramatic text in <gi>performance</gi>.</head>
          </figure>
          </p>
          <note type="summary">Information relating to the performance of a drama text, be it descriptions of past performances or general directions for future ones, can be encoded in a <gi>performance</gi> element in the front or back matter of a drama text. Besides a heading and paragraphs, such performance descriptions can contain their own embedded <gi>castList</gi> elements, listing cast for cast lists relating to a particular performance.</note>
        </div>
      </div>
        </body>
  </text>
  <!-- 
        $Date: 2020-07-08 02:33:20 +0200 (Wed, 08 Jul 2020) $
        $Id: TBED05v00.xml 425 2020-07-08 00:33:20Z ron.vandenbranden $  -->
</TEI>