<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title type="main">TEI by Example</title>
        <title type="sub">Module 4: Poetry</title>
        <author xml:id="EV">Edward Vanhoutte</author>
        <editor xml:id="RvdB">Ron Van den Branden</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-16" who="#RvdB">technical revision</change>
      <change when="2010-07-09" who="#RvdB">release</change>
      <change when="2010-07-08" who="#EV">revision and added 2.3. grouping structures and 6.2. dedications</change>
      <change when="2007-10-22" who="#EV">added 6.2 Acrostics</change>
      <change when="2007-10-22" who="#EV">
                <list>
                    <item>-added new prose with internal rhyme under 3.1</item>
                    <item>inserted enjambements under 4.4 and rewrote that section</item>
                    <item>edited summary of 4</item>
                    <item>added summary to 5</item>
                    <item>removed <q>suggestions</q> div</item>
                </list>
            </change>
      <change when="2007-10-11" who="#EV">correction of text</change>
      <change when="2007-10-11" who="#EV">revision</change>
      <change when="2007-09-25" who="#EV">revision</change>
      <change when="2007-05-22" who="#RvdB">revision</change>
    </revisionDesc>
  </teiHeader>
  <text xml:id="TBED04v00" type="tutorials">
    <body>
            <div xml:id="metaphor">
        <head>Metaphorical Language</head>
        <p>Just like any other aspect of the transcription and encoding process, analysing metaphorical language involves interpretation. Unlike the expression of this interpretation in structural markup, the analysis of metaphorical language addresses logical structures that probably will cross structural boundaries. Due to the primary focus of the TEI encoding scheme on representing structural characteristics of texts, and the syntactic requirement that all XML structures should nest properly, this kind of logical analysis will need a kind of workaround. One such workaround defines different analytic categories separately and links them to the relevant passages in the poems. A first requirement is that the smallest addressable structures be identified with an <att>xml:id</att> attribute:<note>
                        <att>xml:id</att> provides a unique identifier for the element bearing the attribute. Its value must start with a letter, or <code>_</code> and may be followed by one or more Named Characters (letter, digit, <code>.</code>, <code>-</code>, <code>_</code>, Unicode Combining Character, or Extender). See the <ref target="http://www.w3.org/TR/REC-xml/#sec-attribute-types">XML Specification</ref> for more guidance on the use of <att>xml:id</att>.</note>
          <figure xml:id="example26">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <lg xml:id="p001" type="poem">
                <lg xml:id="s001" type="stanza">
                  <l xml:id="l001">Poppadom</l>
                  <l xml:id="l002">Oatmeal</l>
                  <l xml:id="l003">Bubble gum</l>
                  <l xml:id="l004">Cut of veal</l>
                </lg>
                <lg xml:id="s002" type="stanza">
                  <l xml:id="l005">Mince for pie</l>
                  <l xml:id="l006">Frozen peas</l>
                  <l xml:id="l007">Video for Guy</l>
                  <l xml:id="l008">Selection of teas</l>
                </lg>
                <lg xml:id="s003" type="stanza">
                  <l xml:id="l009">Paper towels/garbage bags</l>
                  <l xml:id="l010">Pasta sauce and Parmesan</l>
                  <l xml:id="l011">Pumpkin seed and olive oil</l>
                </lg>
                <lg xml:id="s004" type="stanza">
                  <l xml:id="l012">Cheesy crisps and favourite mags</l>
                  <l xml:id="l013">Kidney beans (1 large can)</l>
                  <l xml:id="l014">Cling film and kitchen foil</l>
                </lg>
              </lg>
            </egXML>
            <head type="legend">Making structural units addressable via <att>xml:id</att>.</head>
          </figure>
        </p>
        <p>These <att>xml:id</att> values can later be used to identify spans of interpretive categories. Such interpretive spans are encoded as <gi>span</gi>, identifying the structural scope of this interpretation with the <att>from</att> attribute marking its beginning and the <att>to</att> attribute marking its end. Their values are values for an <att>xml:id</att> attribute elsewhere in the document, prefixed with a hash character (<code>#</code>), in order to indicate it as the identifier part of a formal <term>URI</term> reference. Preferably, the <att>resp</att> attribute is used to identify who is responsible for the interpretation.<note>The value of the <att>resp</att> attribute must be a pointer to an element in the document header that is associated with a person asserted as responsible for some aspect of the text’s creation, transcription, editing, or encoding. See chapter <ref target="https://tei-c.org/release/doc/tei-p5-doc/html/CE.html">14 Certainty and Responsibility</ref> of the TEI Guidelines.</note> Related <gi>span</gi> elements can be grouped in a <gi>spanGrp</gi> element. A <att>type</att> attribute can characterise the kind of analysis. In our poem, one way of identifying all images concerned with food and non-food could be:
          <figure xml:id="example27">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <lg xml:id="p001" type="poem">
                <lg xml:id="s001" type="stanza">
                  <l xml:id="l001">Poppadom</l>
                  <l xml:id="l002">Oatmeal</l>
                  <l xml:id="l003">Bubble gum</l>
                  <l xml:id="l004">Cut of veal</l>
                </lg>
                <lg xml:id="s002" type="stanza">
                  <l xml:id="l005">Mince for pie</l>
                  <l xml:id="l006">Frozen peas</l>
                  <l xml:id="l007">Video for Guy</l>
                  <l xml:id="l008">Selection of teas</l>
                </lg>
                <lg xml:id="s003" type="stanza">
                  <l xml:id="l009">Paper towels/garbage bags</l>
                  <l xml:id="l010">Pasta sauce and Parmesan</l>
                  <l xml:id="l011">Pumpkin seed and olive oil</l>
                </lg>
                <lg xml:id="s004" type="stanza">
                  <l xml:id="l012">Cheesy crisps and favourite mags</l>
                  <l xml:id="l013">Kidney beans (1 large can)</l>
                  <l xml:id="l014">Cling film and kitchen foil</l>
                </lg>
              </lg>
              
              <spanGrp resp="#RvdB" type="imagery">
                <span from="#l001" to="#l006">food</span>
                <span from="#l007">non-food</span>
                <span from="#l008">food</span>
                <span from="#l009">non-food</span>
                <span from="#l010" to="#l013">food</span>
                <span from="#l014">non-food</span>
              </spanGrp>
            </egXML>
            <head type="legend">Identifying interpretive spans in a text with <gi>span</gi>.</head>
          </figure>
        </p>
        <p>Notice that the <att>from</att> attribute is mandatory on <gi>span</gi>. The <att>to</att> attribute is optional; when it is missing, the entire structure identified by the <att>from</att> attribute will be taken as the context for the interpretation.</p>
        <p>As will be clear from this example, this system of linking analyses to textual structures is not very economic when discontinuous structures share the same analysis. Another approach for logical analysis works from the opposite angle, by hooking text structures to specific interpretations. In order to do so, interpretive categories should be formally defined somewhere else, either in the same document or externally. This is done inside the <gi>interp</gi> element, bearing a unique <att>xml:id</att> attribute. Related interpretive categories can be grouped inside an <gi>interpGrp</gi> element. Following example could identify the same semantic categories from the previous example:
          <figure xml:id="example28">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <interpGrp resp="#RvdB" type="imagery">
                <interp xml:id="food">food</interp>
                <interp xml:id="non-food">non-food</interp>
              </interpGrp>
            </egXML>
            <head type="legend">Defining interpretive categories in <gi>interp</gi> elements.</head>
          </figure>
        </p>
        <p>Inside the transcription of the poem, reference can be made to these interpretations with an <att>ana</att> attribute. Its value should always point to an identifier, either locally or externally. Suppose these interpretive categories are stored in a separate document named <ident type="file">analysis.xml</ident>. Then the poem could be analysed as follows:        <note>Of course, analyses can be much more complex. The TEI provides a generic mechanism for expressing complex hierarchies of interpretive relationships, called <soCalled>Feature Structures</soCalled>. See chapter <ref target="https://tei-c.org/release/doc/tei-p5-doc/html/FS.html">12 Feature Structures</ref> of the TEI Guidelines for a detailed treatment.</note>
          <figure xml:id="example29">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <lg type="poem">
                <lg ana="analysis.xml#food" type="stanza">
                  <l>Poppadom</l>
                  <l>Oatmeal</l>
                  <l>Bubble gum</l>
                  <l>Cut of veal</l>
                </lg>
                <lg xml:id="s002" type="stanza">
                  <l ana="analysis.xml#food">Mince for pie</l>
                  <l ana="analysis.xml#food">Frozen peas</l>
                  <l ana="analysis.xml#non-food">Video for Guy</l>
                  <l ana="analysis.xml#food">Selection of teas</l>
                </lg>
                <lg xml:id="s003" type="stanza">
                  <l ana="analysis.xml#non-food">Paper towels/garbage bags</l>
                  <l ana="analysis.xml#food">Pasta sauce and Parmesan</l>
                  <l ana="analysis.xml#food">Pumpkin seed and olive oil</l>
                </lg>
                <lg xml:id="s004" type="stanza">
                  <l ana="analysis.xml#food">Cheesy crisps and favourite mags</l>
                  <l ana="analysis.xml#food">Kidney beans (1 large can)</l>
                  <l ana="analysis.xml#non-food">Cling film and kitchen foil</l>
                </lg>
              </lg>
            </egXML>
            <head type="legend">Linking text structures with interpretations with the <att>ana</att> attribute.</head>
          </figure>
        </p>
        <note type="summary">For the study of metaphorical language in poetry, logical structures should be identified and grouped into interpretive categories which can be related to other such categories. These interpretive categories with their logical relationships can be stored inside or outside the XML document containing the analysed text. In the poem, reference can be made to these internally or externally documented analyses.</note>
      </div>
        </body>
  </text>
    <!-- 
        $Date$
        $Id$  -->
</TEI>