<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title type="main">TEI by Example</title>
        <title type="sub">Module 8: Customising TEI, ODD, Roma</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>
        <editor>Edward Vanhoutte</editor>
        <editor>Ron Van den Branden</editor>
        <editor>Melissa Terras</editor>
      </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">proofing corrections</change>
      <change when="2020-06-11" who="#RvdB">revision</change>
      <change when="2020-04-30" who="#RvdB">updated to Pure ODD + RomaJS</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="2008-11-05" who="#RvdB">
        <list>
          <item>updated to TEI P5-1.2.0 + Roma 3.5 (04/11/2008)</item>
          <item>corrected errors + typos</item>
        </list>
      </change>
      <change when="2008-08-21" who="#RvdB">
        <list>
          <item>corrected typos</item>
          <item>elaborated on didactic motivations for some choices in the tutorial</item>
        </list>
      </change>
      <change when="2008-08-19" who="#RvdB">replaced <title level="m">Alice’s Adventures Under Ground</title> example with <title level="m">Alice’s Adventures in Wonderland</title> due to copyright concerns with the images</change>
      <change when="2008-08-01" who="#RvdB">revisions</change>    
      <change when="2008-07-15" who="#RvdB">creation</change>
    </revisionDesc>
  </teiHeader>
  <text xml:id="TBED08v00" type="tutorials">
    <body>
            <div xml:id="terminology">
        <head>Some Terminology</head>
        <p>As we have seen in <ptr type="crossref" target="TBED00v00.xml#teimodules"/>, all TEI elements and their attributes are organised thematically in 21 higher-level modules. If we compare the TEI specification to a library, modules are the library shelves holding the elements and attributes. Each of these modules is documented in full in a dedicated chapter of the TEI Guidelines; for an overview of which chapters correspond to which modules, see section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/ST.html#STMA">1.1 TEI Modules</ref> of the TEI Guidelines. Most TEI modules define attributes and elements. During time, the TEI specification has grown into an ecosystem of hundreds of interrelated elements and attributes. In order to make for easier organisation and maintenance, they have been grouped into <term>classes</term>. Each class is a group of elements and attributes. Therefore, the TEI defines two kinds of classes:
          <list type="gloss">
            <label>Attribute classes</label> 
            <item>A group of attributes that can occur in the same place in a TEI document. The names of attribute classes all start with <code>att.</code>, followed by a name that gives an indication of the group of attributes it contains. For example, the global attributes <att>rend</att>, <att>xml:id</att>, and <att>n</att> (among others) are all defined in the attribute class <ident type="class">att.global</ident>, which name indicates that it defines global attributes, available on all TEI elements.</item>
            <label>Model classes</label> 
            <item>A group of elements that can occur in the same place in a TEI document. The names of model classes all start with <code>model.</code>, followed by a name that gives an indication of the group of elements it contains. For example, <gi>p</gi> and <gi>ab</gi> are being grouped in the model class <ident type="class">model.pLike</ident>, which holds all paragraph-like elements.</item>
          </list>
        </p>
        <p>Classes can refer to other classes, so it becomes possible to develop a fine-grained hierarchy of element and attribute groups that all share some common features, but add their own specific features, depending on the sub-classes they belong to.</p>
        <p>In the organisation of TEI modules, the <ident type="module">tei</ident> module is a bit special, in that it does no more than providing the definitions of the attribute and model classes that are being used in the definitions of elements and attributes in other TEI modules. Besides these classes, the <ident type="module">tei</ident> module defines some other low-level constructs that are being used in the definition of actual elements and attributes: 
          <list type="gloss">
            <label>Macros</label> 
            <item>A kind of <soCalled>shortcut</soCalled>, combining a number of frequently co-occurring model classes into a logical group of elements that can occur in the same hierarchical contexts in a TEI document. The names of macros all start with <code>macro.</code>, followed by a name that gives an indication of the logical organisation of the elements it groups. For example, the macro <ident type="macro">macro.paraContent</ident> groups elements that can occur inside paragraphs and similar elements.</item>
            <label>Datatypes</label> 
            <item>A set of rules for the values of attributes. The names of datatypes all start with <code>teidata.</code>, followed by a name that gives an indication of the datatype. For example, the datatype <ident type="datatype">teidata.count</ident> specifies a rule for attribute values that must be positive integers. When an attribute definition refers to this datatype, its value must be a positive integer.</item>
          </list>
        </p>
        <p>This system of building blocks can then be used to define the core of what the TEI is all about: elements and attributes for marking up information in or about texts. For example: the TEI element <gi>name</gi> defines itself by:
          <list rend="bulleted">
            <item>declaring itself as a member of the <emph>TEI module</emph> <ident type="module">core</ident>. This means that when this module is included in a TEI customisation, the <gi>name</gi> element will be available by default.</item>
            <item>declaring itself as a member of the <emph>attribute classes</emph> <ident type="class">att.global</ident>, <ident type="class">att.personal</ident>, <ident type="class">att.datable</ident>, <ident type="class">att.editLike</ident>, and <ident type="class">att.typed</ident>. This means that <gi>name</gi> will receive the attributes defined in all those classes (at least, those that are included in the TEI customisation).</item>
            <item>declaring itself as a member of the <emph>model class</emph> <ident type="class">model.personPart</ident>. This means that it will be able to occur inside all TEI elements that define the members of this <ident type="class">model.personPart</ident> as its contents.</item>
            <item>declaring its contents as the elements grouped in the <emph>macro</emph> <ident type="macro">macro.phraseSeq</ident>. This means that all elements included in this macro can occur inside <gi>name</gi>.</item>
          </list>
        </p>
        <p>
                    <emph>How</emph> these element and attribute are defined, is explained in this TEI by Example tutorial. It will cover some of the very specific elements that make up the <ident type="module">tagdocs</ident> module that is documented in section <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/TD.html">22: Documentation Elements</ref> of the TEI Guidelines. Yet, instead of a purely theoretical explanation of this rather technical part of the TEI Guidelines, we will illustrate this in a hands-on fashion, building a mini TEI customisation for a small encoding project, with the help of the Roma tool. Let’s dive in!</p>
      </div>
        </body>
  </text>
  <!-- 
      $Date: 2020-11-16 12:33:38 +0100 (Mon, 16 Nov 2020) $
      $Id: TBED08v00.xml 460 2020-11-16 11:33:38Z ron.vandenbranden $  -->
</TEI>