https://github.com/TEIC/TEI
Raw File
Tip revision: 347c64fac3fa1a64ade0d8d1842813d4b8f7acec authored by Hugh Cayless on 12 May 2017, 16:57:59 UTC
Updates.
Tip revision: 347c64f
TD.html

<!DOCTYPE html
  SYSTEM "about:legacy-compat">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><!--THIS FILE IS GENERATED FROM AN XML MASTER. DO NOT EDIT (4)--><title>22 Documentation Elements - The TEI Guidelines</title><meta property="Language" content="en" /><meta property="DC.Title" content="22 Documentation Elements - The TEI Guidelines" /><meta property="DC.Language" content="SCHEME=iso639 en" /><meta property="DC.Creator.Address" content="tei@oucs.ox.ac.uk" /><meta charset="utf-8" /><link href="guidelines.css" rel="stylesheet" type="text/css" /><link href="odd.css" rel="stylesheet" type="text/css" /><link rel="stylesheet" media="print" type="text/css" href="guidelines-print.css" /><script type="text/javascript" src="jquery-1.2.6.min.js"></script><script type="text/javascript" src="columnlist.js"></script><script type="text/javascript" src="popupFootnotes.js"></script><script type="text/javascript">
        $(function() {
         $('ul.attrefs-class').columnizeList({cols:3,width:30,unit:'%'});
         $('ul.attrefs-element').columnizeList({cols:3,width:30,unit:'%'});
         $(".displayRelaxButton").click(function() {
           $(this).parent().find('.RNG_XML').toggle();
           $(this).parent().find('.RNG_Compact').toggle();
         });
         $(".tocTree .showhide").click(function() {
          $(this).find(".tocShow,.tocHide").toggle();
          $(this).parent().find("ul.continuedtoc").toggle();
	  });
        })
    </script><script type="text/javascript"><!--
var displayXML=0;
states=new Array()
states[0]="element-a"
states[1]="element-b"
states[2]="element-c"
states[3]="element-d"
states[4]="element-e"
states[5]="element-f"
states[6]="element-g"
states[7]="element-h"
states[8]="element-i"
states[9]="element-j"
states[10]="element-k"
states[11]="element-l"
states[12]="element-m"
states[13]="element-n"
states[14]="element-o"
states[15]="element-p"
states[16]="element-q"
states[17]="element-r"
states[18]="element-s"
states[19]="element-t"
states[20]="element-u"
states[21]="element-v"
states[22]="element-w"
states[23]="element-x"
states[24]="element-y"
states[25]="element-z"

function startUp() {

}

function hideallExcept(elm) {
for (var i = 0; i < states.length; i++) {
 var layer;
 if (layer = document.getElementById(states[i]) ) {
  if (states[i] != elm) {
    layer.style.display = "none";
  }
  else {
   layer.style.display = "block";
      }
  }
 }
 var mod;
 if ( mod = document.getElementById('byMod') ) {
     mod.style.display = "none";
 }
}

function showall() {
 for (var i = 0; i < states.length; i++) {
   var layer;
   if (layer = document.getElementById(states[i]) ) {
      layer.style.display = "block";
      }
  }
}

function showByMod() {
  hideallExcept('');
  var mod;
  if (mod = document.getElementById('byMod') ) {
     mod.style.display = "block";
     }
}

	--></script></head><body><div id="container"><div id="banner"><img src="Images/banner.jpg" alt="Text Encoding Initiative logo and banner" /></div></div><div class="mainhead"><h1>P5: 
    Guidelines for Electronic Text Encoding and Interchange</h1><p>Version 3.1.1a. Last updated on
	10th May 2017, revision bd8dda3</p></div><div id="onecol" class="main-content"><h2><span class="headingNumber">22 </span>Documentation Elements</h2><div class="div1" id="TD"><div class="miniTOC miniTOC_left"><p><span class="subtochead">Table of contents</span></p><div class="subtoc"><ul class="subtoc"><li class="subtoc"><a class="subtoc" href="TD.html#TDphrase" title="Phrase Level Documentary Elements">22.1 Phrase Level Documentary Elements</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDmodules" title="Modules and Schemas">22.2 Modules and Schemas</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDcrystals" title="Specification Elements">22.3 Specification Elements</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDcrystalsCE" title="Common Elements">22.4 Common Elements</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDTAG" title="Element Specifications">22.5 Element Specifications</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDCLA" title="Class Specifications">22.6 Class Specifications</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDENT" title="Macro Specifications">22.7 Macro Specifications</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDB1" title="Building a TEI Schema">22.8 Building a TEI Schema</a></li><li class="subtoc"><a class="subtoc" href="TD.html#TDformal" title="Module for Documentation Elements">22.9 Module for Documentation Elements</a></li></ul></div><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="CE.html"><span class="headingNumber">21 </span>Certainty, Precision, and Responsibility</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="USE.html"><span class="headingNumber">23 </span>Using the TEI</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><p>This chapter describes a module which may be used for the documentation of the XML elements and element classes which make up any markup scheme, in particular that described by the TEI Guidelines, and also for the automatic generation of schemas or DTDs conforming to that documentation. It should be used also by those wishing to customize or modify these Guidelines in a conformant manner, as further described in chapters <a class="link_ptr" href="USE.html#MD" title="Customization"><span class="headingNumber">23.3 </span>Customization</a> and <a class="link_ptr" href="USE.html#CF" title="Conformance"><span class="headingNumber">23.4 </span>Conformance</a> and may also be useful in the documentation of any other comparable encoding scheme, even though it contains some aspects which are specific to the TEI and may not be generally applicable.</p><p>An overview of the kind of processing environment envisaged for the module described by this chapter may be helpful. In the remainder of this chapter we refer to software which provides such a processing environment as an <span class="term">ODD processor</span>.<span id="Note124_return"><a class="notelink" title="ODD is short for One Document Does it all, and was the name invented by the original TEI Editors for the predecessor of the system currently used for …" href="#Note124"><sup>87</sup></a></span> Like any other piece of XML software, an ODD processor may be instantiated in many ways: the current system uses a number of XSLT stylesheets which are freely available from the TEI, but this specification makes no particular assumptions about the tools which will be used to provide an ODD processing environment.</p><p>As the name suggests, an ODD processor uses a single XML document to generate multiple outputs. These outputs will include: </p><ul class="bulleted"><li class="item">formal reference documentation for elements, attributes, element classes, patterns, etc. such as those provided in <a class="link_ptr" href="REF-ELEMENTS.html" title="Elements"><span class="headingNumber">Appendix C </span>Elements</a> below;</li><li class="item">detailed descriptive documentation, embedding some parts of the formal reference documentation, such as the tag description lists provided in this and other chapters of these Guidelines;</li><li class="item">declarative code for one or more XML schema languages, such as RELAX NG, W3C Schema, ISO Schematron, or DTD.</li></ul><p>The input required to generate these outputs consists of running prose, and special purpose elements documenting the components (elements, classes, etc.) which are to be declared in the chosen schema language. All of this input is encoded in XML using elements defined in this chapter. In order to support more than one schema language, these elements constitute a comparatively high-level model which can then be mapped by an ODD processor to the specific constructs appropriate for the schema language in use. Although some modern schema languages such as RELAX NG or W3C Schema natively support self-documentary features of this kind, we have chosen to retain the ODD model, if only for reasons of compatibility with earlier versions of these Guidelines. For reasons of backwards compatibility, the ISO standard XML schema language RELAX NG (<a class="link_ptr" href="http://www.relaxng.org"><span>http://www.relaxng.org</span></a>) may be used as a means of declaring content models and datatypes, but it is also possible to express content models using natively TEI XML constructs. We also use the ISO Schematron language to define additional constraints beyond those expressed in the content model, as further discussed in <a class="link_ptr" href="TD.html#TDTAGCONS" title="Additional Constraints"><span class="headingNumber">22.5.3 </span>Additional Constraints</a> below.</p><p>In the TEI system, a <span class="term">schema</span> is built by combining element and attribute declarations, more or less as required. Each element is documented by an appropriate <span class="term">specification element</span> and has an identifier unique across the whole TEI scheme. For convenience, these specifications are grouped into a number of discrete <span class="term">modules</span>, which can also be combined more or less as required. Each major chapter of these Guidelines defines a distinct module. Each module declares a number of <span class="term">elements</span> specific to that module, and may also populate particular <span class="term">classes</span>. All classes are available globally, irrespective of the module in which they are declared; particular modules extend the meaning of a class by adding elements or attributes to it. Wherever possible, element content models are defined in terms of classes rather than in terms of specific elements. Modules can also declare particular <span class="term">patterns</span>, which act as short-cuts for commonly used content models or class references.</p><p>In the present chapter, we discuss the components needed to support this system. In addition, section <a class="link_ptr" href="TD.html#TDphrase" title="Phrase Level Documentary Elements"><span class="headingNumber">22.1 </span>Phrase Level Documentary Elements</a> discusses some general purpose elements which may be useful in any kind of technical documentation, wherever there is need to talk about technical features of an XML encoding such as element names and attributes. Section <a class="link_ptr" href="TD.html#TDmodules" title="Modules and Schemas"><span class="headingNumber">22.2 </span>Modules and Schemas</a> discusses the elements which are used to document XML <span class="term">modules</span> and their high-level components. Section <a class="link_ptr" href="TD.html#TDcrystals" title="Specification Elements"><span class="headingNumber">22.3 </span>Specification Elements</a> discusses the elements which document XML elements and their attributes, element classes, and generic patterns or macros. Finally, section <a class="link_ptr" href="TD.html#TDformal" title="Module for Documentation Elements"><span class="headingNumber">22.9 </span>Module for Documentation Elements</a> provides a summary overview of the elements provided by this module.</p><div class="div2" id="TDphrase"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDmodules"><span class="headingNumber">22.2 </span>Modules and Schemas</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDphrase" title="link to this section "><span class="invisible">TEI: Phrase Level Documentary Elements</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.1 </span><span class="head">Phrase Level Documentary Elements</span></h3><div class="div3" id="TDphraseTE"><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDphraseTE" title="link to this section "><span class="invisible">TEI: Phrase Level Terms</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.1.1 </span><span class="head">Phrase Level Terms</span></h4><p>In any kind of technical documentation, the following phrase-level elements may be found useful for marking up strings of text which need to be distinguished from the running text because they come from some formal language: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-code.html">code</a></span> contains literal code from some formal language such as a programming language.<table class="specDesc"><tr><td class="Attribute"><span class="att">lang</span></td><td>(formal language) a name identifying the formal language in which the code is expressed</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-ident.html">ident</a></span> (identifier) contains an identifier or name for an object of some kind in a formal language. <a class="gi" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages.</li></ul><p> Like other phrase-level elements used to indicate the semantics of a typographically distinct string, these are members of the <a class="link_odd" title="groups phrase-level elements which are typographically distinct and to which a specific function can be attributed." href="ref-model.emphLike.html">model.emphLike</a> class. They are available anywhere that running prose is permitted when the module defined by this chapter is included in a schema.</p><div class="p">The <a class="gi" title="contains literal code from some formal language such as a programming language." href="ref-code.html">code</a> and <a class="gi" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> elements are intended for use when citing brief passages in some formal language such as a programming language, as in the following example: <div id="index-egXML-d52e140526" class="pre egXML_valid"><span class="element">&lt;p&gt;</span>If the variable <span class="element">&lt;ident&gt;</span>z<span class="element">&lt;/ident&gt;</span> has a value of zero, a statement such as <span class="element">&lt;code&gt;</span>x=y/z<span class="element">&lt;/code&gt;</span> will<br />   usually cause a fatal error.<span class="element">&lt;/p&gt;</span></div></div><p>If the cited phrase is a mathematical or chemical formula, the more specific <a class="gi" title="contains a mathematical or other formula." href="ref-formula.html">formula</a> element defined by the <span class="ident-module">figures</span> module (<a class="link_ptr" href="FT.html#FTFOR" title="Formulæ and Mathematical Expressions"><span class="headingNumber">14.2 </span>Formulæ and Mathematical Expressions</a>) may be more appropriate.</p><p>A further group of similar phrase-level elements is also defined for the special case of representing parts of an XML document: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-att.html">att</a></span> (attribute) contains the name of an attribute appearing within running text.</li><li><span class="specList-elementSpec"><a href="ref-gi.html">gi</a></span> (element name) contains the name (generic identifier) of an element.</li><li><span class="specList-elementSpec"><a href="ref-tag.html">tag</a></span> contains text of a complete start- or end-tag, possibly including attribute specifications, but excluding the opening and closing markup delimiter characters.</li><li><span class="specList-elementSpec"><a href="ref-val.html">val</a></span> (value) contains a single attribute value.</li></ul><p> These elements constitute the <a class="link_odd" title="groups phrase-level elements used to encode XML constructs such as element names, attribute names, and attribute values" href="ref-model.phrase.xml.html">model.phrase.xml</a> class, which is also a subclass of <a class="link_odd" title="groups elements which can occur at the level of individual words or phrases." href="ref-model.phrase.html">model.phrase</a>. They are also available anywhere that running prose is permitted when the module defined by this chapter is included in a schema.</p><div class="p">As an example of the recommended use of these elements, we quote from an imaginary TEI working paper: <div id="index-egXML-d52e140562" class="pre egXML_valid"><span class="element">&lt;p&gt;</span>The <span class="element">&lt;gi&gt;</span>gi<span class="element">&lt;/gi&gt;</span> element is used to tag element<br />   names when they appear in the text; the <span class="element">&lt;gi&gt;</span>tag<span class="element">&lt;/gi&gt;</span> element however is used to show how a tag as<br />   such might appear. So one might talk of an occurrence of the <span class="element">&lt;gi&gt;</span>blort<span class="element">&lt;/gi&gt;</span> element which had been<br />   tagged <span class="element">&lt;tag&gt;</span>blort type='runcible'<span class="element">&lt;/tag&gt;</span>. The <span class="element">&lt;att&gt;</span>type<span class="element">&lt;/att&gt;</span> attribute may take any name token as<br />   value; the default value is <span class="element">&lt;val&gt;</span>spqr<span class="element">&lt;/val&gt;</span>, in memory of its creator.<span class="element">&lt;/p&gt;</span></div></div><p>Within technical documentation, it is also often necessary to provide more extended examples of usage or to present passages of markup for discussion. The following special elements are provided for these purposes: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-eg.html">eg</a></span> (example) contains any kind of illustrative example.</li><li><span class="specList-elementSpec"><a href="ref-egXML.html">egXML</a></span> (example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element functions as the root element.</li></ul><p>Like the <a class="gi" title="contains literal code from some formal language such as a programming language." href="ref-code.html">code</a> element, the <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element is used to mark strings of formal code, or passages of XML markup. The <a class="gi" title="(example) contains any kind of illustrative example." href="ref-eg.html">eg</a> element may be used to enclose any kind of example, which will typically be rendered as a distinct block, possibly using particular formatting conventions, when the document is processed. It is a specialized form of the more general <a class="gi" title="(quoted) contains material which is distinguished from the surrounding text using quotation marks or a similar method, for any one of a variety of reasons including, but not limited to: direct speech or thought, technical terms or jargon, authorial distance, quotations from elsewhere, and passages that are mentioned but not used." href="ref-q.html">q</a> element provided by the TEI core module. In documents containing examples of XML markup, the <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element should be used for preference, as further discussed below in <a class="link_ptr" href="TD.html#TDeg" title="Exemplification of Components"><span class="headingNumber">22.4.2 </span>Exemplification of Components</a>, since the content of this element can be checked for well-formedness.</p><p>These elements are added to the class <a class="link_odd" title="groups elements containing examples or illustrations." href="ref-model.egLike.html">model.egLike</a> when this module is included in a schema. That class is a part of the general <a class="link_odd" title="groups elements which can appear either within or between paragraph-like elements." href="ref-model.inter.html">model.inter</a> class, thus permitting <a class="gi" title="(example) contains any kind of illustrative example." href="ref-eg.html">eg</a> or <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> elements to appear either within or between paragraph-like elements.</p></div><div class="div3" id="TDphraseEA"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDphraseTE"><span class="headingNumber">22.1.1 </span>Phrase Level Terms</a></li><li class="subtoc"></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDphraseEA" title="link to this section "><span class="invisible">TEI: Element and Attribute Descriptions</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.1.2 </span><span class="head">Element and Attribute Descriptions</span></h4><p>Within the body of a document using this module, the following elements may be used to reference parts of the specification elements discussed in section <a class="link_ptr" href="TD.html#TDcrystals" title="Specification Elements"><span class="headingNumber">22.3 </span>Specification Elements</a>, in particular the brief prose descriptions these provide for elements and attributes. </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-specList.html">specList</a></span> (specification list) marks where a list of descriptions is to be inserted into the prose documentation.</li><li><span class="specList-elementSpec"><a href="ref-specDesc.html">specDesc</a></span> (specification description) indicates that a description of the specified element or class should be included at this point within a document.<table class="specDesc"><tr><td class="Attribute"><span class="att">atts</span></td><td>(attributes) supplies attribute names for which descriptions should additionally be obtained.</td></tr></table></li></ul><div class="p">TEI practice recommends that a <a class="gi" title="(specification list) marks where a list of descriptions is to be inserted into the prose documentation." href="ref-specList.html">specList</a> listing the elements under discussion introduce each subsection of a module's documentation. The source for the present section, for example, begins as follows: <div id="index-egXML-d52e140641" class="pre egXML_valid"><span class="element">&lt;div&gt;</span><br /> <span class="element">&lt;head&gt;</span>Element and Attribute Descriptions<span class="element">&lt;/head&gt;</span><br /> <span class="element">&lt;p&gt;</span>Within the body of a document using this module, the following elements… <span class="element">&lt;specList&gt;</span><br />   <span class="element">&lt;specDesc <span class="attribute">key</span>="<span class="attributevalue">specList</span>"/&gt;</span><br />   <span class="element">&lt;specDesc <span class="attribute">key</span>="<span class="attributevalue">specDesc</span>" <span class="attribute">atts</span>="<span class="attributevalue">atts</span>"/&gt;</span><br />  <span class="element">&lt;/specList&gt;</span><span class="element">&lt;/p&gt;</span><br /> <span class="element">&lt;p&gt;</span>TEI practice recommends that a <span class="element">&lt;gi&gt;</span>specList<span class="element">&lt;/gi&gt;</span> listing the elements… <span class="element">&lt;/p&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /><span class="element">&lt;/div&gt;</span></div></div><p>When formatting the <a class="gi" title="(pointer) defines a pointer to another location." href="ref-ptr.html">ptr</a> element in this example, an ODD processor might simply generate the section number and title of the section referred to, perhaps additionally inserting a link to the section. In a similar way, when processing the <a class="gi" title="(specification description) indicates that a description of the specified element or class should be included at this point within a document." href="ref-specDesc.html">specDesc</a> elements, an ODD processor may recover relevant details of the elements being specified (<a class="gi" title="(specification list) marks where a list of descriptions is to be inserted into the prose documentation." href="ref-specList.html">specList</a> and <a class="gi" title="(specification description) indicates that a description of the specified element or class should be included at this point within a document." href="ref-specDesc.html">specDesc</a> in this case) from their associated declaration elements: typically, the details recovered will include a brief description of the element and its attributes. These, and other data, will be stored in a specification element elsewhere within the current document, or they may be supplied by the ODD processor in some other way, for example from a database. For this reason, the link to the required specification element is always made using a TEI-defined key rather than an XML IDREF value. The ODD processor uses this key as a means of accessing the specification element required. There is no requirement that this be performed using the XML ID/IDREF mechanism, but there is an assumption that the identifier be unique.</p><p>A <a class="gi" title="(specification description) indicates that a description of the specified element or class should be included at this point within a document." href="ref-specDesc.html">specDesc</a> generates in the documentation the identifier, and also the contents of the <a class="gi" title="(description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity." href="ref-desc.html">desc</a> child of whatever specification element is indicated by its <span class="att">key</span> attribute, as in the example above. Documentation for any attributes specified by the <span class="att">atts</span> attribute will also be generated as an associated attribute list.</p></div></div><div class="div2" id="TDmodules"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDphrase"><span class="headingNumber">22.1 </span>Phrase Level Documentary Elements</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDcrystals"><span class="headingNumber">22.3 </span>Specification Elements</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDmodules" title="link to this section "><span class="invisible">TEI: Modules and Schemas</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.2 </span><span class="head">Modules and Schemas</span></h3><p>As mentioned above, the primary purpose of this module is to facilitate the documentation and creation of an XML schema derived from the TEI Guidelines. The following elements are provided for this purpose: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-schemaSpec.html">schemaSpec</a></span> (schema specification) generates a TEI-conformant schema and documentation for it.</li><li><span class="specList-elementSpec"><a href="ref-moduleSpec.html">moduleSpec</a></span> (module specification) documents the structure, content, and purpose of a single module, i.e. a named and externally visible group of declarations.</li><li><span class="specList-elementSpec"><a href="ref-moduleRef.html">moduleRef</a></span> (module reference) references a module which is to be incorporated into a schema.<table class="specDesc"><tr><td class="Attribute"><span class="att">include</span></td><td>supplies a list of the elements which are to be copied from the specified module into the schema being defined.</td></tr><tr><td class="Attribute"><span class="att">except</span></td><td>supplies a list of the elements which are not to be copied from the specified module into the schema being defined.</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-specGrp.html">specGrp</a></span> (specification group) contains any convenient grouping of specifications for use within the current module.</li><li><span class="specList-elementSpec"><a href="ref-specGrpRef.html">specGrpRef</a></span> (reference to a specification group) indicates that the declarations contained by the <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a> referenced should be inserted at this point.</li><li><span class="specList-elementSpec"><a href="ref-attRef.html">attRef</a></span> (attribute pointer) points to the definition of an attribute or group of attributes.</li><li><span class="specList-elementSpec"><a href="ref-elementRef.html">elementRef</a></span> points to the specification for some element which is to be included in a schema</li></ul><p>  A <span class="term">module</span> is a convenient way of grouping together element and other declarations, and of associating an externally-visible name with the resulting group. A <span class="term">specification group</span> performs essentially the same function, but the resulting group is not accessible outside the scope of the ODD document in which it is defined, whereas a module can be accessed by name from any TEI schema specification. Elements, and their attributes, element classes, and patterns are all individually documented using further elements described in section <a class="link_ptr" href="TD.html#TDcrystals" title="Specification Elements"><span class="headingNumber">22.3 </span>Specification Elements</a> below; part of that specification includes the name of the module to which the component belongs.</p><div class="p">An ODD processor generating XML DTD or schema fragments from a document marked up according to the recommendations of this chapter will generate such fragments for each <a class="gi" title="(module specification) documents the structure, content, and purpose of a single module, i.e. a named and externally visible group of declarations." href="ref-moduleSpec.html">moduleSpec</a> element found. For example, the chapter documenting the TEI module for names and dates contains a module specification like the following: <div id="index-egXML-d52e141947" class="pre egXML_valid"><span class="element">&lt;moduleSpec <span class="attribute">ident</span>="<span class="attributevalue">namesdates</span>"&gt;</span><br /> <span class="element">&lt;altIdent <span class="attribute">type</span>="<span class="attributevalue">FPI</span>"&gt;</span>Names and Dates<span class="element">&lt;/altIdent&gt;</span><br /> <span class="element">&lt;desc&gt;</span>Additional elements for names and dates<span class="element">&lt;/desc&gt;</span><br /><span class="element">&lt;/moduleSpec&gt;</span></div> together with specifications for all the elements, classes, and patterns which make up that module, expressed using <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a>, <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a>, or <a class="gi" title="(macro specification) documents the function and implementation of a pattern." href="ref-macroSpec.html">macroSpec</a> elements as appropriate. (These elements are discussed in section <a class="link_ptr" href="TD.html#TDcrystals" title="Specification Elements"><span class="headingNumber">22.3 </span>Specification Elements</a> below.) Each of those specifications carries a <span class="att">module</span> attribute, the value of which is <code>namesdates</code>. An ODD processor encountering the <a class="gi" title="(module specification) documents the structure, content, and purpose of a single module, i.e. a named and externally visible group of declarations." href="ref-moduleSpec.html">moduleSpec</a> element above can thus generate a schema fragment for the TEI <span class="ident-module">namesdates</span> module that includes declarations for all the elements (etc.) which reference it.</div><p>In most realistic applications, it will be desirable to combine more than one module together to form a complete <span class="term">schema</span>. A schema consists of references to one or more modules or specification groups, and may also contain explicit declarations or redeclarations of elements (see further <a class="link_ptr" href="TD.html#TDbuild" title="TEI customizations"><span class="headingNumber">22.8.1 </span>TEI customizations</a>). Any combination of modules can be used to create a schema <span id="Note125_return"><a class="notelink" title="The distinction between base and additional tagsets in earlier versions of the TEI scheme has not been carried forward into P5." href="#Note125"><sup>88</sup></a></span></p><p>A schema can combine references to TEI modules with references to other (non-TEI) modules using different namespaces, for example to include mathematical markup expressed using MathML in a TEI document. By default, the effect of combining modules is to allow all of the components declared by the constituent modules to coexist (where this is syntactically possible: where it is not—for example, because of name clashes—a schema cannot be generated). It is also possible to over-ride declarations contained by a module, as further discussed in section <a class="link_ptr" href="TD.html#TDbuild" title="TEI customizations"><span class="headingNumber">22.8.1 </span>TEI customizations</a></p><p>It is often convenient to describe and operate on sets of declarations smaller than the whole, and to document them in a specific order: such collections are called <span class="term">specGrps</span> (specification groups). Individual <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a> elements are identified using the global <span class="att">xml:id</span> attribute, and may then be referenced from any point in an ODD document using the <a class="gi" title="(reference to a specification group) indicates that the declarations contained by the &lt;specGrp&gt; referenced should be inserted at this point." href="ref-specGrpRef.html">specGrpRef</a> element. This is useful if, for example, it is desired to describe particular groups of elements in a specific sequence. Note however that the order in which element declarations appear within the schema code generated from an ODD file element is not in general affected by the order of declarations within a <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a>.</p><div class="p">An ODD processor will generate a piece of schema code corresponding with the declarations contained by a <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a> element in the documentation being output, and a cross-reference to such a piece of schema code when processing a <a class="gi" title="(reference to a specification group) indicates that the declarations contained by the &lt;specGrp&gt; referenced should be inserted at this point." href="ref-specGrpRef.html">specGrpRef</a>. For example, if the input text reads <div id="index-egXML-d52e142016" class="pre egXML_valid"><span class="element">&lt;p&gt;</span>This module contains three red elements: <span class="element">&lt;specGrp <span class="attribute">xml:id</span>="<span class="attributevalue">RED</span>"&gt;</span><br />  <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">beetroot</span>"&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br />  <span class="element">&lt;/elementSpec&gt;</span><br />  <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">east</span>"&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br />  <span class="element">&lt;/elementSpec&gt;</span><br />  <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">rose</span>"&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br />  <span class="element">&lt;/elementSpec&gt;</span><br /> <span class="element">&lt;/specGrp&gt;</span> and two blue ones: <span class="element">&lt;specGrp <span class="attribute">xml:id</span>="<span class="attributevalue">BLUE</span>"&gt;</span><br />  <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">sky</span>"&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br />  <span class="element">&lt;/elementSpec&gt;</span><br />  <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">bayou</span>"&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br />  <span class="element">&lt;/elementSpec&gt;</span><br /> <span class="element">&lt;/specGrp&gt;</span><span class="element">&lt;/p&gt;</span></div> then the output documentation will replace the two <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a> elements above with a representation of the schema code declaring the elements <span class="gi">&lt;beetroot&gt;</span>, <span class="gi">&lt;east&gt;</span>, and <span class="gi">&lt;rose&gt;</span> and that declaring the elements <span class="gi">&lt;sky&gt;</span> and <span class="gi">&lt;bayou&gt;</span> respectively. Similarly, if the input text contains elsewhere a passage such as <div id="index-egXML-d52e142052" class="pre egXML_valid"><span class="element">&lt;div&gt;</span><br /> <span class="element">&lt;head&gt;</span>An overview of the imaginary module<span class="element">&lt;/head&gt;</span><br /> <span class="element">&lt;p&gt;</span>The imaginary module contains declarations for coloured things: <span class="element">&lt;specGrpRef <span class="attribute">target</span>="<span class="attributevalue">#RED</span>"/&gt;</span><br />  <span class="element">&lt;specGrpRef <span class="attribute">target</span>="<span class="attributevalue">#BLUE</span>"/&gt;</span><span class="element">&lt;/p&gt;</span><br /><span class="element">&lt;/div&gt;</span></div> then the <a class="gi" title="(reference to a specification group) indicates that the declarations contained by the &lt;specGrp&gt; referenced should be inserted at this point." href="ref-specGrpRef.html">specGrpRef</a> elements may be replaced by an appropriate piece of reference text such as <span class="q">‘The RED elements were declared in section 4.2 above’</span>, or even by a copy of the relevant declarations. As stated above, the order of declarations within the imaginary module described above will not be affected in any way. Indeed, it is possible that the imaginary module will contain declarations not present in any specification group, or that the specification groups will refer to elements that come from different modules. Specification groups are always local to the document in which they are defined, and cannot be referenced externally (unlike modules).</div></div><div class="div2" id="TDcrystals"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDmodules"><span class="headingNumber">22.2 </span>Modules and Schemas</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDcrystalsCE"><span class="headingNumber">22.4 </span>Common Elements</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDcrystals" title="link to this section "><span class="invisible">TEI: Specification Elements</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.3 </span><span class="head">Specification Elements</span></h3><p>The following elements are used to specify elements, classes, patterns, and datatypes: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-elementSpec.html">elementSpec</a></span> (element specification) documents the structure, content, and purpose of a single element type.</li><li><span class="specList-elementSpec"><a href="ref-classSpec.html">classSpec</a></span> (class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both.<table class="specDesc"><tr><td class="Attribute"><span class="att">generate</span></td><td>indicates which alternation and sequence instantiations of a model class may be referenced. By default, all variations are permitted.</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-macroSpec.html">macroSpec</a></span> (macro specification) documents the function and implementation of a pattern.</li><li><span class="specList-elementSpec"><a href="ref-dataSpec.html">dataSpec</a></span> (datatype specification) documents a datatype.</li></ul><p>Unlike most elements in the TEI scheme, each of these ‘specification elements’ has a fairly rigid internal structure consisting of a large number of child elements which are always presented in the same order. Furthermore, since these elements all describe markup objects in broadly similar ways, they have several child elements in common. In the remainder of this chapter, we discuss first the elements which are common to all the specification elements, and then those which are specific to a particular type.</p><p>Specification elements may appear at any point in an ODD document, both between and within paragraphs as well as inside a <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a> element, but the specification element for any particular component may only appear once (except in the case where a modification is being defined; see further <a class="link_ptr" href="TD.html#TDbuild" title="TEI customizations"><span class="headingNumber">22.8.1 </span>TEI customizations</a>). The order in which they appear will not affect the order in which they are presented within any schema module generated from the document. In documentation mode, however, an ODD processor will output the schema declarations corresponding with a specification element at the point in the text where they are encountered, provided that they are contained by a <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a> element,  as discussed in the previous section. An ODD processor will also associate all declarations found with the nominated module, thus including them within the schema code generated for that module, and it will also generate a full reference description for the object concerned in a catalogue of markup objects. These latter two actions always occur irrespective of whether or not the declaration is included in a <a class="gi" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a>.</p></div><div class="div3" id="TDcrystalsCE"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDcrystals"><span class="headingNumber">22.3 </span>Specification Elements</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDTAG"><span class="headingNumber">22.5 </span>Element Specifications</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDcrystalsCE" title="link to this section "><span class="invisible">TEI: Common Elements</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.4 </span><span class="head">Common Elements</span></h3><p>This section discusses the child elements common to all of the specification elements; some of these are defined in the core module (<a class="link_ptr" href="CO.html#COHQU" title="Terms Glosses Equivalents and Descriptions"><span class="headingNumber">3.3.4 </span>Terms, Glosses, Equivalents, and Descriptions</a>). These child elements are used to specify the naming, description, exemplification, and classification of the specification elements.</p><div class="div4" id="TDcrystalsCEdc"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDeg"><span class="headingNumber">22.4.2 </span>Exemplification of Components</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDcrystalsCEdc" title="link to this section "><span class="invisible">TEI: Description of Components</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.4.1 </span><span class="head">Description of Components</span></h4><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-gloss.html">gloss</a></span> identifies a phrase or word used to provide a gloss or definition for some other word or phrase.</li><li><span class="specList-elementSpec"><a href="ref-desc.html">desc</a></span> (description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity.</li><li><span class="specList-elementSpec"><a href="ref-equiv.html">equiv</a></span> (equivalent) specifies a component which is considered equivalent to the parent element, either by co-reference, or by external link.<table class="specDesc"><tr><td class="Attribute"><span class="att">uri</span></td><td>(uniform resource identifier) references the underlying concept of which the parent is a representation by means of some external identifier</td></tr><tr><td class="Attribute"><span class="att">filter</span></td><td>references an external script which contains a method to transform instances of this element to canonical TEI</td></tr><tr><td class="Attribute"><span class="att">name</span></td><td>a single word which follows the rules defining a legal XML name (see <a class="link_ptr" href="http://www.w3.org/TR/REC-xml/#dt-name"><span>http://www.w3.org/TR/REC-xml/#dt-name</span></a>), naming the underlying concept of which the parent is a representation.</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-altIdent.html">altIdent</a></span> (alternate identifier) supplies the recommended XML name for an element, class, attribute, etc. in some language.</li><li><span class="specList-elementSpec"><a href="ref-listRef.html">listRef</a></span> (list of references) supplies a list of significant references to places where this element is discussed, in the current document or elsewhere.</li><li><span class="specList-elementSpec"><a href="ref-remarks.html">remarks</a></span> contains any commentary or discussion about the usage of an element, attribute, class, or entity not otherwise documented within the containing element.</li></ul><div class="p">The <a class="gi" title="identifies a phrase or word used to provide a gloss or definition for some other word or phrase." href="ref-gloss.html">gloss</a> element may be used to provide a brief explanation for the name of the object if this is not self-explanatory. For example, the specification for the element <a class="gi" title="(anonymous block) contains any arbitrary component-level unit of text, acting as an anonymous container for phrase or inter level elements analogous to, but without the semantic baggage of, a paragraph." href="ref-ab.html">ab</a> used to mark arbitrary blocks of text begins as follows: <div id="index-egXML-d52e143696" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">module</span>="<span class="attributevalue">linking</span>" <span class="attribute">ident</span>="<span class="attributevalue">ab</span>"&gt;</span><br /> <span class="element">&lt;gloss&gt;</span>anonymous block<span class="element">&lt;/gloss&gt;</span><br /><span class="comment">&lt;!--... --&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div> A <a class="gi" title="identifies a phrase or word used to provide a gloss or definition for some other word or phrase." href="ref-gloss.html">gloss</a> may also be supplied for an attribute name or an attribute value in similar circumstances: <div id="index-egXML-d52e143705" class="pre egXML_valid"><span class="element">&lt;valList <span class="attribute">type</span>="<span class="attributevalue">open</span>"&gt;</span><br /> <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">susp</span>"&gt;</span><br />  <span class="element">&lt;gloss&gt;</span>suspension<span class="element">&lt;/gloss&gt;</span><br />  <span class="element">&lt;desc&gt;</span>the abbreviation provides the first letter(s) of the word or phrase, omitting the<br />       remainder.<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;/valItem&gt;</span><br /> <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">contr</span>"&gt;</span><br />  <span class="element">&lt;gloss&gt;</span>contraction<span class="element">&lt;/gloss&gt;</span><br />  <span class="element">&lt;desc&gt;</span>the abbreviation omits some letter(s) in the middle.<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;/valItem&gt;</span><br /><span class="comment">&lt;!--...--&gt;</span><br /><span class="element">&lt;/valList&gt;</span></div></div><p>Note that the <a class="gi" title="identifies a phrase or word used to provide a gloss or definition for some other word or phrase." href="ref-gloss.html">gloss</a> element is needed to explain the significance of the identifier for an item only when this is not apparent, for example because it is abbreviated, as in the above example. It should not be used to provide a full description of the intended meaning (this is the function of the <a class="gi" title="(description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity." href="ref-desc.html">desc</a> element), nor to comment on equivalent values in other schemes (this is the purpose of the <a class="gi" title="(equivalent) specifies a component which is considered equivalent to the parent element, either by co-reference, or by external link." href="ref-equiv.html">equiv</a> element), nor to provide alternative versions of the <span class="att">ident</span> attribute value in other languages (this is the purpose of the <a class="gi" title="(alternate identifier) supplies the recommended XML name for an element, class, attribute, etc. in some language." href="ref-altIdent.html">altIdent</a> element).</p><div class="p">The contents of the <a class="gi" title="(description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity." href="ref-desc.html">desc</a> element provide a brief characterization of the intended function of the object being documented in a form that permits its quotation out of context, as in the following example: <div id="index-egXML-d52e143741" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">module</span>="<span class="attributevalue">core</span>" <span class="attribute">ident</span>="<span class="attributevalue">foreign</span>"&gt;</span><br /><span class="comment">&lt;!--... --&gt;</span><br /> <span class="element">&lt;desc <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"<br />  <span class="attribute">versionDate</span>="<span class="attributevalue">2007-07-21</span>"&gt;</span>identifies a word or phrase as belonging to some<br />     language other than that of the surrounding text. <span class="element">&lt;/desc&gt;</span><br /><span class="comment">&lt;!--... --&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div> By convention, a <a class="gi" title="(description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity." href="ref-desc.html">desc</a> element begins with a verb such as <span class="mentioned">contains</span>, <span class="mentioned">indicates</span>, <span class="mentioned">specifies</span>, etc. and contains a single clause.</div><p>Where specifications are supplied in multiple languages, the elements <a class="gi" title="identifies a phrase or word used to provide a gloss or definition for some other word or phrase." href="ref-gloss.html">gloss</a> and <a class="gi" title="(description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity." href="ref-desc.html">desc</a> may be repeated as often as needed. Each such description or gloss should carry both an <span class="att">xml:lang</span> and a <span class="att">versionDate</span> attribute to indicate the language used and the date on which the translated text was last checked against its source.</p><div class="p">The <a class="gi" title="(equivalent) specifies a component which is considered equivalent to the parent element, either by co-reference, or by external link." href="ref-equiv.html">equiv</a> element is used to document equivalencies between the concept represented by this object and the same concept as described in other schemes or ontologies. The <span class="att">uri</span> attribute is used to supply a pointer to some location where such external concepts are defined. For example, to indicate that the TEI <a class="gi" title="contains information about a person's death, such as its date and place." href="ref-death.html">death</a> element corresponds to the concept defined by the CIDOC CRM category E69, the declaration for the former might begin as follows: <div id="index-egXML-d52e143786" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">module</span>="<span class="attributevalue">namesdates</span>"<br /> <span class="attribute">ident</span>="<span class="attributevalue">death</span>"&gt;</span><br /> <span class="element">&lt;equiv <span class="attribute">name</span>="<span class="attributevalue">E69</span>"<br />  <span class="attribute">uri</span>="<span class="attributevalue">http://cidoc.ics.forth.gr/</span>"/&gt;</span><br /> <span class="element">&lt;desc&gt;</span><br /><span class="comment">&lt;!--... --&gt;</span><br /> <span class="element">&lt;/desc&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><div class="p">The <a class="gi" title="(equivalent) specifies a component which is considered equivalent to the parent element, either by co-reference, or by external link." href="ref-equiv.html">equiv</a> element may also be used to map newly-defined elements onto existing constructs in the TEI, using the <span class="att">filter</span> and <span class="att">name</span> attributes to point to an implementation of the mapping. This is useful when a TEI customization (see <a class="link_ptr" href="USE.html#MD" title="Customization"><span class="headingNumber">23.3 </span>Customization</a>) defines ‘shortcuts’ for convenience of data entry or markup readability. For example, suppose that in some TEI customization an element <span class="gi">&lt;bo&gt;</span> has been defined which is conceptually equivalent to the standard markup construct <span class="tag">&lt;hi rend='bold'&gt;</span>. The following declarations would additionally indicate that instances of the <span class="gi">&lt;bo&gt;</span> element can be converted to canonical TEI by obtaining a filter from the URI specified, and running the procedure with the name <span class="ident">bold</span>. The <span class="att">mimeType</span> attribute specifies the language (in this case XSL) in which the filter is written: <div id="index-egXML-d52e143824" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">bo</span>"<br /> <span class="attribute">ns</span>="<span class="attributevalue">http://www.example.com/ns/nonTEI</span>"&gt;</span><br /> <span class="element">&lt;equiv <span class="attribute">filter</span>="<span class="attributevalue">http://www.example.com/equiv-filter.xsl</span>"<br />  <span class="attribute">mimeType</span>="<span class="attributevalue">text/xsl</span>" <span class="attribute">name</span>="<span class="attributevalue">bold</span>"/&gt;</span><br /> <span class="element">&lt;gloss&gt;</span>bold<span class="element">&lt;/gloss&gt;</span><br /> <span class="element">&lt;desc&gt;</span>contains a sequence of characters rendered in a bold face.<span class="element">&lt;/desc&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><div class="p">The <a class="gi" title="(alternate identifier) supplies the recommended XML name for an element, class, attribute, etc. in some language." href="ref-altIdent.html">altIdent</a> element is used to provide an alternative name for an object, for example using a different natural language. Thus, the following might be used to indicate that the <a class="gi" title="(abbreviation) contains an abbreviation of any sort." href="ref-abbr.html">abbr</a> element should be identified using the German word <span class="foreign">Abkürzung</span>: <div id="index-egXML-d52e143844" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">abbr</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;altIdent <span class="attribute">xml:lang</span>="<span class="attributevalue">de</span>"&gt;</span>Abkürzung<span class="element">&lt;/altIdent&gt;</span><br /><span class="comment">&lt;!--...--&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div> In the same way, the following specification for the <a class="gi" title="indicates the location of a graphic or illustration, either forming part of a text, or providing an image of it." href="ref-graphic.html">graphic</a> element indicates that the attribute <span class="att">url</span> may also be referred to using the alternate identifier <span class="ident">href</span>: <div id="index-egXML-d52e143860" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">graphic</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;attList&gt;</span><br />  <span class="element">&lt;attDef <span class="attribute">mode</span>="<span class="attributevalue">change</span>" <span class="attribute">ident</span>="<span class="attributevalue">url</span>"&gt;</span><br />   <span class="element">&lt;altIdent&gt;</span>href<span class="element">&lt;/altIdent&gt;</span><br />  <span class="element">&lt;/attDef&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /> <span class="element">&lt;/attList&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><p>By default, the <a class="gi" title="(alternate identifier) supplies the recommended XML name for an element, class, attribute, etc. in some language." href="ref-altIdent.html">altIdent</a> of a component is identical to the value of its <span class="att">ident</span> attribute.</p><div class="p">The <a class="gi" title="contains any commentary or discussion about the usage of an element, attribute, class, or entity not otherwise documented within the containing element." href="ref-remarks.html">remarks</a> element contains any additional commentary about how the item concerned may be used, details of implementation-related issues, suggestions for other ways of treating related information etc., as in the following example: <div id="index-egXML-d52e143881" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">module</span>="<span class="attributevalue">core</span>" <span class="attribute">ident</span>="<span class="attributevalue">foreign</span>"&gt;</span><br /><span class="comment">&lt;!--... --&gt;</span><br /> <span class="element">&lt;remarks&gt;</span><br />  <span class="element">&lt;p&gt;</span>This element is intended for use only where no other element is available to mark the phrase<br />       or words concerned. The global <span class="element">&lt;att&gt;</span>xml:lang<span class="element">&lt;/att&gt;</span> attribute should be used in preference to<br />       this element where it is intended to mark the language of the whole of some text element.<span class="element">&lt;/p&gt;</span><br />  <span class="element">&lt;p&gt;</span>The <span class="element">&lt;gi&gt;</span>distinct<span class="element">&lt;/gi&gt;</span> element may be used to identify phrases belonging to sublanguages or<br />       registers not generally regarded as true languages.<span class="element">&lt;/p&gt;</span><br /> <span class="element">&lt;/remarks&gt;</span><br /><span class="comment">&lt;!--... --&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><div class="p">A specification element will usually conclude with a list of references, each tagged using the standard <a class="gi" title="(pointer) defines a pointer to another location." href="ref-ptr.html">ptr</a> element, and grouped together into a <a class="gi" title="(list of references) supplies a list of significant references to places where this element is discussed, in the current document or elsewhere." href="ref-listRef.html">listRef</a> element: in the case of the <a class="gi" title="identifies a word or phrase as belonging to some language other than that of the surrounding text." href="ref-foreign.html">foreign</a> element discussed above, the list is as follows: <div id="index-egXML-d52e143909" class="pre egXML_valid"><span class="element">&lt;listRef&gt;</span><br /> <span class="element">&lt;ptr <span class="attribute">target</span>="<span class="attributevalue">#COHQHF</span>"/&gt;</span><br /><span class="element">&lt;/listRef&gt;</span></div> where the value <span class="val">COHQF</span> is the identifier of the section in these Guidelines where this element is fully documented.</div></div><div class="div4" id="TDeg"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDcrystalsCEdc"><span class="headingNumber">22.4.1 </span>Description of Components</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDcrystalsCEcl"><span class="headingNumber">22.4.3 </span>Classification of Components</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDeg" title="link to this section "><span class="invisible">TEI: Exemplification of Components</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.4.2 </span><span class="head">Exemplification of Components</span></h4><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-exemplum.html">exemplum</a></span> groups an example demonstrating the use of an element along with optional paragraphs of commentary.</li><li><span class="specList-elementSpec"><a href="ref-eg.html">eg</a></span> (example) contains any kind of illustrative example.</li><li><span class="specList-elementSpec"><a href="ref-egXML.html">egXML</a></span> (example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element functions as the root element.<table class="specDesc"><tr><td class="Attribute"><span class="att">valid</span></td><td>indicates the intended validity of the example with respect to a schema.</td></tr><tr><td class="Attribute"><span class="att">source [att.global.source]</span></td><td>specifies the source from which some aspect of this element is drawn.</td></tr></table></li></ul><p>The <a class="gi" title="groups an example demonstrating the use of an element along with optional paragraphs of commentary." href="ref-exemplum.html">exemplum</a> element is used to combine a single illustrative example with an optional paragraph of commentary following or preceding it. The illustrative example itself may be marked up using either the <a class="gi" title="(example) contains any kind of illustrative example." href="ref-eg.html">eg</a> or the <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element.</p><div class="p">The <span class="att">source</span> attribute may be used on either element to indicate the source from which an example is taken, typically by means of a pointer to an entry in an associated bibliography, as in the following example: <div id="index-egXML-d52e143942" class="pre cdata egXML_valid">
  &lt;exemplum versionDate="2008-04-06" xml:lang="fr"&gt;
  &lt;p&gt;L'element &lt;gi&gt;foreign&lt;/gi&gt; s'applique également aux termes considerés étrangers.&lt;/p&gt;
    &lt;egXML xmlns="http://www.tei-c.org/ns/Examples" source="#fr-ex-Queneau_Journ"&gt;
      &lt;p&gt;Pendant ce temps-là, dans le bureau du rez- de-chaussée, les secrétaires faisaient du
        &lt;foreign xml:lang="en"&gt;hulla-hoop&lt;/foreign&gt;.&lt;/p&gt;
    &lt;/egXML&gt;
  &lt;/exemplum&gt;
</div></div><p>When, as here, an example contains valid XML markup, the <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element should be used. In such a case, it will clearly be necessary to distinguish the markup within the example from the markup of the document itself. In an XML environment, this is easily done by using a different name space for the content of the <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element. For example: </p><pre class="pre_eg cdata">&lt;p&gt;The &lt;gi&gt;term&lt;/gi&gt; element may be used 
to mark any technical term, thus:
&lt;egXML xmlns="http://www.tei-c.org/ns/Examples"&gt;
  This &lt;term&gt;recursion&lt;/term&gt; is 
  giving me a headache.&lt;/egXML&gt;&lt;/p&gt;
</pre><p>Alternatively, the XML tagging within an example may be ‘escaped’, either by using entity references to represent the opening angle bracket, or by wrapping the whole example in a CDATA marked section: </p><pre class="pre_eg cdata">&lt;p&gt;The &lt;gi&gt;term&lt;/gi&gt; element may be used 
to mark any technical term, thus:
&lt;egXML xmlns="http://www.tei-c.org/ns/Examples"&gt;
  This &amp;lt;term&amp;gt;recursion&amp;lt;/term&amp;gt; is 
  giving me a headache.&lt;/egXML&gt;&lt;/p&gt;
</pre><p> or, equivalently: </p><pre class="pre_eg cdata">&lt;p&gt;The &lt;gi&gt;term&lt;/gi&gt; element may be used 
to mark any technical term, thus:
&lt;egXML xmlns="http://www.tei-c.org/ns/Examples"&gt;&lt;![CDATA[
  This &lt;term&gt;recursion&lt;/term&gt; is 
  giving me a headache.]]&gt;&lt;/egXML&gt;&lt;/p&gt;
</pre><p> However, escaping the markup in this way will make it impossible to validate, and should therefore generally be avoided.</p><p>If the XML contained in an example is not well-formed then it must either be enclosed in a CDATA marked section, or ‘escaped’ as above: this applies whether the <a class="gi" title="(example) contains any kind of illustrative example." href="ref-eg.html">eg</a> or <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> is used. The <span class="att">valid</span> attribute on <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> may be used to indicate the XML validity of the example with respect to some schema, as being valid, invalid, or feasibly valid.</p><p>The <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> element should not be used to tag non-XML examples: the general purpose <a class="gi" title="(example) contains any kind of illustrative example." href="ref-eg.html">eg</a> or <a class="gi" title="(quoted) contains material which is distinguished from the surrounding text using quotation marks or a similar method, for any one of a variety of reasons including, but not limited to: direct speech or thought, technical terms or jargon, authorial distance, quotations from elsewhere, and passages that are mentioned but not used." href="ref-q.html">q</a> elements should be used for such purposes.</p></div><div class="div4" id="TDcrystalsCEcl"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDeg"><span class="headingNumber">22.4.2 </span>Exemplification of Components</a></li><li class="subtoc"></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDcrystalsCEcl" title="link to this section "><span class="invisible">TEI: Classification of Components</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.4.3 </span><span class="head">Classification of Components</span></h4><p>In the TEI scheme elements are assigned to one or more <span class="term">classes</span>, which may themselves have subclasses. The following elements are used to indicate class membership: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-classes.html">classes</a></span> specifies all the classes of which the documented element or class is a member or subclass.</li><li><span class="specList-elementSpec"><a href="ref-memberOf.html">memberOf</a></span> specifies class membership of the documented element or class.<table class="specDesc"><tr><td class="Attribute"><span class="att">key</span></td><td>specifies the identifier for a class of which the documented element or class is a member or subclass</td></tr></table></li></ul><p>The <a class="gi" title="specifies all the classes of which the documented element or class is a member or subclass." href="ref-classes.html">classes</a> element appears within either the <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> or <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> element. It specifies the classes of which the element or class concerned is a member by means of one or more <a class="gi" title="specifies class membership of the documented element or class." href="ref-memberOf.html">memberOf</a> child elements. Each such element references a class by means of its <span class="att">key</span> attribute. Classes themselves are defined by the <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> element described in section <a class="link_ptr" href="TD.html#TDCLA" title="Class Specifications"><span class="headingNumber">22.6 </span>Class Specifications</a> below.</p><div class="p">For example, to show that the element <a class="gi" title="(element name) contains the name (generic identifier) of an element." href="ref-gi.html">gi</a> is a member of the class <a class="link_odd" title="groups phrase-level elements used to encode XML constructs such as element names, attribute names, and attribute values" href="ref-model.phrase.xml.html">model.phrase.xml</a>, the <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> which documents this element contains the following <a class="gi" title="specifies all the classes of which the documented element or class is a member or subclass." href="ref-classes.html">classes</a> element: <div id="index-egXML-d52e144046" class="pre egXML_valid"><span class="element">&lt;classes&gt;</span><br /> <span class="element">&lt;memberOf <span class="attribute">key</span>="<span class="attributevalue">model.phrase.xml</span>"/&gt;</span><br /><span class="element">&lt;/classes&gt;</span></div></div></div></div><div class="div3" id="TDTAG"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDcrystalsCE"><span class="headingNumber">22.4 </span>Common Elements</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDCLA"><span class="headingNumber">22.6 </span>Class Specifications</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDTAG" title="link to this section "><span class="invisible">TEI: Element Specifications</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5 </span><span class="head">Element Specifications</span></h3><p>The <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> element is used to document an element type, together with its associated attributes. In addition to the elements listed above, it may contain the following subcomponents: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-content.html">content</a></span> (content model) contains the text of a declaration for the schema documented.<table class="specDesc"><tr><td class="Attribute"><span class="att">autoPrefix</span></td><td>controls whether or not pattern names generated in the corresponding RELAX NG schema source are automatically prefixed to avoid potential nameclashes.</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-constraintSpec.html">constraintSpec</a></span> (constraint on schema) contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model<table class="specDesc"><tr><td class="Attribute"><span class="att">scheme</span></td><td>supplies the name of the language in which the constraints are defined
Suggested values include: 1] schematron(ISO Schematron) ; 2] isoschematron(ISO Schematron) </td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-attList.html">attList</a></span> contains documentation for all the attributes associated with this element, as a series of <a class="gi" title="(attribute definition) contains the definition of a single attribute." href="ref-attDef.html">attDef</a> elements.<table class="specDesc"><tr><td class="Attribute"><span class="att">org</span></td><td>(organization) specifies whether all the attributes in the list are available (org="group") or only one of them (org="choice")</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-model.html">model</a></span> describes the processing intended for a specified element.<table class="specDesc"><tr><td class="Attribute"><span class="att">behaviour</span></td><td>names the process or function which this processing model uses in order to produce output.
Suggested values include: 1] alternate; 2] anchor; 3] block; 4] body; 5] break; 6] cell; 7] cit; 8] document; 9] figure; 10] glyph; 11] graphic; 12] heading; 13] index; 14] inline; 15] link; 16] list; 17] listItem; 18] metadata; 19] note; 20] omit; 21] paragraph; 22] row; 23] section; 24] table; 25] text; 26] title</td></tr></table></li></ul><p>These subcomponents are discussed in the following sections.</p><div class="teidiv2" id="DEFCON"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDTAGCONT"><span class="headingNumber">22.5.2 </span>RELAX NG Content Models</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#DEFCON" title="link to this section "><span class="invisible">TEI: Defining Content Models</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.1 </span><span class="head">Defining Content Models</span></h4><p>The element <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> may have three different kinds of content. It may express a content model directly using the TEI elements discussed in the remainder of this section. Alternatively, it may use a schema language of some kind, as defined by a pattern called <code>macro.schemaPattern</code>, which is provided by the module defined in this chapter. This is discussed in section <a class="link_ptr" href="TD.html#TDTAGCONT" title="RELAX NG Content Models"><span class="headingNumber">22.5.2 </span>RELAX NG Content Models</a> below. As a third possibility, the legal content for an element may be specified using the <a class="gi" title="(value list) contains one or more &lt;valItem&gt; elements defining possible values." href="ref-valList.html">valList</a> element or <a class="gi" title="identifies the datatype of an attribute value, either by referencing an item in an externally defined datatype library, or by pointing to a TEI-defined data specification" href="ref-dataRef.html">dataRef</a> elements, described in <a class="link_ptr" href="TD.html#TDATT" title="Attribute List Specification"><span class="headingNumber">22.5.4 </span>Attribute List Specification</a> below.</p><p>One or more of the following elements are typically used to define a content model: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-textNode.html">textNode</a></span> indicates the presence of a text node in a content model</li><li><span class="specList-elementSpec"><a href="ref-elementRef.html">elementRef</a></span> points to the specification for some element which is to be included in a schema</li><li><span class="specList-elementSpec"><a href="ref-classRef.html">classRef</a></span> points to the specification for an attribute or model class which is to be included in a schema</li><li><span class="specList-elementSpec"><a href="ref-macroRef.html">macroRef</a></span> points to the specification for some pattern which is to be included in a schema</li><li><span class="specList-elementSpec"><a href="ref-anyElement.html">anyElement</a></span> indicates the presence of any elements in a content model</li><li><span class="specList-elementSpec"><a href="ref-empty.html">empty</a></span> indicates the presence of an empty node within a content model</li></ul><p>In the simplest case, an element may have no content. This may be indicated by supplying an empty <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> element. It may however be considered preferable to indicate this explicitly by supplying a <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> element containing the <a class="gi" title="indicates the presence of an empty node within a content model" href="ref-empty.html">empty</a> element.</p><p>An element may contain nothing but strings of Unicode characters. This is indicated by supplying the element <a class="gi" title="indicates the presence of a text node in a content model" href="ref-textNode.html">textNode</a> within the <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> element. An element containing a sequence of zero or more Unicode characters would match an element with this content model.</p><p>An <a class="gi" title="points to the specification for some element which is to be included in a schema" href="ref-elementRef.html">elementRef</a> provides the name of an element which may appear at a certain point in a content model. A <a class="gi" title="points to the specification for an attribute or model class which is to be included in a schema" href="ref-classRef.html">classRef</a> provides the name of a class, members of which may appear at a certain point in content model. A <a class="gi" title="points to the specification for some pattern which is to be included in a schema" href="ref-macroRef.html">macroRef</a> provides the name of a predefined macro, the expansion of which may be inserted at a certain point in a content model. The <a class="gi" title="indicates the presence of any elements in a content model" href="ref-anyElement.html">anyElement</a> element is used in a few special cases where any element is permitted in a content model.</p><p>These elements are all members of an attribute class which provides attributes that further modify their significance as follows: </p><ul class="specList"><li><span class="specList-classSpec"><a href="ref-att.repeatable.html">att.repeatable</a></span> supplies attributes for the elements which define component parts of a content model.<table class="specDesc"><tr><td class="Attribute"><span class="att">minOccurs</span></td><td>(minimum number of occurences) indicates the smallest number of times this component may occur.</td></tr><tr><td class="Attribute"><span class="att">maxOccurs</span></td><td>(maximum number of occurences) indicates the largest number of times this component may occur.</td></tr></table></li></ul><p>Finally, two wrapper elements are provided to indicate whether the components of a content model form a sequence or an alternation: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-sequence.html">sequence</a></span> sequence of references</li><li><span class="specList-elementSpec"><a href="ref-alternate.html">alternate</a></span> an alternation of references</li></ul><div class="p">Here is a simple example: <div id="index-egXML-d52e144867" class="pre egXML_valid"><span class="element">&lt;content&gt;</span><br /> <span class="element">&lt;alternate <span class="attribute">minOccurs</span>="<span class="attributevalue">0</span>"<br />  <span class="attribute">maxOccurs</span>="<span class="attributevalue">unbounded</span>"&gt;</span><br />  <span class="element">&lt;classRef <span class="attribute">key</span>="<span class="attributevalue">model.gLike</span>"/&gt;</span><br />  <span class="element">&lt;textNode/&gt;</span><br /> <span class="element">&lt;/alternate&gt;</span><br /><span class="element">&lt;/content&gt;</span></div> This is the expansion of the macro <span class="ident-macro">macro.xText</span>, which is defined as containing any number (including zero) of elements from the <a class="link_odd" title="groups elements used to represent individual non-Unicode characters or glyphs." href="ref-model.gLike.html">model.gLike</a> class mixed in with text.</div><div class="p">Here is a more complex example: <div id="index-egXML-d52e144881" class="pre egXML_valid"><span class="element">&lt;content&gt;</span><br /> <span class="element">&lt;sequence&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">fileDesc</span>"/&gt;</span><br />  <span class="element">&lt;classRef <span class="attribute">key</span>="<span class="attributevalue">model.teiHeaderPart</span>"<br />   <span class="attribute">minOccurs</span>="<span class="attributevalue">0</span>" <span class="attribute">maxOccurs</span>="<span class="attributevalue">unbounded</span>" <span class="attribute">expand</span>="<span class="attributevalue">alternate</span>"/&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">revisionDesc</span>"<br />   <span class="attribute">minOccurs</span>="<span class="attributevalue">0</span>"/&gt;</span><br /> <span class="element">&lt;/sequence&gt;</span><br /><span class="element">&lt;/content&gt;</span></div> This is the content model for the <a class="gi" title="(TEI header) supplies descriptive and declarative metadata associated with a digital resource or set of resources." href="ref-teiHeader.html">teiHeader</a> element, which is defined as a sequence of components, firstly a mandatory <a class="gi" title="(file description) contains a full bibliographic description of an electronic file." href="ref-fileDesc.html">fileDesc</a>, followed by any number (including zero) of elements from the <a class="link_odd" title="groups high level elements which may appear more than once in a TEI header." href="ref-model.teiHeaderPart.html">model.teiHeaderPart</a> class, and finally an optional <a class="gi" title="(revision description) summarizes the revision history for a file." href="ref-revisionDesc.html">revisionDesc</a> element.</div></div><div class="teidiv2" id="TDTAGCONT"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#DEFCON"><span class="headingNumber">22.5.1 </span>Defining Content Models</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDTAGCONS"><span class="headingNumber">22.5.3 </span>Additional Constraints</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDTAGCONT" title="link to this section "><span class="invisible">TEI: RELAX NG Content Models</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.2 </span><span class="head">RELAX NG Content Models</span></h4><p>Alternatively, element content models may be defined using RELAX NG patterns, or by expressions in some other schema language, depending on the value of the <code>macro.schemaPattern</code> pattern.</p><div class="p">Here is a very simple example <div id="index-egXML-d52e144910" class="pre egXML_valid"><span class="element">&lt;content&gt;</span><br /> <span class="element">&lt;rng:text/&gt;</span><br /><span class="element">&lt;/content&gt;</span></div> The element within whose specification element this <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> element appears will have a content model which is expressed in RELAX NG as <code>text</code>, using the RELAX NG namespace. This model will be copied unchanged to the output when RELAX NG schemas are being generated. When an XML DTD is being generated, an equivalent declaration (in this case <code>(#PCDATA)</code>) will be output.</div><div class="p">Here is a more complex example: <div id="index-egXML-d52e144925" class="pre egXML_valid"><span class="element">&lt;content&gt;</span><br /> <span class="element">&lt;rng:group&gt;</span><br />  <span class="element">&lt;rng:ref <span class="attribute">name</span>="<span class="attributevalue">fileDesc</span>"/&gt;</span><br />  <span class="element">&lt;rng:zeroOrMore&gt;</span><br />   <span class="element">&lt;rng:ref <span class="attribute">name</span>="<span class="attributevalue">model.teiHeaderPart</span>"/&gt;</span><br />  <span class="element">&lt;/rng:zeroOrMore&gt;</span><br />  <span class="element">&lt;rng:optional&gt;</span><br />   <span class="element">&lt;rng:ref <span class="attribute">name</span>="<span class="attributevalue">revisionDesc</span>"/&gt;</span><br />  <span class="element">&lt;/rng:optional&gt;</span><br /> <span class="element">&lt;/rng:group&gt;</span><br /><span class="element">&lt;/content&gt;</span></div> This is the content model for the <a class="gi" title="(TEI header) supplies descriptive and declarative metadata associated with a digital resource or set of resources." href="ref-teiHeader.html">teiHeader</a> element, expressed in the RELAX NG syntax, which again is copied unchanged to the output during schema generation. The equivalent DTD notation generated from this is <code>(fileDesc, (%model.teiHeaderPart;)*, revisionDesc?)</code>.</div><p>The RELAX NG language does not formally distinguish element names, attribute names, class names, or macro names: all names are patterns which are handled in the same way, as the above example shows. Within the TEI scheme, however, different naming conventions are used to distinguish amongst the objects being named. Unqualified names (<code>fileDesc</code>, <code>revisionDesc</code>) are always element names. Names prefixed with <code>model.</code> or <code>att.</code> (e.g. <a class="link_odd" title="groups high level elements which may appear more than once in a TEI header." href="ref-model.teiHeaderPart.html">model.teiHeaderPart</a> and <a class="link_odd" title="provides attributes which can be used to classify or subclassify elements in any way." href="ref-att.typed.html">att.typed</a>) are always class names. In DTD language, classes are represented by parameter entities (<code>%model.teiHeaderPart;</code> in the above example); see further <a class="link_ptr" href="ST.html" title="3"><span class="headingNumber">1 </span>The TEI Infrastructure</a>.</p><div class="p">The RELAX NG pattern names generated by an ODD processor by default include a special prefix, the default value for which is set using the <span class="att">prefix</span> attribute on <a class="gi" title="(schema specification) generates a TEI-conformant schema and documentation for it." href="ref-schemaSpec.html">schemaSpec</a>.  The purpose of this is to ensure that the pattern name generated is uniquely identified as belonging to a particular schema, and thus avoid name clashes. For example, in a RELAX NG schema combining the TEI element <a class="gi" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> with another element called <a class="gi" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> from some other vocabulary, the former will be defined by a pattern called <code>TEI_ident</code> rather than simply <code>ident</code>. Most of the time, this behaviour is entirely transparent to the user; the one occasion when it is not will be where a content model (expressed using RELAX NG syntax) needs explicitly to reference either the TEI <a class="gi" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> or the other one. In such a situation, the <span class="att">autoPrefix</span> attribute on <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> may be used. For example, suppose that we wish to define a content model for <a class="gi" title="contains a single-word, multi-word, or symbolic designation which is regarded as a technical term." href="ref-term.html">term</a> which permits either a TEI <a class="gi" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> or the <a class="gi" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> defined by some other vocabulary. A suitable content model would be generated from the following <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> element: <div id="index-egXML-d52e145011" class="pre egXML_valid"><span class="element">&lt;content <span class="attribute">autoPrefix</span>="<span class="attributevalue">false</span>"&gt;</span><br /> <span class="element">&lt;rng:choice&gt;</span><br />  <span class="element">&lt;rng:ref <span class="attribute">name</span>="<span class="attributevalue">TEI_ident</span>"/&gt;</span><br />  <span class="element">&lt;rng:ref <span class="attribute">name</span>="<span class="attributevalue">ident</span>"/&gt;</span><br /> <span class="element">&lt;/rng:choice&gt;</span><br /><span class="element">&lt;/content&gt;</span></div></div></div><div class="teidiv2" id="TDTAGCONS"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDTAGCONT"><span class="headingNumber">22.5.2 </span>RELAX NG Content Models</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDATT"><span class="headingNumber">22.5.4 </span>Attribute List Specification</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDTAGCONS" title="link to this section "><span class="invisible">TEI: Additional Constraints</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.3 </span><span class="head">Additional Constraints</span></h4><p>In addition to the <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> element, a set of general <a class="gi" title="(constraint on schema) contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model" href="ref-constraintSpec.html">constraintSpec</a> elements can be used to express rules about the validity of an element. Like some other specification elements, they are identifiable (using the <span class="att">ident</span> attribute) in order that a TEI customization may override, delete or change them individually. Each <a class="gi" title="(constraint on schema) contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model" href="ref-constraintSpec.html">constraintSpec</a> can be expressed in any notation which is found useful; the notation used must be recorded using the <span class="att">scheme</span> attribute.</p><p>Schematron is an ISO standard (<a class="link_ref" href="BIB.html#ISO-19757-3" title="International Organization for StandardizationISO 1975732006 Information technology  Document Schema Definition Languages (DSDL...">ISO/IEC 19757-3:2006</a>) which defines a simple XML vocabulary for an ‘assertion language’, together with a RELAX NG schema to validate it. The Schematron assertion language provides a powerful way of expressing constraints on the content of any XML document in addition to those provided by other schema languages. Such constraints can be embedded within a TEI schema specification using the methods exemplified in this chapter. An ODD processor will typically process any <a class="gi" title="(constraint on schema) contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model" href="ref-constraintSpec.html">constraintSpec</a> elements in a TEI specification whose <span class="att">scheme</span> attribute indicates that they are expressed in Schematron to create an ISO-conformant Schematron schema which may be used to validate document instances.</p><p>The TEI Guidelines include some additional constraints which are expressed using the ISO Schematron language. A conformant TEI document should respect these constraints, although automatic validation of them may not be possible for all processors. A TEI customization may likewise specify additional constraints using this mechanism. Some examples of what is possible using the Schematron language are given below. </p><div class="p">Constraints are generally used to model local rules which may be outside the scope of the target schema language. For example, in earlier versions of these Guidelines several constraints on the usage of the attributes of the TEI element <a class="gi" title="(relationship) describes any kind of relationship or linkage amongst a specified group of places, events, persons, objects or other items." href="ref-relation.html">relation</a> were expressed informally as follows: <span class="q">‘only one of the attributes <span class="att">active</span> and <span class="att">mutual</span> may be supplied; the attribute <span class="att">passive</span> may be supplied only if the attribute <span class="att">active</span> is supplied.’</span>. Few schema language support co-occurence constraints such as the latter. In the current version of the Guidelines, constraint specifications expressed as Schematron rules have been added, as follows: <div id="index-egXML-d52e145073" class="pre egXML_valid"><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">reforkeyorname</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:assert <span class="attribute">test</span>="<span class="attributevalue">@ref or @key or @name</span>"&gt;</span>One of the<br />       attributes 'name', 'ref' or 'key' must be supplied<span class="element">&lt;/s:assert&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span><br /><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">activemutual</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:report <span class="attribute">test</span>="<span class="attributevalue">@active and @mutual</span>"&gt;</span>Only one of the<br />       attributes @active and @mutual may be supplied<span class="element">&lt;/s:report&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span><br /><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">activepassive</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:report <span class="attribute">test</span>="<span class="attributevalue">@passive and not(@active)</span>"&gt;</span>the<br />       attribute 'passive' may be supplied only if the attribute 'active' is supplied<span class="element">&lt;/s:report&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span></div></div><div class="p">The constraints in the preceding example all related to attributes in the empty namespace, and the Schematron rules did not therefore need to define a TEI namespace prefix. The Schematron language <span class="gi">&lt;ns&gt;</span> element should be used to do this when a constraint needs to refer to a TEI element, as in the following example, which models the constraint that a TEI <a class="gi" title="(text division) contains a subdivision of the front, body, or back of a text." href="ref-div.html">div</a> must contain either no subdivisions or at least two of them: <div id="index-egXML-d52e145095" class="pre egXML_valid"><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">subclauses</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:ns <span class="attribute">prefix</span>="<span class="attributevalue">tei</span>"<br />   <span class="attribute">uri</span>="<span class="attributevalue">http://www.tei-c.org/ns/1.0</span>"/&gt;</span><br />  <span class="element">&lt;s:rule <span class="attribute">context</span>="<span class="attributevalue">tei:div</span>"&gt;</span><br />   <span class="element">&lt;s:report <span class="attribute">test</span>="<span class="attributevalue">count( tei:div ) eq 1</span>"&gt;</span>if it contains any subdivisions, a<br />         division must contain at least two of them<span class="element">&lt;/s:report&gt;</span><br />  <span class="element">&lt;/s:rule&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span></div> Schematron rules are also useful where an application needs to enforce rules on attribute values, as in the following examples which check that various types of <a class="gi" title="contains a title for any kind of work." href="ref-title.html">title</a> are provided: <div id="index-egXML-d52e145108" class="pre egXML_valid"><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">introtitle</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:assert <span class="attribute">test</span>="<span class="attributevalue">tei:fileDesc/tei:titleStmt/tei:title[@type='introductory']</span>"&gt;</span> an introductory component<br />       of the title is expected <span class="element">&lt;/s:assert&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span><br /><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">maintitle</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:assert <span class="attribute">test</span>="<span class="attributevalue">tei:fileDesc/tei:titleStmt/tei:title[@type='main']</span>"&gt;</span> a main title must be supplied<br />   <span class="element">&lt;/s:assert&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span></div></div><div class="p">As a further example, Schematron may be used to enforce rules applicable to a TEI document which is going to be rendered into accessible HTML, for example to check that some sort of content is available from which the <span class="att">alt</span> attribute of an HTML <span class="gi">&lt;img&gt;</span> can be created: <div id="index-egXML-d52e145126" class="pre egXML_valid"><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">alt</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:ns <span class="attribute">prefix</span>="<span class="attributevalue">tei</span>"<br />   <span class="attribute">uri</span>="<span class="attributevalue">http://www.tei-c.org/ns/1.0</span>"/&gt;</span><br />  <span class="element">&lt;s:pattern <span class="attribute">id</span>="<span class="attributevalue">altTags</span>"&gt;</span><br />   <span class="element">&lt;s:rule <span class="attribute">context</span>="<span class="attributevalue">tei:figure</span>"&gt;</span><br />    <span class="element">&lt;s:report <span class="attribute">test</span>="<span class="attributevalue">not(tei:figDesc or tei:head)</span>"&gt;</span> You should provide information in a figure from<br />           which we can construct an alt attribute in HTML <span class="element">&lt;/s:report&gt;</span><br />   <span class="element">&lt;/s:rule&gt;</span><br />  <span class="element">&lt;/s:pattern&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span></div> Schematron rules can also be used to enforce other HTML accessibility rules about tables; note here the use of a report and an assertion within one pattern: <div id="index-egXML-d52e145139" class="pre egXML_valid"><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">tables</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span><br />  <span class="element">&lt;s:ns <span class="attribute">prefix</span>="<span class="attributevalue">tei</span>"<br />   <span class="attribute">uri</span>="<span class="attributevalue">http://www.tei-c.org/ns/1.0</span>"/&gt;</span><br />  <span class="element">&lt;s:pattern <span class="attribute">id</span>="<span class="attributevalue">Tables</span>"&gt;</span><br />   <span class="element">&lt;s:rule <span class="attribute">context</span>="<span class="attributevalue">tei:table</span>"&gt;</span><br />    <span class="element">&lt;s:assert <span class="attribute">test</span>="<span class="attributevalue">tei:head</span>"&gt;</span>A &lt;table&gt; should have a caption, using a &lt;head&gt;<br />           element<span class="element">&lt;/s:assert&gt;</span><br />    <span class="element">&lt;s:report <span class="attribute">test</span>="<span class="attributevalue">parent::tei:body</span>"&gt;</span>Do not use tables to lay out the document body<span class="element">&lt;/s:report&gt;</span><br />   <span class="element">&lt;/s:rule&gt;</span><br />  <span class="element">&lt;/s:pattern&gt;</span><br /> <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span></div></div><div class="p">Constraints can be expressed using any convenient language. The following example uses a pattern matching language called SPITBOL to express the requirement that title and author should be different. <div id="index-egXML-d52e145157" class="pre egXML_valid"><span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">local</span>"<br /> <span class="attribute">scheme</span>="<span class="attributevalue">SPITBOL</span>"&gt;</span><br /> <span class="element">&lt;constraint&gt;</span> (output = leq(title,author) "title and author cannot be the same") <span class="element">&lt;/constraint&gt;</span><br /><span class="element">&lt;/constraintSpec&gt;</span></div> Note that the value of <span class="att">scheme</span> is <span class="val">SPITBOL</span>. In order to properly constrain and document the values of <span class="att">scheme</span> used in their customization file, a project may wish to create a customization that (among other things) adds and explains this value for use in validating their customization file. Thus using schemes other than those provided for by the TEI (currently <span class="val">schematron</span> and <span class="val">isoschematron</span>) may require somewhat more effort when creating a customization file. Such private schemes will generally be even more problematic on implementation of the constraints themselves, as it may require siginficant programming work. The TEI only provides this capability for the suggested values.</div></div><div class="div3" id="TDATT"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDTAGCONS"><span class="headingNumber">22.5.3 </span>Additional Constraints</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPM"><span class="headingNumber">22.5.5 </span>Processing Models</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDATT" title="link to this section "><span class="invisible">TEI: Attribute List Specification</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.4 </span><span class="head">Attribute List Specification</span></h4><p>The <a class="gi" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> element is used to document information about a collection of attributes, either within an <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a>, or within a <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a>. An attribute list can be organized either as a group of attribute definitions, all of which are understood to be available, or as a choice of attribute definitions, of which only one is understood to be available. An attribute list may thus contain nested attribute lists.</p><div class="p">The attribute <span class="att">org</span> is used to indicate whether its child <a class="gi" title="(attribute definition) contains the definition of a single attribute." href="ref-attDef.html">attDef</a> elements are all to be made available, or whether only one of them may be used. For example, the attribute list for the element <a class="gi" title="(module reference) references a module which is to be incorporated into a schema." href="ref-moduleRef.html">moduleRef</a> contains a nested attribute list to indicate that either the <span class="att">include</span> or the <span class="att">except</span> attribute may be supplied, but not both: <div id="index-egXML-d52e145210" class="pre egXML_feasible"><span class="element">&lt;attList&gt;</span><br /><span class="comment">&lt;!-- other attribute definitions here --&gt;</span><br /> <span class="element">&lt;attList <span class="attribute">org</span>="<span class="attributevalue">choice</span>"&gt;</span><br />  <span class="element">&lt;attDef <span class="attribute">ident</span>="<span class="attributevalue">include</span>"&gt;</span><br /><span class="comment">&lt;!-- definition for the include attribute --&gt;</span><br />  <span class="element">&lt;/attDef&gt;</span><br />  <span class="element">&lt;attDef <span class="attribute">ident</span>="<span class="attributevalue">except</span>"&gt;</span><br /><span class="comment">&lt;!-- definition for the except attribute --&gt;</span><br />  <span class="element">&lt;/attDef&gt;</span><br /> <span class="element">&lt;/attList&gt;</span><br /><span class="element">&lt;/attList&gt;</span></div></div><p>The <a class="gi" title="(attribute definition) contains the definition of a single attribute." href="ref-attDef.html">attDef</a> element is used to document a single attribute, using an appropriate selection from the common elements already mentioned and the following : </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-attDef.html">attDef</a></span> (attribute definition) contains the definition of a single attribute.<table class="specDesc"><tr><td class="Attribute"><span class="att">usage</span></td><td>specifies the optionality of the attribute.</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-datatype.html">datatype</a></span> specifies the declared value for an attribute, by referring to any datatype defined by the chosen schema language.<table class="specDesc"><tr><td class="Attribute"><span class="att">minOccurs</span></td><td>(minimum number of occurences) indicates the minimum number of times this datatype may occur in the specification of the attribute being defined</td></tr><tr><td class="Attribute"><span class="att">maxOccurs</span></td><td>(maximum number of occurences) indicates the maximum number of times this datatype may occur in the specification of the attribute being defined</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-dataRef.html">dataRef</a></span> identifies the datatype of an attribute value, either by referencing an item in an externally defined datatype library, or by pointing to a TEI-defined data specification</li><li><span class="specList-elementSpec"><a href="ref-defaultVal.html">defaultVal</a></span> (default value) specifies the default declared value for an attribute.</li><li><span class="specList-elementSpec"><a href="ref-valDesc.html">valDesc</a></span> (value description) specifies any semantic or syntactic constraint on the value that an attribute may take, additional to the information carried by the <a class="gi" title="specifies the declared value for an attribute, by referring to any datatype defined by the chosen schema language." href="ref-datatype.html">datatype</a> element.</li><li><span class="specList-elementSpec"><a href="ref-valList.html">valList</a></span> (value list) contains one or more <a class="gi" title="documents a single value in a predefined list of values." href="ref-valItem.html">valItem</a> elements defining possible values.</li><li><span class="specList-elementSpec"><a href="ref-valItem.html">valItem</a></span> documents a single value in a predefined list of values.</li></ul><p>The <a class="gi" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> within an <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> is used to specify only the attributes which are specific to that particular element. Instances of the element may carry other attributes which are declared by the classes of which the element is a member. These extra attributes, which are shared by other elements, or by all elements, are specified by an <a class="gi" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> contained within a <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> element, as described in section <a class="link_ptr" href="TD.html#TDCLA" title="Class Specifications"><span class="headingNumber">22.6 </span>Class Specifications</a> below.</p><div class="div4" id="TD-datatypes"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDATTvs"><span class="headingNumber">22.5.4.2 </span>Value Specification</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TD-datatypes" title="link to this section "><span class="invisible">TEI: Datatypes</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.4.1 </span><span class="head">Datatypes</span></h5><p>The ‘datatype’ (i.e. the kind of value) for an attribute may be specified using the elements <a class="gi" title="specifies the declared value for an attribute, by referring to any datatype defined by the chosen schema language." href="ref-datatype.html">datatype</a> and <a class="gi" title="identifies the datatype of an attribute value, either by referencing an item in an externally defined datatype library, or by pointing to a TEI-defined data specification" href="ref-dataRef.html">dataRef</a>. A datatype may be defined in any of the following three ways: </p><ul><li class="item">by reference to an existing TEI datatype definition; </li><li class="item">by use of its name in the widely used schema datatype library maintained by the W3C as part of the definition of its schema language; </li><li class="item">by referencing its URI within some other datatype library.</li></ul><p>The TEI defines a number of datatypes, each with an identifier beginning <code>teidata.</code>, which are used in preference to the datatypes available natively from a target schema such as RELAX NG or W3C Schema since the facilities provided by different schema languages vary so widely. The TEI datatypes available are described in section <a class="link_ptr" href="ST.html#DTYPES" title="Datatype Specifications"><span class="headingNumber">1.4.2 </span>Datatype Specifications</a> above. Note that each is, of necessity, mapped eventually to an externally defined datatype such as W3C Schema's <span class="ident">text</span> or <span class="ident">name</span>, possibly combined to give more expressivity, or constrained to a particular defined usage.</p><div class="p">It is possible reference W3C schema datatypes directly using <span class="att">name</span>. In this case, the child <a class="gi" title="Restricts the value of the strings used to represent values of a datatype, according to XML Schemas: Part 2: Datatypes." href="ref-dataFacet.html">dataFacet</a> can be used instead of <span class="att">restriction</span> to set W3C schema compliant restrictions on the datatype. This is particularly useful for restrictions that cannot be imposed with a regular expression pattern. <div id="index-egXML-d52e145296" class="pre egXML_valid"><span class="element">&lt;dataRef <span class="attribute">name</span>="<span class="attributevalue">decimal</span>"&gt;</span><br /> <span class="element">&lt;dataFacet <span class="attribute">name</span>="<span class="attributevalue">maxInclusive</span>"<br />  <span class="attribute">value</span>="<span class="attributevalue">360.0</span>"/&gt;</span><br /> <span class="element">&lt;dataFacet <span class="attribute">name</span>="<span class="attributevalue">minInclusive</span>"<br />  <span class="attribute">value</span>="<span class="attributevalue">-360.0</span>"/&gt;</span><br /><span class="element">&lt;/dataRef&gt;</span></div> Note that restrictions are either expressed with <span class="att">restriction</span> or <a class="gi" title="Restricts the value of the strings used to represent values of a datatype, according to XML Schemas: Part 2: Datatypes." href="ref-dataFacet.html">dataFacet</a>, never both.</div><div class="p">Attributes <span class="att">minOccurs</span> and <span class="att">maxOccurs</span> are available for the case where an attribute may take more than one value of the type specified. For example, the <span class="att">target</span> attribute provided by the <a class="link_odd" title="provides a set of attributes used by all elements which point to other elements by means of one or more URI references." href="ref-att.pointing.html">att.pointing</a> class has the following declaration: <div id="index-egXML-d52e145322" class="pre egXML_valid"><span class="element">&lt;attDef <span class="attribute">ident</span>="<span class="attributevalue">target</span>"&gt;</span><br /> <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2010-05-02</span>"<br />  <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>specifies the destination of the reference by<br />     supplying one or more URI References<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;datatype <span class="attribute">minOccurs</span>="<span class="attributevalue">1</span>"<br />  <span class="attribute">maxOccurs</span>="<span class="attributevalue">unbounded</span>"&gt;</span><br />  <span class="element">&lt;dataRef <span class="attribute">key</span>="<span class="attributevalue">teidata.pointer</span>"/&gt;</span><br /> <span class="element">&lt;/datatype&gt;</span><br /><span class="element">&lt;/attDef&gt;</span></div> indicating that the <span class="att">target</span> attribute may take any number of values, each being of the same datatype, namely the TEI data specification <span class="ident">teidata.pointer</span>. As is usual in XML, multiple values for a single attribute are separated by one or more white space characters. Hence, values such as <code>#a #b #c</code> or <code>http://example.org http://www.tei-c.org/index.xml</code> may be supplied. </div></div><div class="div4" id="TDATTvs"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TD-datatypes"><span class="headingNumber">22.5.4.1 </span>Datatypes</a></li><li class="subtoc"></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDATTvs" title="link to this section "><span class="invisible">TEI: Value Specification</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.4.2 </span><span class="head">Value Specification</span></h5><div class="p">The <a class="gi" title="(value description) specifies any semantic or syntactic constraint on the value that an attribute may take, additional to the information carried by the &lt;datatype&gt; element." href="ref-valDesc.html">valDesc</a> element may be used to describe constraints on data content in an informal way: for example <div id="index-egXML-d52e145352" class="pre egXML_valid"><span class="element">&lt;valDesc&gt;</span>must point to another <span class="element">&lt;gi&gt;</span>align<span class="element">&lt;/gi&gt;</span><br />   element logically preceding this one.<span class="element">&lt;/valDesc&gt;</span></div> <div id="index-egXML-d52e145359" class="pre egXML_valid"><span class="element">&lt;valDesc&gt;</span>Values should be Library of Congress<br />   subject headings.<span class="element">&lt;/valDesc&gt;</span></div> <div id="index-egXML-d52e145363" class="pre egXML_valid"><span class="element">&lt;valDesc&gt;</span>A bookseller's surname, taken from the list<br />   in <span class="element">&lt;title&gt;</span>Pollard and Redgrave<span class="element">&lt;/title&gt;</span><span class="element">&lt;/valDesc&gt;</span></div></div><div class="p">Constraints expressed in this way are purely documentary; to enforce them, the <a class="gi" title="(constraint on schema) contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model" href="ref-constraintSpec.html">constraintSpec</a> element described in section <a class="link_ptr" href="TD.html#TDTAGCONS" title="Additional Constraints"><span class="headingNumber">22.5.3 </span>Additional Constraints</a> must be used. For example, to specify that an imaginary attribute <span class="att">ageAtDeath</span> must take positive integer values less than 150, the datatype <span class="ident-datatype">teidata.numeric</span> might be used in combination with a <a class="gi" title="(constraint on schema) contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model" href="ref-constraintSpec.html">constraintSpec</a> such as the following: <div id="index-egXML-d52e145386" class="pre egXML_valid"><span class="element">&lt;attDef <span class="attribute">ident</span>="<span class="attributevalue">age</span>"&gt;</span><br /> <span class="element">&lt;desc&gt;</span>age in years at death<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;datatype&gt;</span><br />  <span class="element">&lt;dataRef <span class="attribute">key</span>="<span class="attributevalue">teidata.numeric</span>"/&gt;</span><br /> <span class="element">&lt;/datatype&gt;</span><br /> <span class="element">&lt;constraintSpec <span class="attribute">ident</span>="<span class="attributevalue">lessThan150</span>"<br />  <span class="attribute">scheme</span>="<span class="attributevalue">isoschematron</span>"&gt;</span><br />  <span class="element">&lt;constraint&gt;</span><br />   <span class="element">&lt;s:assert <span class="attribute">test</span>="<span class="attributevalue">. &lt; 150</span>"&gt;</span> age at death must be<br />         a number less than 150 <span class="element">&lt;/s:assert&gt;</span><br />  <span class="element">&lt;/constraint&gt;</span><br /> <span class="element">&lt;/constraintSpec&gt;</span><br /><span class="element">&lt;/attDef&gt;</span></div></div><div class="p">The elements <a class="gi" title="(alternate identifier) supplies the recommended XML name for an element, class, attribute, etc. in some language." href="ref-altIdent.html">altIdent</a>, <a class="gi" title="(equivalent) specifies a component which is considered equivalent to the parent element, either by co-reference, or by external link." href="ref-equiv.html">equiv</a>, <a class="gi" title="identifies a phrase or word used to provide a gloss or definition for some other word or phrase." href="ref-gloss.html">gloss</a> and <a class="gi" title="(description) contains a brief description of the object documented by its parent element, typically a documentation element or an entity." href="ref-desc.html">desc</a> may all be used in the same way as they are elsewhere to describe fully the meaning of a coded value, as in the following example: <div id="index-egXML-d52e145411" class="pre egXML_valid"><span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">dub</span>"&gt;</span><br /> <span class="element">&lt;altIdent <span class="attribute">xml:lang</span>="<span class="attributevalue">fr</span>"&gt;</span>dou<span class="element">&lt;/altIdent&gt;</span><br /> <span class="element">&lt;equiv <span class="attribute">name</span>="<span class="attributevalue">unknown</span>"/&gt;</span><br /> <span class="element">&lt;gloss&gt;</span>dubious<span class="element">&lt;/gloss&gt;</span><br /> <span class="element">&lt;desc&gt;</span>used when the application of this element is doubtful or uncertain<span class="element">&lt;/desc&gt;</span><br /><span class="element">&lt;/valItem&gt;</span></div></div><div class="p">Where all the possible values for an attribute can be enumerated, the datatype <span class="ident">teidata.enumerated</span> should be used, together with a <a class="gi" title="(value list) contains one or more &lt;valItem&gt; elements defining possible values." href="ref-valList.html">valList</a> element specifying the values and their significance, as in the following example: <div id="index-egXML-d52e145429" class="pre egXML_valid"><span class="element">&lt;valList <span class="attribute">type</span>="<span class="attributevalue">closed</span>"&gt;</span><br /> <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">req</span>"&gt;</span><br />  <span class="element">&lt;gloss&gt;</span>required<span class="element">&lt;/gloss&gt;</span><br /> <span class="element">&lt;/valItem&gt;</span><br /> <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">rec</span>"&gt;</span><br />  <span class="element">&lt;gloss&gt;</span>recommended<span class="element">&lt;/gloss&gt;</span><br /> <span class="element">&lt;/valItem&gt;</span><br /> <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">opt</span>"&gt;</span><br />  <span class="element">&lt;gloss&gt;</span>optional<span class="element">&lt;/gloss&gt;</span><br /> <span class="element">&lt;/valItem&gt;</span><br /><span class="element">&lt;/valList&gt;</span></div> Note the use of the <a class="gi" title="identifies a phrase or word used to provide a gloss or definition for some other word or phrase." href="ref-gloss.html">gloss</a> element here to explain the otherwise less than obvious meaning of the codes used for these values. Since this value list specifies that it is of type <span class="val">closed</span>, only the values enumerated are legal, and an ODD processor will typically enforce these constraints in the schema fragment generated.</div><div class="p">The <a class="gi" title="(value list) contains one or more &lt;valItem&gt; elements defining possible values." href="ref-valList.html">valList</a> element can also be used to provide illustrative examples of the kinds of values expected without listing all of them. In such cases the <span class="att">type</span> attribute will have the value <span class="val">open</span>, as in the following example: <div id="index-egXML-d52e145458" class="pre egXML_valid"><span class="element">&lt;attDef <span class="attribute">ident</span>="<span class="attributevalue">type</span>" <span class="attribute">usage</span>="<span class="attributevalue">opt</span>"&gt;</span><br /> <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2005-01-14</span>"<br />  <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>characterizes the movement, for example as an<br />     entrance or exit.<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2007-12-20</span>"<br />  <span class="attribute">xml:lang</span>="<span class="attributevalue">ko</span>"&gt;</span>예를 들어 입장 또는 퇴장과 같은, 이동의 특성을 기술한다.<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;datatype&gt;</span><br />  <span class="element">&lt;dataRef <span class="attribute">key</span>="<span class="attributevalue">teidata.enumerated</span>"/&gt;</span><br /> <span class="element">&lt;/datatype&gt;</span><br /> <span class="element">&lt;valList <span class="attribute">type</span>="<span class="attributevalue">open</span>"&gt;</span><br />  <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">entrance</span>"&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2007-06-27</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>character is entering the stage.<span class="element">&lt;/desc&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2007-12-20</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">ko</span>"&gt;</span>등장인물이 무대에 등장하고 있다.<span class="element">&lt;/desc&gt;</span><br />  <span class="element">&lt;/valItem&gt;</span><br />  <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">exit</span>"&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2007-06-27</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>character is exiting the stage.<span class="element">&lt;/desc&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2007-12-20</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">ko</span>"&gt;</span>등장인물이 무대에서 퇴장하고 있다.<span class="element">&lt;/desc&gt;</span><br />  <span class="element">&lt;/valItem&gt;</span><br />  <span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">onStage</span>"&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2007-07-04</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>character moves on stage<span class="element">&lt;/desc&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2007-12-20</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">ko</span>"&gt;</span>등장인물이 무대에서 이동한다.<span class="element">&lt;/desc&gt;</span><br />  <span class="element">&lt;/valItem&gt;</span><br /> <span class="element">&lt;/valList&gt;</span><br /><span class="element">&lt;/attDef&gt;</span></div> The datatype will be <span class="ident-datatype">teidata.enumerated</span> in either case.</div><p>The <a class="gi" title="(value list) contains one or more &lt;valItem&gt; elements defining possible values." href="ref-valList.html">valList</a> or <a class="gi" title="identifies the datatype of an attribute value, either by referencing an item in an externally defined datatype library, or by pointing to a TEI-defined data specification" href="ref-dataRef.html">dataRef</a> elements may also be used (as a child of the <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> element) to put constraints on the permitted content of an element, as noted at <a class="link_ptr" href="TD.html#TDTAGCONT" title="RELAX NG Content Models"><span class="headingNumber">22.5.2 </span>RELAX NG Content Models</a>. This use is not however supported by all schema languages, and is therefore not recommended if support for non-RELAX NG systems is a consideration.</p></div></div><div class="teidiv2" id="TDPM"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDATT"><span class="headingNumber">22.5.4 </span>Attribute List Specification</a></li><li class="subtoc"></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDPM" title="link to this section "><span class="invisible">TEI: Processing Models</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5 </span><span class="head">Processing Models</span></h4><p>As far as possible, the TEI defines elements and their attributes in a way which is entirely independent of their subsequent processing, since its intention is to maximize the reusability of encoded documents and their use in multiple contexts. Nevertheless, it can be very useful to specify one or more possible models for such processing, both to clarify the intentions of the encoder, and to provide default behaviours for a software engineer to implement when documents conforming to a particular TEI customization are processed. To that end, the following elements may be used to document one or more <span class="term">processing models</span> for a given element. </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-model.html">model</a></span> describes the processing intended for a specified element.</li><li><span class="specList-elementSpec"><a href="ref-modelGrp.html">modelGrp</a></span> any grouping of <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> or <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> elements with a common output method</li><li><span class="specList-elementSpec"><a href="ref-modelSequence.html">modelSequence</a></span> any sequence of model or <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> elements which is to be processed as a single set of actions</li></ul><p>One or more of these elements may appear directly within an element specification to define the processing anticipated for that element, more specifically how it should be processed to produce the kind of output indicated by the <span class="att">output</span> attribute. Where multiple such elements appear directly within an <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a>, they are understood to document mutually exclusive processing models, possibly for different outputs or applicable in different contexts. Alternatively, the <a class="gi" title="any grouping of &lt;model&gt; or &lt;modelSequence&gt; elements with a common output method" href="ref-modelGrp.html">modelGrp</a> element may be used to group alternative <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> elements intended for a single kind of output. The <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> element is provided for the case where a sequence of models is to be processed, functioning as a single unit.</p><p>A processing model suggests how a given element may be transformed to produce one or more outputs. The model is expressed in terms of <span class="term">behaviours</span> and <span class="term">parameters</span>, using high-level formatting concepts familiar to software engineers and web designers, such as ‘block’ or ‘inline’. As such, it has a different purpose from existing TEI mechanisms for documenting the appearance of source materials, such as the global attributes <span class="att">rend</span>, <span class="att">rendition</span> and <span class="att">style</span>, described in sections <a class="link_ptr" href="HD.html#HD57-1" title="Rendition"><span class="headingNumber">2.3.4.1 </span>Rendition</a> and <a class="link_ptr" href="CO.html#COHQW" title="What Is Highlighting"><span class="headingNumber">3.3.1 </span>What Is Highlighting?</a>. It does not necessarily describe anything present in the original source, nor does it necessarily represent its original structure or semantics. A processing model is a template description, which may be used to simplify the task of producing or customizing the stylesheets needed by a formatting engine or any other form of processor.</p><div class="div3" id="TDPMPM"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMOR"><span class="headingNumber">22.5.5.2 </span>Output Rendition </a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMPM" title="link to this section "><span class="invisible">TEI: The TEI processing model</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.1 </span><span class="head">The TEI processing model</span></h5><p>The <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> element is used to document the processing model intended for a particular element in an abstract manner, independently of its implementation in whatever processing language is chosen. This is achieved by means of the following attributes and elements: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-model.html">model</a></span> describes the processing intended for a specified element.<table class="specDesc"><tr><td class="Attribute"><span class="att">predicate</span></td><td>the condition under which this model applies, given as an XPath predicate expression.</td></tr><tr><td class="Attribute"><span class="att">behaviour</span></td><td>names the process or function which this processing model uses in order to produce output.
Suggested values include: 1] alternate; 2] anchor; 3] block; 4] body; 5] break; 6] cell; 7] cit; 8] document; 9] figure; 10] glyph; 11] graphic; 12] heading; 13] index; 14] inline; 15] link; 16] list; 17] listItem; 18] metadata; 19] note; 20] omit; 21] paragraph; 22] row; 23] section; 24] table; 25] text; 26] title</td></tr><tr><td class="Attribute"><span class="att">output</span></td><td>the intended output.
Sample values include: 1] web; 2] print; 3] plain</td></tr><tr><td class="Attribute"><span class="att">useSourceRendition</span></td><td>whether to obey any rendition attribute which is present.</td></tr><tr><td class="Attribute"><span class="att">cssClass</span></td><td>the name of a CSS class which should be associated with this element</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-outputRendition.html">outputRendition</a></span> describes the rendering or appearance intended for all occurrences of an element in a specified context for a specified type of output.<table class="specDesc"><tr><td class="Attribute"><span class="att">scope</span></td><td>provides a way of defining ‘pseudo-elements’, that is, styling rules applicable to specific sub-portions of an element.
Sample values include: 1] first-line; 2] first-letter; 3] before; 4] after</td></tr></table></li></ul><p> The mandatory <span class="att">behaviour</span> attribute defines in broad terms how an element should be processed, for example as a block or as an inline element. The optional <span class="att">predicate</span> attribute may be used to specify a subset of contexts in which this model should be applicable: for example, an element might be treated as a block element in some contexts, but not in others. The <span class="att">output</span> attribute supplies a name for the output for which this model is intended, for example for screen display, for a printed reading copy, for a scholarly publication, etc. The way in which an element should be rendered is declared independently of its behaviour, using either the attribute <span class="att">useSourceRendition</span> or the element <a class="gi" title="describes the rendering or appearance intended for all occurrences of an element in a specified context for a specified type of output." href="ref-outputRendition.html">outputRendition</a>. These Guidelines recommend that <a class="gi" title="describes the rendering or appearance intended for all occurrences of an element in a specified context for a specified type of output." href="ref-outputRendition.html">outputRendition</a> be expressed using the W3C Cascading Stylesheet Language (CSS), but other possibilities are not excluded. The particular language used may be documented by means of the <a class="gi" title="(style definition language declaration) specifies the name of the formal language in which style or renditional information is supplied elsewhere in the document. The specific version of the scheme may also be supplied." href="ref-styleDefDecl.html">styleDefDecl</a> element described in <a class="link_ptr" href="HD.html#HD57-1a" title="The Default Style Definition Language Declaration"><span class="headingNumber">2.3.5 </span>The Default Style Definition Language Declaration</a>. </p></div><div class="div3" id="TDPMOR"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMPM"><span class="headingNumber">22.5.5.1 </span>The TEI processing model</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMCC"><span class="headingNumber">22.5.5.3 </span>CSS Class</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMOR" title="link to this section "><span class="invisible">TEI: Output Rendition </span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.2 </span><span class="head">Output Rendition </span></h5><div class="p">Here is a simple example of a processing model which might be included in the specification for an element such as <a class="gi" title="(highlighted) marks a word or phrase as graphically distinct from the surrounding text, for reasons concerning which no claim is made." href="ref-hi.html">hi</a> or <a class="gi" title="identifies a word or phrase as belonging to some language other than that of the surrounding text." href="ref-foreign.html">foreign</a>. The intent is that these elements should be presented inline using an italic font. <div id="index-egXML-d52e145608" class="pre egXML_valid"><span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"&gt;</span><br /> <span class="element">&lt;outputRendition&gt;</span>font-style: italic;<span class="element">&lt;/outputRendition&gt;</span><br /><span class="element">&lt;/model&gt;</span></div> If the <a class="gi" title="supplies information about the rendition or appearance of one or more elements in the source text." href="ref-rendition.html">rendition</a> element, or the attributes <span class="att">style</span>, <span class="att">rend</span>, or <span class="att">rendition</span> have already been used in the source document to indicate elements that were originally rendered in italic, and we wish simply to follow this in our processing, then there is no need to include an <a class="gi" title="describes the rendering or appearance intended for all occurrences of an element in a specified context for a specified type of output." href="ref-outputRendition.html">outputRendition</a> element, and the attribute <span class="att">useSourceRendition</span> could be used as follows: <div id="index-egXML-d52e145632" class="pre egXML_valid"><span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"<br /> <span class="attribute">useSourceRendition</span>="<span class="attributevalue">true</span>"/&gt;</span></div> Any rendition information present in the source document will be ignored unless the <span class="att">useSourceRendition</span> attribute has the value <span class="val">true</span>. If that is the case, then such information will be combined with any rendition information supplied by the <a class="gi" title="describes the rendering or appearance intended for all occurrences of an element in a specified context for a specified type of output." href="ref-outputRendition.html">outputRendition</a> element. For example, using CSS, an element which appears in the source as follows <div id="index-egXML-d52e145645" class="pre egXML_valid"><span class="element">&lt;hi <span class="attribute">style</span>="<span class="attributevalue">font-weight:bold;</span>"&gt;</span>this is in bold<span class="element">&lt;/hi&gt;</span></div> would appear in bold and italic if processed by the following model <div id="index-egXML-d52e145649" class="pre egXML_valid"><span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"<br /> <span class="attribute">useSourceRendition</span>="<span class="attributevalue">true</span>"&gt;</span><br /> <span class="element">&lt;outputRendition&gt;</span>font-style: italic;<span class="element">&lt;/outputRendition&gt;</span><br /><span class="element">&lt;/model&gt;</span></div></div></div><div class="div3" id="TDPMCC"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMOR"><span class="headingNumber">22.5.5.2 </span>Output Rendition </a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMMC"><span class="headingNumber">22.5.5.4 </span>Model Contexts and Outputs</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMCC" title="link to this section "><span class="invisible">TEI: CSS Class</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.3 </span><span class="head">CSS Class</span></h5><div class="p">In a typical workflow processing TEI documents for display on the web, a system designer will often wish to use an externally defined CSS stylesheet. The <span class="att">cssClass</span> attribute simplifies the task of maintaining compatibility amongst the possibly many applications using such a stylesheet and also enables a TEI application to specify the names of classes to be used for particular processing models. For example, supposing that the associated CSS stylesheet includes a CSS class called <span class="ident">labeled-list</span>, the following processing model might be used to request it be used for <a class="gi" title="contains any sequence of items organized as a list." href="ref-list.html">list</a> elements containing a child <a class="gi" title="contains any label or heading used to identify part of a text, typically but not exclusively in a list or glossary." href="ref-label.html">label</a> element: <div id="index-egXML-d52e145671" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">list</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">label</span>" <span class="attribute">behaviour</span>="<span class="attributevalue">list</span>"<br />  <span class="attribute">cssClass</span>="<span class="attributevalue">labeled-list</span>"&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><div class="p">In the following example, a table will be formatted using renditional information provided in the source if that is available, or by an external stylesheet, using one of the CSS classes specified, if it is not: <div id="index-egXML-d52e145678" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">mode</span>="<span class="attributevalue">change</span>" <span class="attribute">ident</span>="<span class="attributevalue">table</span>"&gt;</span><br /><span class="comment">&lt;!-- Preserve original rendition for tables which contain @rendition hints --&gt;</span><br /> <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">.//row/@rendition or .//cell/@rendition</span>"<br />  <span class="attribute">behaviour</span>="<span class="attributevalue">table</span>" <span class="attribute">useSourceRendition</span>="<span class="attributevalue">true</span>"/&gt;</span><br /><span class="comment">&lt;!-- Use bootstrap for default table styling --&gt;</span><br /> <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">table</span>"<br />  <span class="attribute">useSourceRendition</span>="<span class="attributevalue">true</span>"<br />  <span class="attribute">cssClass</span>="<span class="attributevalue">table table-hover table-bordered</span>"/&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><p>As discussed further below, the input data available to a processing model is by default the content of the element being processed, together with its child nodes. </p></div><div class="div3" id="TDPMMC"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMCC"><span class="headingNumber">22.5.5.3 </span>CSS Class</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMMB"><span class="headingNumber">22.5.5.5 </span>Behaviours and their parameters</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMMC" title="link to this section "><span class="invisible">TEI: Model Contexts and Outputs</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.4 </span><span class="head">Model Contexts and Outputs</span></h5><div class="p">Sometimes different processing models are required for the same element in different contexts. For example, we may wish to process the <a class="gi" title="(quotation) contains a phrase or passage attributed by the narrator or author to some agency external to the text." href="ref-quote.html">quote</a> element as an inline italic element when it appears inside a <a class="gi" title="(paragraph) marks paragraphs in prose." href="ref-p.html">p</a> element, but as an indented block when it appears elsewhere. To achieve this, we need to change the specification for the <a class="gi" title="(quotation) contains a phrase or passage attributed by the narrator or author to some agency external to the text." href="ref-quote.html">quote</a> element to include two <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> elements as follows: <div id="index-egXML-d52e145707" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">quote</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">ancestor::p</span>"<br />  <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"&gt;</span><br />  <span class="element">&lt;outputRendition&gt;</span>font-style: italic;<span class="element">&lt;/outputRendition&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /> <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">block</span>"&gt;</span><br />  <span class="element">&lt;outputRendition&gt;</span>left-margin: 2em;<span class="element">&lt;/outputRendition&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div> As noted above, these two models are mutually exclusive. The first processing model will be used only for <a class="gi" title="(quotation) contains a phrase or passage attributed by the narrator or author to some agency external to the text." href="ref-quote.html">quote</a> elements which match the XPath expression given as value for the <span class="att">predicate</span> attribute. All other element occurrences will use the second processing model.</div><p>When, as here, multiple behaviours are required for the same element, it will often be the case that the appropriate processing will depend on the context. It may however be the case that the choice of an appropriate model will be made on the basis of the intended output. For example, we might wish to define quite different behaviours when a document is to be displayed on a mobile device and when it is to be displayed on a desktop screen. Different behaviours again might be specified for a print version intended for the general reader, and for a print version aimed at the technical specialist.</p><div class="p">The <a class="gi" title="any grouping of &lt;model&gt; or &lt;modelSequence&gt; elements with a common output method" href="ref-modelGrp.html">modelGrp</a> element can be used to group together all the processing models which have in common a particular intended output, as in the following example: <div id="index-egXML-d52e145730" class="pre egXML_valid"><span class="element">&lt;modelGrp <span class="attribute">output</span>="<span class="attributevalue">mobile</span>"&gt;</span><br /> <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"<br />  <span class="attribute">predicate</span>="<span class="attributevalue">@rend='inline'</span>"&gt;</span><br />  <span class="element">&lt;outputRendition&gt;</span>font-size: 7pt;<span class="element">&lt;/outputRendition&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /> <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">block</span>"<br />  <span class="attribute">predicate</span>="<span class="attributevalue">@rend='block'</span>"&gt;</span><br />  <span class="element">&lt;outputRendition&gt;</span>text-color: red;<span class="element">&lt;/outputRendition&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/modelGrp&gt;</span><br /><span class="element">&lt;modelGrp <span class="attribute">output</span>="<span class="attributevalue">print</span>"&gt;</span><br /> <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"<br />  <span class="attribute">predicate</span>="<span class="attributevalue">@rend='inline'</span>"&gt;</span><br />  <span class="element">&lt;outputRendition&gt;</span>font-size: 12pt;<span class="element">&lt;/outputRendition&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /> <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">block</span>"<br />  <span class="attribute">useSourceRendition</span>="<span class="attributevalue">true</span>" <span class="attribute">predicate</span>="<span class="attributevalue">@rend='block'</span>"&gt;</span><br />  <span class="element">&lt;outputRendition&gt;</span>text-align: center;<span class="element">&lt;/outputRendition&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/modelGrp&gt;</span></div></div></div><div class="div3" id="TDPMMB"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMMC"><span class="headingNumber">22.5.5.4 </span>Model Contexts and Outputs</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMOU"><span class="headingNumber">22.5.5.6 </span>Outputs</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMMB" title="link to this section "><span class="invisible">TEI: Behaviours and their parameters</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.5 </span><span class="head">Behaviours and their parameters</span></h5><p>In the examples above we have used without explanation or definition two simple <span class="term">behaviours</span>: <span class="ident">inline</span> and <span class="ident">block</span>, but many other behaviours are possible. A list of recommended behaviour names forms part of the specification for the element <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a>. A processing model can specify any named behaviour, some of which have additional <span class="term">parameters</span>. The <span class="ident">parameters</span> of a <span class="ident">behaviour</span> resemble the arguments of a function in many programming languages: they provide names which can be used to distinguish particular parts of the input data available to the process used to implement the behaviour in question.</p><p>The following elements are used to represent and to define parameters: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-param.html">param</a></span> provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content.<table class="specDesc"><tr><td class="Attribute"><span class="att">name</span></td><td>a name for the parameter being supplied
Suggested values include: 1] alternate; 2] default; 3] height; 4] id; 5] label; 6] level; 7] link; 8] place; 9] type; 10] url; 11] width</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-paramList.html">paramList</a></span> list of parameter specifications</li><li><span class="specList-elementSpec"><a href="ref-paramSpec.html">paramSpec</a></span> supplies specification for one parameter of a model behaviour</li></ul><p>By default, a processor implementing the TEI processing model for a particular element has available to it as input data the content of the element itself, and all of its children. One or more <a class="gi" title="provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content." href="ref-param.html">param</a> elements may be supplied within a <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> element to specify <span class="term">parameters</span> which modify this, either by selecting particular parts of the default input data, or by selecting data which would not otherwise be available. In either case, the value supplied for the parameter is given as an XPath expression, evaluated with respect to the element node being processed. An arbitrary name (defined in the corresponding <a class="gi" title="supplies specification for one parameter of a model behaviour" href="ref-paramSpec.html">paramSpec</a>) is also supplied to a processor to identify each parameter.</p><div class="p">For example, an element such as the TEI <a class="gi" title="(reference) defines a reference to another location, possibly modified by additional text or comment." href="ref-ref.html">ref</a> element will probably be associated with a processing model which treats it as a hyperlink. But a hyperlink (in most implementations) often has two associated pieces of information: the address indicated, and some textual content serving to label the link . In HTML, the former is provided as value of the <span class="att">href</span> element, and the latter by the content of an <span class="gi">&lt;a&gt;</span> element. In the following processing model we define a behaviour called <span class="ident">link</span>, which will use whatever is indicated by the parameter called <span class="ident">uri</span>  to provide the former, while the latter is provided by the content of the <a class="gi" title="(reference) defines a reference to another location, possibly modified by additional text or comment." href="ref-ref.html">ref</a> element itself: <div id="index-egXML-d52e145816" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">ref</span>" <span class="attribute">mode</span>="<span class="attributevalue">add</span>"&gt;</span><br /> <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">link</span>"&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">uri</span>" <span class="attribute">value</span>="<span class="attributevalue">@target</span>"/&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">content</span>" <span class="attribute">value</span>="<span class="attributevalue">.</span>"/&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div> The <span class="att">value</span> attribute of a <a class="gi" title="provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content." href="ref-param.html">param</a> element supplies an XPath expression that indicates where the required value may be found. The context for this XPath is the element which is being processed; hence in this example, the <span class="ident">uri</span> parameter takes the value of the <span class="att">target</span> attribute on the <a class="gi" title="(reference) defines a reference to another location, possibly modified by additional text or comment." href="ref-ref.html">ref</a> element being processed. The <span class="ident">content</span> parameter indicates that the content of that <a class="gi" title="(reference) defines a reference to another location, possibly modified by additional text or comment." href="ref-ref.html">ref</a> element should be provided as its value. (This parameter is not strictly necessary, since by default the whole content of the element being processed is always available to a processor, but supplying it in this way makes the procedure more explicit).</div><p>All the parameters available for a given behaviour are defined as a part of the definition of the behaviour itself, as further discussed in section <a class="link_ptr" href="TD.html#TDPMDEF" title="Defining a processing model"><span class="headingNumber">22.5.5.8 </span>Defining a processing model</a> below.</p><div class="p">As a further example, the TEI <a class="gi" title="groups a number of alternative encodings for the same point in a text." href="ref-choice.html">choice</a> element requires a different behaviour for which the name <span class="ident">alternate</span> is proposed as in the following example: <div id="index-egXML-d52e145856" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">choice</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">sic and corr</span>"<br />  <span class="attribute">behaviour</span>="<span class="attributevalue">alternate</span>"&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">default</span>" <span class="attribute">value</span>="<span class="attributevalue">corr</span>"/&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">alternate</span>" <span class="attribute">value</span>="<span class="attributevalue">sic</span>"/&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div> The processing model shown here will be selected for processing a <a class="gi" title="groups a number of alternative encodings for the same point in a text." href="ref-choice.html">choice</a> element which has both <a class="gi" title="(Latin for thus or so) contains text reproduced although apparently incorrect or inaccurate." href="ref-sic.html">sic</a> and <a class="gi" title="(correction) contains the correct form of a passage apparently erroneous in the copy text." href="ref-corr.html">corr</a> child elements. The names <span class="ident">default</span> and <span class="ident">alternate</span> here are provided for convenience. The <span class="ident">default</span> parameter provides the value of the child <a class="gi" title="(correction) contains the correct form of a passage apparently erroneous in the copy text." href="ref-corr.html">corr</a> element, and the <span class="ident">alternate</span> parameter will provide that of the child <a class="gi" title="(Latin for thus or so) contains text reproduced although apparently incorrect or inaccurate." href="ref-sic.html">sic</a> elements. If neither <a class="gi" title="provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content." href="ref-param.html">param</a> element was supplied, both elements would still be available to an application, but the application would need to distinguish them for itself.</div><div class="p">A <a class="gi" title="groups a number of alternative encodings for the same point in a text." href="ref-choice.html">choice</a> element might contain multiple corrections, each with differing values for their <span class="att">cert</span> attribute. In the following processing model, we will accept as value of the <span class="ident">default</span> attribute only those child <a class="gi" title="(correction) contains the correct form of a passage apparently erroneous in the copy text." href="ref-corr.html">corr</a> elements which have a value <span class="val">high</span> for that attribute: <div id="index-egXML-d52e145912" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">choice</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">sic and corr</span>"<br />  <span class="attribute">behaviour</span>="<span class="attributevalue">alternate</span>"&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">default</span>"<br />   <span class="attribute">value</span>="<span class="attributevalue">corr[@cert='high']</span>"/&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">alternate</span>" <span class="attribute">value</span>="<span class="attributevalue">sic</span>"/&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><div class="p">A <a class="gi" title="groups a number of alternative encodings for the same point in a text." href="ref-choice.html">choice</a> element might contain several different pairs of alternate elements (<a class="gi" title="(abbreviation) contains an abbreviation of any sort." href="ref-abbr.html">abbr</a> and <a class="gi" title="(expansion) contains the expansion of an abbreviation." href="ref-expan.html">expan</a>, <a class="gi" title="(original form) contains a reading which is marked as following the original, rather than being normalized or corrected." href="ref-orig.html">orig</a> and <a class="gi" title="(regularization) contains a reading which has been regularized or normalized in some sense." href="ref-reg.html">reg</a>, etc.) We might wish to group together a set of processing models for these, for example to determine which of the possible alternatives is displayed by default whenever a <a class="gi" title="groups a number of alternative encodings for the same point in a text." href="ref-choice.html">choice</a> element is processed for output to the web: <div id="index-egXML-d52e145939" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">choice</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;modelGrp <span class="attribute">output</span>="<span class="attributevalue">web</span>"&gt;</span><br />  <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">sic and corr</span>"<br />   <span class="attribute">behaviour</span>="<span class="attributevalue">alternate</span>"&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">default</span>"<br />    <span class="attribute">value</span>="<span class="attributevalue">corr[@cert='high']</span>"/&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">alternate</span>" <span class="attribute">value</span>="<span class="attributevalue">sic</span>"/&gt;</span><br />  <span class="element">&lt;/model&gt;</span><br />  <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">abbr and expan</span>"<br />   <span class="attribute">behaviour</span>="<span class="attributevalue">alternate</span>"&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">default</span>" <span class="attribute">value</span>="<span class="attributevalue">expan[1]</span>"/&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">alternate</span>" <span class="attribute">value</span>="<span class="attributevalue">abbr</span>"/&gt;</span><br />  <span class="element">&lt;/model&gt;</span><br />  <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">orig and reg</span>"<br />   <span class="attribute">behaviour</span>="<span class="attributevalue">alternate</span>"&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">default</span>" <span class="attribute">value</span>="<span class="attributevalue">reg</span>"/&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">alternate</span>" <span class="attribute">value</span>="<span class="attributevalue">orig</span>"/&gt;</span><br />  <span class="element">&lt;/model&gt;</span><br /> <span class="element">&lt;/modelGrp&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><p>If nothing matches the XPath defining the value of a particular parameter (e.g. if in the above example there is no correction with <span class="att">cert</span>=<span class="val">high</span>) then the <span class="ident">default</span> parameter has no value. It is left to implementors to determine how null-valued parameters should be processed.</p></div><div class="div3" id="TDPMOU"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMMB"><span class="headingNumber">22.5.5.5 </span>Behaviours and their parameters</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMMS"><span class="headingNumber">22.5.5.7 </span>Model sequence</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMOU" title="link to this section "><span class="invisible">TEI: Outputs</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.6 </span><span class="head">Outputs</span></h5><p>As noted above, the <span class="att">output</span> attribute is used to associate particular processing models with a specific type of output. The following example documents a range of processing intentions for the <a class="gi" title="contains a date in any format." href="ref-date.html">date</a> element, intended to cope with at least the following three situations:</p><ol><li class="item">there is text inside the element, and the output is print; </li><li class="item">there is no text inside the element but there is a <span class="att">when</span> attribute, and the output is print;</li><li class="item">there is a <span class="att">when</span> attribute, there is text inside the element, and the output is web</li></ol><div id="index-egXML-d52e145987" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">date</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;modelGrp <span class="attribute">output</span>="<span class="attributevalue">print</span>"&gt;</span><br />  <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">text()</span>"<br />   <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"/&gt;</span><br />  <span class="element">&lt;model <span class="attribute">predicate</span>="<span class="attributevalue">@when and not(text())</span>"<br />   <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">content</span>" <span class="attribute">value</span>="<span class="attributevalue">@when</span>"/&gt;</span><br />  <span class="element">&lt;/model&gt;</span><br /> <span class="element">&lt;/modelGrp&gt;</span><br /> <span class="element">&lt;model <span class="attribute">output</span>="<span class="attributevalue">web</span>" <span class="attribute">predicate</span>="<span class="attributevalue">@when</span>"<br />  <span class="attribute">behaviour</span>="<span class="attributevalue">alternate</span>"&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">default</span>" <span class="attribute">value</span>="<span class="attributevalue">.</span>"/&gt;</span><br />  <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">alternate</span>" <span class="attribute">value</span>="<span class="attributevalue">@when</span>"/&gt;</span><br /> <span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div><p>For output to print we supply two processing models, one for the simplest case where the content of the <a class="gi" title="contains a date in any format." href="ref-date.html">date</a> is to be treated as an inline element, and the other for the case where there is no content and the value of the <span class="att">when</span> attribute is to be used in its place. This is specified by a parameter, called <span class="ident">content</span> in this example. For output to web, we use the <span class="ident">alternate</span> behaviour discussed in the previous section to indicate that by default the content of the element will be used, while retaining access to the value of the <span class="att">when</span> attribute, this time via a parameter called <span class="ident">alternate</span>.</p></div><div class="teidiv3" id="TDPMMS"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMOU"><span class="headingNumber">22.5.5.6 </span>Outputs</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMDEF"><span class="headingNumber">22.5.5.8 </span>Defining a processing model</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMMS" title="link to this section "><span class="invisible">TEI: Model sequence</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.7 </span><span class="head">Model sequence</span></h5><div class="p">As well as being combined to form model groups, several models may be combined to form a <span class="term">model sequence</span>. All of the individual components of a model sequence are understood to be applied, rather than considered to be mutually exclusive alternatives. For example, we might wish to define two different behaviours for a <a class="gi" title="contains a note or annotation." href="ref-note.html">note</a> element: the inline behaviour should be used to display the value of the note number (given by its <span class="att">n</span> attribute), while a different behaviour (here called <span class="ident">footnote</span>) should be used to display the content of the element at a specified place, given by the parameter <span class="ident">place</span>. Because both of these actions are required, the two models are grouped by a <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> element: <div id="index-egXML-d52e146041" class="pre egXML_valid"><span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">note</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br /> <span class="element">&lt;modelSequence <span class="attribute">output</span>="<span class="attributevalue">print</span>"&gt;</span><br />  <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">content</span>" <span class="attribute">value</span>="<span class="attributevalue">@n</span>"/&gt;</span><br />  <span class="element">&lt;/model&gt;</span><br />  <span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">footnote</span>"&gt;</span><br />   <span class="element">&lt;param <span class="attribute">name</span>="<span class="attributevalue">place</span>" <span class="attribute">value</span>="<span class="attributevalue">'foot'</span>"/&gt;</span><br />  <span class="element">&lt;/model&gt;</span><br /> <span class="element">&lt;/modelSequence&gt;</span><br /><span class="element">&lt;/elementSpec&gt;</span></div></div><p>The value of the parameter called <span class="ident">place</span> above is an XPath expression supplying an arbitrary string (<span class="q">‘foot’</span>), which is therefore quoted. It is left to implementors to validate or constrain the possible values for such expressions.</p></div><div class="teidiv3" id="TDPMDEF"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMMS"><span class="headingNumber">22.5.5.7 </span>Model sequence</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDPMIP"><span class="headingNumber">22.5.5.9 </span>Implementation of Processing Models</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMDEF" title="link to this section "><span class="invisible">TEI: Defining a processing model</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.8 </span><span class="head">Defining a processing model</span></h5><div class="p">The processing model for an element is defined using some combination of <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a>, <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a>, or <a class="gi" title="any grouping of &lt;model&gt; or &lt;modelSequence&gt; elements with a common output method" href="ref-modelGrp.html">modelGrp</a> elements within the <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> element containing its specification. The processing to be carried out is defined by means of the behaviour specified for each <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> element, possibly supplying specified values for a number of named parameters. The parameters available for a given behaviour are specified using a number of <a class="gi" title="provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content." href="ref-param.html">param</a> elements grouped together in a <a class="gi" title="list of parameter specifications" href="ref-paramList.html">paramList</a> element. This <a class="gi" title="list of parameter specifications" href="ref-paramList.html">paramList</a> is supplied within the <a class="gi" title="documents a single value in a predefined list of values." href="ref-valItem.html">valItem</a> used to document and name the behaviour. Here for example is the <a class="gi" title="documents a single value in a predefined list of values." href="ref-valItem.html">valItem</a> which defines the <span class="ident">link</span> behaviour presented above: <div id="index-egXML-d52e146099" class="pre egXML_valid"><span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">link</span>"&gt;</span><br /> <span class="element">&lt;desc&gt;</span>create a hyperlink<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;paramList&gt;</span><br />  <span class="element">&lt;paramSpec <span class="attribute">ident</span>="<span class="attributevalue">content</span>"&gt;</span><br />   <span class="element">&lt;desc&gt;</span>supplies the location of some content describing the link<span class="element">&lt;/desc&gt;</span><br />  <span class="element">&lt;/paramSpec&gt;</span><br />  <span class="element">&lt;paramSpec <span class="attribute">ident</span>="<span class="attributevalue">uri</span>"&gt;</span><br />   <span class="element">&lt;desc&gt;</span>supplies the location of the intended hyperlink<span class="element">&lt;/desc&gt;</span><br />  <span class="element">&lt;/paramSpec&gt;</span><br /> <span class="element">&lt;/paramList&gt;</span><br /><span class="element">&lt;/valItem&gt;</span></div></div><div class="p">Similarly the <a class="gi" title="documents a single value in a predefined list of values." href="ref-valItem.html">valItem</a> which defines the behaviour named <span class="ident">alternate</span> includes specifications for two parameters: one also called <span class="ident">alternate</span> and the other called <span class="ident">default</span> <div id="index-egXML-d52e146125" class="pre egXML_valid"><span class="element">&lt;valItem <span class="attribute">ident</span>="<span class="attributevalue">alternate</span>"&gt;</span><br /> <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2015-08-21</span>"<br />  <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>support display of alternative visualisations, for<br />     example by displaying the preferred content, by displaying both in parallel, or by toggling<br />     between the two.<span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;paramList&gt;</span><br />  <span class="element">&lt;paramSpec <span class="attribute">ident</span>="<span class="attributevalue">default</span>"&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2015-08-21</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>supplies the location of the preferred<br />         content<span class="element">&lt;/desc&gt;</span><br />  <span class="element">&lt;/paramSpec&gt;</span><br />  <span class="element">&lt;paramSpec <span class="attribute">ident</span>="<span class="attributevalue">alternate</span>"&gt;</span><br />   <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2015-08-21</span>"<br />    <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>supplies the location of the alternative<br />         content<span class="element">&lt;/desc&gt;</span><br />  <span class="element">&lt;/paramSpec&gt;</span><br /> <span class="element">&lt;/paramList&gt;</span><br /><span class="element">&lt;/valItem&gt;</span></div></div><p>The suggested behaviours provided by the <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> element are informally defined using commonly understood terminology, but specific details of how they should be implemented are left to the implementor. Such decisions may vary greatly depending on the kind of processing environment, the kind of output envisaged, etc. The intention is to reduce as far as possible any requirement for the implementor to be aware of TEI-specific rules, and to maximize the ability of the ODD to express processing intentions without fully specifying an implementation.</p></div><div class="div3" id="TDPMIP"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDPMDEF"><span class="headingNumber">22.5.5.8 </span>Defining a processing model</a></li><li class="subtoc"></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h5><span class="bookmarklink"><a class="bookmarklink" href="#TDPMIP" title="link to this section "><span class="invisible">TEI: Implementation of Processing Models</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.5.5.9 </span><span class="head">Implementation of Processing Models</span></h5><div class="p">As elsewhere in these Guidelines, the recommendations of this section are intended to be implementation-agnostic, not favouring any particular implementation method or technology. An implementor may choose, for example, whether to pre-process processing model specifications into a free standing ‘pipeline’, or to extract and process them dynamically during document processing. However, although implementors are generally free to interpret the processing model documentation according to their own requirements, some general assumptions underlie the recommendations made here: <ul><li class="item">If a <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> element has no child <a class="gi" title="provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content." href="ref-param.html">param</a> elements, the action specified by its behaviour should be applied to the whole element node concerned, including its child nodes of whatever type. If that behaviour requires distinguishing particular parts of the input, an implementation may choose either to make those distinctions itself, or to raise an error.</li><li class="item">If a <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> element has no <span class="att">predicate</span> or <span class="att">output</span> attribute then it is assumed to apply to all instances of the element defined in its parent <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> for all outputs. Otherwise its applicability depends on these attributes.</li><li class="item">Only one of the <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a>s is to be applied for a particular instance of the element, except when they appear within a <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a></li><li class="item">A ‘matching’ model is one where the element to be processed satisfies the XPath in the <span class="att">predicate</span> attribute of the <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> or <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> and the current output method matches the method specified in the <span class="att">output</span> attribute of the <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a>, <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a>, or a containing <a class="gi" title="any grouping of &lt;model&gt; or &lt;modelSequence&gt; elements with a common output method" href="ref-modelGrp.html">modelGrp</a>. A <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> or <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> without a <span class="att">predicate</span> always matches the element to be processed. A <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a>, <a class="gi" title="any grouping of &lt;model&gt; or &lt;modelSequence&gt; elements with a common output method" href="ref-modelGrp.html">modelGrp</a>, or <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> without an <span class="att">output</span> attribute matches any output method.</li><li class="item">Processing Model implementations must execute only the first matching <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> or <a class="gi" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> in document order.</li><li class="item">If there are two or more <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> elements provided for an <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> but they have different <span class="att">output</span> attributes then the implementation should choose the <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> appropriate to the desired output.</li><li class="item">If there are two or more <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> elements provided for an <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> but they have different <span class="att">predicate</span> attributes then the implementation should choose the <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> whose <span class="att">predicate</span> provides the most specific context (where <span class="term">specific</span> is understood in the same way as in XSLT) </li></ul> In the following example, which shows part of the element specification for the <a class="gi" title="(heading) contains any type of heading, for example the title of a section, or the heading of a list, glossary, manuscript description, etc." href="ref-head.html">head</a> element, there are two <a class="gi" title="describes the processing intended for a specified element." href="ref-model.html">model</a> elements, one with and one without a <span class="att">predicate</span> attribute: <div id="index-egXML-d52e146286" class="pre egXML_valid"><span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">inline</span>"<br /> <span class="attribute">predicate</span>="<span class="attributevalue">parent::list</span>"&gt;</span><br /> <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2015-03-02</span>"<br />  <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>Model for list headings<span class="element">&lt;/desc&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /><span class="element">&lt;/model&gt;</span><br /><span class="element">&lt;model <span class="attribute">behaviour</span>="<span class="attributevalue">heading</span>"&gt;</span><br /> <span class="element">&lt;desc <span class="attribute">versionDate</span>="<span class="attributevalue">2016-03-02</span>"<br />  <span class="attribute">xml:lang</span>="<span class="attributevalue">en</span>"&gt;</span>Default model for all headings.<span class="element">&lt;/desc&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /><span class="element">&lt;/model&gt;</span></div> In this example, an implementation should use the first processing model only for <a class="gi" title="(heading) contains any type of heading, for example the title of a section, or the heading of a list, glossary, manuscript description, etc." href="ref-head.html">head</a> elements with a <a class="gi" title="contains any sequence of items organized as a list." href="ref-list.html">list</a> element as parent; for all other <a class="gi" title="(heading) contains any type of heading, for example the title of a section, or the heading of a list, glossary, manuscript description, etc." href="ref-head.html">head</a> elements, the second processing model should be used.</div></div></div></div><div class="div3" id="TDCLA"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDTAG"><span class="headingNumber">22.5 </span>Element Specifications</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDENT"><span class="headingNumber">22.7 </span>Macro Specifications</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDCLA" title="link to this section "><span class="invisible">TEI: Class Specifications</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.6 </span><span class="head">Class Specifications</span></h3><p>The element <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> is used to document either an <span class="term">attribute class</span> or a ‘model class’, as defined in section <a class="link_ptr" href="ST.html#STEC" title="The TEI Class System"><span class="headingNumber">1.3 </span>The TEI Class System</a>. A corresponding <a class="gi" title="points to the specification for an attribute or model class which is to be included in a schema" href="ref-classRef.html">classRef</a> element may be used to select a specific named class from those available. </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-classSpec.html">classSpec</a></span> (class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both.<table class="specDesc"><tr><td class="Attribute"><span class="att">type</span></td><td>indicates whether this is a model class or an attribute class</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-classRef.html">classRef</a></span> points to the specification for an attribute or model class which is to be included in a schema<table class="specDesc"><tr><td class="Attribute"><span class="att">expand</span></td><td>indicates how references to this class within a content model should be interpreted.</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-attList.html">attList</a></span> contains documentation for all the attributes associated with this element, as a series of <a class="gi" title="(attribute definition) contains the definition of a single attribute." href="ref-attDef.html">attDef</a> elements.<table class="specDesc"><tr><td class="Attribute"><span class="att">org</span></td><td>(organization) specifies whether all the attributes in the list are available (org="group") or only one of them (org="choice")</td></tr></table></li></ul><div class="p">A model class specification does not list all of its members. Instead, its members declare that they belong to it by means of a <a class="gi" title="specifies all the classes of which the documented element or class is a member or subclass." href="ref-classes.html">classes</a> element contained within the relevant <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a>. This will contain a <a class="gi" title="specifies class membership of the documented element or class." href="ref-memberOf.html">memberOf</a> element for each class of which the relevant element is a member, supplying the name of the relevant class. For example, the <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> for the element <a class="gi" title="(highlighted) marks a word or phrase as graphically distinct from the surrounding text, for reasons concerning which no claim is made." href="ref-hi.html">hi</a> contains the following: <div id="index-egXML-d52e147336" class="pre egXML_valid"><span class="element">&lt;classes&gt;</span><br /> <span class="element">&lt;memberOf <span class="attribute">key</span>="<span class="attributevalue">model.hiLike</span>"/&gt;</span><br /><span class="element">&lt;/classes&gt;</span></div> This indicates that the <a class="gi" title="(highlighted) marks a word or phrase as graphically distinct from the surrounding text, for reasons concerning which no claim is made." href="ref-hi.html">hi</a> element is a member of the class with identifier <a class="link_odd" title="groups phrase-level elements which are typographically distinct but to which no specific function can be attributed." href="ref-model.hiLike.html">model.hiLike</a>. The <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> element that documents this class contains the following declarations: <div id="index-egXML-d52e147349" class="pre egXML_valid"><span class="element">&lt;classSpec <span class="attribute">type</span>="<span class="attributevalue">model</span>"<br /> <span class="attribute">ident</span>="<span class="attributevalue">model.hiLike</span>"&gt;</span><br /> <span class="element">&lt;desc&gt;</span>groups phrase-level elements related to highlighting that have no specific semantics <span class="element">&lt;/desc&gt;</span><br /> <span class="element">&lt;classes&gt;</span><br />  <span class="element">&lt;memberOf <span class="attribute">key</span>="<span class="attributevalue">model.highlighted</span>"/&gt;</span><br /> <span class="element">&lt;/classes&gt;</span><br /><span class="element">&lt;/classSpec&gt;</span></div> which indicate that the class <a class="link_odd" title="groups phrase-level elements which are typographically distinct but to which no specific function can be attributed." href="ref-model.hiLike.html">model.hiLike</a> is actually a member (or subclass) of the class <a class="link_odd" title="groups phrase-level elements which are typographically distinct." href="ref-model.highlighted.html">model.highlighted</a>.</div><p>The function of a model class declaration is to provide another way of referring to a group of elements. It does not confer any other properties on the elements which constitute its membership. </p><p>The attribute <span class="att">type</span> is used to distinguish between ‘model’ and ‘attribute’ classes. In the case of attribute classes, the attributes provided by membership in the class are documented by an <a class="gi" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> element contained within the <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a>. In the case of model classes, no further information is needed to define the class beyond its description, its identifier, and optionally any classes of which it is a member.</p><p>When a model class is referenced in the content model of an element (i.e. by means of a <a class="gi" title="points to the specification for an attribute or model class which is to be included in a schema" href="ref-classRef.html">classRef</a> element within the <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> of an <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a>), its meaning will depend on the value of its <span class="att">expand</span> attribute.</p><div class="p">If this attribute is not specified, the <a class="gi" title="points to the specification for an attribute or model class which is to be included in a schema" href="ref-classRef.html">classRef</a> is interpreted to mean an alternated list of all the current members of the class named. For example, suppose that the members of the class <a class="link_odd" title="groups phrase-level elements which are typographically distinct but to which no specific function can be attributed." href="ref-model.hiLike.html">model.hiLike</a> are elements <a class="gi" title="(highlighted) marks a word or phrase as graphically distinct from the surrounding text, for reasons concerning which no claim is made." href="ref-hi.html">hi</a>, <span class="gi">&lt;it&gt;</span>, and <span class="gi">&lt;bo&gt;</span>. Then a content model such as <div id="index-egXML-d52e147414" class="pre egXML_valid"><span class="element">&lt;content&gt;</span><br /> <span class="element">&lt;classRef <span class="attribute">key</span>="<span class="attributevalue">model.hiLike</span>"/&gt;</span><br /><span class="element">&lt;/content&gt;</span></div> would be equivalent to the explicit content model: <div id="index-egXML-d52e147418" class="pre egXML_valid"><span class="element">&lt;content&gt;</span><br /> <span class="element">&lt;alternate&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">hi</span>"/&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">it</span>"/&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">bo</span>"/&gt;</span><br /> <span class="element">&lt;/alternate&gt;</span><br /><span class="element">&lt;/content&gt;</span></div> (or, to use RELAX NG compact syntax, <code>(hi|it|bo)*</code>). However, a content model of <code>&lt;classRef expand="sequence"/&gt;</code> would be equivalent to the following explicit content model: <div id="index-egXML-d52e147431" class="pre egXML_valid"><span class="element">&lt;content&gt;</span><br /> <span class="element">&lt;sequence&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">hi</span>"/&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">it</span>"/&gt;</span><br />  <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">bo</span>"/&gt;</span><br /> <span class="element">&lt;/sequence&gt;</span><br /><span class="element">&lt;/content&gt;</span></div> (or, in RELAX NG compact syntax, <code>(hi,it,bo)*</code>).</div><p>An attribute class (a <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> of <span class="att">type</span> <span class="val">atts</span>) contains an <a class="gi" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> element which lists the attributes that all the members of that class inherit from it. For example, the class <a class="link_odd" title="provides attributes for elements which represent a formal analysis or interpretation." href="ref-att.interpLike.html">att.interpLike</a> defines a small set of attributes common to all elements which are members of that class: those attributes are listed by the <a class="gi" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> element contained by the <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> for <a class="link_odd" title="provides attributes for elements which represent a formal analysis or interpretation." href="ref-att.interpLike.html">att.interpLike</a>. When processing the documentation elements for elements which are members of that class, an ODD processor is required to extend the <a class="gi" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> (or equivalent) for such elements to include any attributes defined by the <a class="gi" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> elements concerned. There is a single global attribute class, <a class="link_odd" title="provides attributes common to all elements in the TEI encoding scheme." href="ref-att.global.html">att.global</a>, to which some modules contribute additional attributes when they are included in a schema.</p></div><div class="div3" id="TDENT"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDCLA"><span class="headingNumber">22.6 </span>Class Specifications</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDB1"><span class="headingNumber">22.8 </span>Building a TEI Schema</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDENT" title="link to this section "><span class="invisible">TEI: Macro Specifications</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.7 </span><span class="head">Macro Specifications</span></h3><p>The <a class="gi" title="(macro specification) documents the function and implementation of a pattern." href="ref-macroSpec.html">macroSpec</a> element is used to declare and document predefined strings or patterns not otherwise documented by the elements described in this section. A corresponding <a class="gi" title="points to the specification for some pattern which is to be included in a schema" href="ref-macroRef.html">macroRef</a> element may be used to select a specific named pattern from those available. Patterns are used as a shorthand chiefly to describe common content models and datatypes, but may be used for any purpose. The following elements are used to represent patterns: </p><ul class="specList"><li><span class="specList-elementSpec"><a href="ref-macroSpec.html">macroSpec</a></span> (macro specification) documents the function and implementation of a pattern.<table class="specDesc"><tr><td class="Attribute"><span class="att">type</span></td><td>indicates which type of entity should be generated, when an ODD processor is generating a module using XML DTD syntax.</td></tr></table></li><li><span class="specList-elementSpec"><a href="ref-macroRef.html">macroRef</a></span> points to the specification for some pattern which is to be included in a schema<table class="specDesc"><tr><td class="Attribute"><span class="att">key</span></td><td>the identifier used for the required pattern within the source indicated.</td></tr></table></li></ul></div><div class="teidiv1" id="TDB1"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDENT"><span class="headingNumber">22.7 </span>Macro Specifications</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TDformal"><span class="headingNumber">22.9 </span>Module for Documentation Elements</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDB1" title="link to this section "><span class="invisible">TEI: Building a TEI Schema</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.8 </span><span class="head">Building a TEI Schema</span></h3><p>The specification elements, and some of their children, are all members of the <a class="link_odd" title="provides the identifying attribute for elements which can be subsequently referenced by means of a @key attribute." href="ref-att.identified.html">att.identified</a> class, from which they inherit the following attributes: </p><ul class="specList"><li><span class="specList-classSpec"><a href="ref-att.identified.html">att.identified</a></span> provides the identifying attribute for elements which can be subsequently referenced by means of a <span class="att">key</span> attribute.<table class="specDesc"><tr><td class="Attribute"><span class="att">ident</span></td><td>supplies the identifier by which this element may be referenced.</td></tr><tr><td class="Attribute"><span class="att">predeclare</span></td><td>says whether this object should be predeclared in the <span class="ident-module">tei</span> infrastructure module.</td></tr><tr><td class="Attribute"><span class="att">module</span></td><td>supplies a name for the module in which this object is to be declared.</td></tr></table></li></ul><p> This attribute class is a subclass of the <a class="link_odd" title="provides attributes indicating how multiple references to the same object in a schema should be combined" href="ref-att.combinable.html">att.combinable</a> class from which it (and some other elements) inherits the following attribute: </p><ul class="specList"><li><span class="specList-classSpec"><a href="ref-att.combinable.html">att.combinable</a></span> provides attributes indicating how multiple references to the same object in a schema should be combined<table class="specDesc"><tr><td class="Attribute"><span class="att">mode</span></td><td>specifies the effect of this declaration on its parent object.</td></tr></table></li></ul><p> This attribute class, in turn, is a subclass of the <a class="link_odd" title="provides attributes indicating how a deprecated feature will be treated in future releases." href="ref-att.deprecated.html">att.deprecated</a> class, from which it inherits the following attribute: </p><ul class="specList"><li><span class="specList-classSpec"><a href="ref-att.deprecated.html">att.deprecated</a></span> provides attributes indicating how a deprecated feature will be treated in future releases.<table class="specDesc"><tr><td class="Attribute"><span class="att">validUntil</span></td><td>provides a date before which the construct being defined will not be removed.</td></tr></table></li></ul><p> The <span class="att">validUntil</span> attribute may be used to signal an intent to remove a construct from future versions of the schema being specified.</p><p>The <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a>, <a class="gi" title="(attribute definition) contains the definition of a single attribute." href="ref-attDef.html">attDef</a> and <a class="gi" title="(schema specification) generates a TEI-conformant schema and documentation for it." href="ref-schemaSpec.html">schemaSpec</a> specification elements also have an attribute which determines which namespace to which the object being created will belong. In the case of <a class="gi" title="(schema specification) generates a TEI-conformant schema and documentation for it." href="ref-schemaSpec.html">schemaSpec</a>, this namespace is inherited by all the elements created in the schema, unless they have their own <span class="att">ns</span>. </p><ul class="specList"><li><span class="specList-classSpec"><a href="ref-att.namespaceable.html">att.namespaceable</a></span> provides an attribute indicating the target namespace for an object being created</li></ul><p>These attributes are used by an ODD processor to determine how declarations are to be combined to form a schema or DTD, as further discussed in this section.</p><div class="teidiv2" id="TDbuild"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#ST-aliens"><span class="headingNumber">22.8.2 </span>Combining TEI and Non-TEI Modules</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TDbuild" title="link to this section "><span class="invisible">TEI: TEI customizations</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.8.1 </span><span class="head">TEI customizations</span></h4><p>As noted above, a TEI schema is defined by a <a class="gi" title="(schema specification) generates a TEI-conformant schema and documentation for it." href="ref-schemaSpec.html">schemaSpec</a> element containing an arbitrary mixture of explicit declarations for objects (i.e. elements, classes, patterns, or macro specifications) and references to other objects containing such declarations (i.e. references to specification groups, or to modules). A major purpose of this mechanism is to simplify the process of defining user customizations, by providing a formal method for the user to combine new declarations with existing ones, or to modify particular parts of existing declarations.</p><div class="p">In the simplest case, a user-defined schema might just combine all the declarations from two nominated modules: <div id="index-egXML-d52e149733" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">core</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">linking</span>"/&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div> An ODD processor, given such a document, should combine the declarations which belong to the named modules, and deliver the result as a schema of the requested type. It may also generate documentation for the elements declared by those modules. No source is specified for the modules, and the schema will therefore combine the declarations found in the most recent release version of the TEI Guidelines known to the ODD processor in use.</div><p>The value specified for the <span class="att">source</span> attribute, when it is supplied as a URL, specifies any convenient location from which the relevant ODD files may be obtained. For the current release of the TEI Guidelines, a URL in the form <code>http://www.tei-c.org/Vault/P5/x.y.z/xml/tei/odd/p5subset.xml</code> may be used, where <code>x.y.z</code> represents the P5 version number, e.g. <code>1.3.0</code>. Alternatively, if the ODD files are locally installed, it may be more convenient to supply a value such as <span class="val">../ODDs/p5subset.xml"</span>. </p><p>The value for the <span class="att">source</span> attribute may be any form of URI. A set of TEI-conformant specifications in a form directly usable by an ODD processor must be available at the location indicated. When no <span class="att">source</span> value is supplied, an ODD processor may either raise an error or assume that the location of the current release of the TEI Guidelines is intended.</p><p>If the source is specified in the form of a private URI, the form recommended is <code>aaa:x.y.z</code>, where <code>aaa</code> is a prefix indicating the markup language in use, and <code>x.y.z</code> indicates the version number. For example, <code>tei:1.2.1</code> should be used to reference release 1.2.1 of the current TEI Guidelines. When such a URI is used, it will usually be necessary to translate it before such a file can be used in blind interchange.</p><div class="p">The effect of a <a class="gi" title="(module reference) references a module which is to be incorporated into a schema." href="ref-moduleRef.html">moduleRef</a> element is to include in the schema all declarations provided by that module. This may be modified by means of the attributes <span class="att">include</span> and <span class="att">except</span> which allow the encoder to supply an explicit lists of elements from the stated module which are to be included or excluded respectively. For example: <div id="index-egXML-d52e149789" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">core</span>"<br />  <span class="attribute">except</span>="<span class="attributevalue">add del orig reg</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">linking</span>"<br />  <span class="attribute">include</span>="<span class="attributevalue">linkGroup link</span>"/&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div> The schema specified here will include all the elements supplied by the core module except for <a class="gi" title="(addition) contains letters, words, or phrases inserted in the source text by an author, scribe, or a previous annotator or corrector." href="ref-add.html">add</a>, <a class="gi" title="(deletion) contains a letter, word, or passage deleted, marked as deleted, or otherwise indicated as superfluous or spurious in the copy text by an author, scribe, or a previous annotator or corrector." href="ref-del.html">del</a>, <a class="gi" title="(original form) contains a reading which is marked as following the original, rather than being normalized or corrected." href="ref-orig.html">orig</a>, and <a class="gi" title="(regularization) contains a reading which has been regularized or normalized in some sense." href="ref-reg.html">reg</a>. It will also include only the <span class="gi">&lt;linkGroup&gt;</span> and <a class="gi" title="defines an association or hypertextual link among elements or passages, of some type not more precisely specifiable by other elements." href="ref-link.html">link</a> elements from the linking module.</div><div class="p">Alternatively, the element <a class="gi" title="points to the specification for some element which is to be included in a schema" href="ref-elementRef.html">elementRef</a> may be used to indicate explicitly which elements are to be included in a schema. The same effect as the preceding example might thus be achieved by the following: <div id="index-egXML-d52e149818" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">core</span>"<br />  <span class="attribute">except</span>="<span class="attributevalue">add del orig reg</span>"/&gt;</span><br /> <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">linkGroup</span>"/&gt;</span><br /> <span class="element">&lt;elementRef <span class="attribute">key</span>="<span class="attributevalue">link</span>"/&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div> Note that in this last case, there is no need to specify the name of the module from which the two element declarations are to be found; in the TEI scheme, element names are unique across all modules. The module is simply a convenient way of grouping together a number of related declarations.</div><div class="p">In the same way, a schema may select a subset of the attributes available in a specific class, using the <a class="gi" title="points to the specification for an attribute or model class which is to be included in a schema" href="ref-classRef.html">classRef</a> element to point to an attribute class: <div id="index-egXML-d52e149829" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">tei</span>"/&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /> <span class="element">&lt;classRef <span class="attribute">key</span>="<span class="attributevalue">att.global.linking</span>"<br />  <span class="attribute">include</span>="<span class="attributevalue">corresp</span>"/&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div> Here, only the <span class="att">corresp</span> attribute is included; the other attributes in the class are not available. The same effect can be achieved using <span class="att">except</span>: <div id="index-egXML-d52e149842" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">tei</span>"/&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /> <span class="element">&lt;classRef <span class="attribute">key</span>="<span class="attributevalue">att.global.linking</span>"<br />  <span class="attribute">except</span>="<span class="attributevalue">copyOf exclude next prev sameAs select synch</span>"/&gt;</span><br /><span class="comment">&lt;!-- ... --&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div></div><div class="p">A schema may also include declarations for new elements, as in the following example: <div id="index-egXML-d52e149851" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">header</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">verse</span>"/&gt;</span><br /> <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">soundClip</span>"&gt;</span><br />  <span class="element">&lt;classes&gt;</span><br />   <span class="element">&lt;memberOf <span class="attribute">key</span>="<span class="attributevalue">model.pPart.data</span>"/&gt;</span><br />  <span class="element">&lt;/classes&gt;</span><br /> <span class="element">&lt;/elementSpec&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div> A declaration for the element <span class="gi">&lt;soundClip&gt;</span>, which is not defined in the TEI scheme, will be added to the output schema. This element will also be added to the existing TEI class <a class="link_odd" title="groups phrase-level elements containing names, dates, numbers, measures, and similar data." href="ref-model.pPart.data.html">model.pPart.data</a>, and will thus be available in TEI conformant documents. Attributes from existing TEI classes could be added to the new element using <a class="gi" title="(attribute pointer) points to the definition of an attribute or group of attributes." href="ref-attRef.html">attRef</a>: <div id="index-egXML-d52e149868" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">header</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">verse</span>"/&gt;</span><br /> <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">soundClip</span>"&gt;</span><br />  <span class="element">&lt;classes&gt;</span><br />   <span class="element">&lt;memberOf <span class="attribute">key</span>="<span class="attributevalue">model.pPart.data</span>"/&gt;</span><br />  <span class="element">&lt;/classes&gt;</span><br />  <span class="element">&lt;attList&gt;</span><br />   <span class="element">&lt;attRef <span class="attribute">class</span>="<span class="attributevalue">att.global.source</span>"<br />    <span class="attribute">name</span>="<span class="attributevalue">source</span>"/&gt;</span><br />  <span class="element">&lt;/attList&gt;</span><br /> <span class="element">&lt;/elementSpec&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div> This will provide the <span class="att">source</span> attribute from the <a class="link_odd" title="provides an attribute used by elements to point to an external source." href="ref-att.global.source.html">att.global.source</a> class on the new <span class="gi">&lt;soundClip&gt;</span> element.</div><div class="p">A schema might also include re-declarations of existing elements, as in the following example: <div id="index-egXML-d52e149890" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">ident</span>="<span class="attributevalue">example</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">header</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">teistructure</span>"/&gt;</span><br /> <span class="element">&lt;elementSpec <span class="attribute">ident</span>="<span class="attributevalue">head</span>" <span class="attribute">mode</span>="<span class="attributevalue">change</span>"&gt;</span><br />  <span class="element">&lt;content&gt;</span><br />   <span class="element">&lt;macroRef <span class="attribute">key</span>="<span class="attributevalue">macro.xtext</span>"/&gt;</span><br />  <span class="element">&lt;/content&gt;</span><br /> <span class="element">&lt;/elementSpec&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div> The effect of this is to redefine the content model for the element <a class="gi" title="(heading) contains any type of heading, for example the title of a section, or the heading of a list, glossary, manuscript description, etc." href="ref-head.html">head</a> as plain text, by over-riding the <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> child of the selected <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a>. The attribute specification <code>mode="change"</code> has the effect of over-riding only those children elements of the <a class="gi" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> which appear both in the original specification and in the new specification supplied above: <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> in this example. Note that if the value for <span class="att">mode</span> were <span class="val">replace</span>, the effect would be to replace all children elements of the original specification with the the children elements of the new specification, and thus (in this example) to delete all of them except <a class="gi" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a>.</div><p>A schema may not contain more than two declarations for any given component. The value of the <span class="att">mode</span> attribute is used to determine exactly how the second declaration (and its constituents) should be combined with the first. The following table summarizes how a processor should resolve duplicate declarations; the term <span class="term">identifiable</span> refers to those elements which can have a <span class="att">mode</span> attribute: </p><div class="table"><table><tr class="label"><td>mode value</td><td>existing declaration</td><td>effect</td></tr><tr><td>add</td><td>no</td><td>add new declaration to schema; process its children in add mode</td></tr><tr><td>add</td><td>yes</td><td>raise error</td></tr><tr><td>replace</td><td>no</td><td>raise error</td></tr><tr><td>replace</td><td>yes</td><td>retain existing declaration; process new children in replace mode; ignore existing children</td></tr><tr><td>change</td><td>no</td><td>raise error</td></tr><tr><td>change</td><td>yes</td><td>process identifiable children according to their modes; process unidentifiable children in replace mode; retain existing children where no replacement or change is provided </td></tr><tr><td>delete</td><td>no</td><td>raise error</td></tr><tr><td>delete</td><td>yes</td><td>ignore existing declaration and its children</td></tr></table></div></div><div class="div3" id="ST-aliens"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDbuild"><span class="headingNumber">22.8.1 </span>TEI customizations</a></li><li class="subtoc"><span class="nextLink"> » </span><a class="navigation" href="TD.html#TD-LinkingSchemas"><span class="headingNumber">22.8.3 </span>Linking Schemas to XML Documents</a></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#ST-aliens" title="link to this section "><span class="invisible">TEI: Combining TEI and Non-TEI Modules</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.8.2 </span><span class="head">Combining TEI and Non-TEI Modules</span></h4><div class="p">In the simplest case, all that is needed to include a non-TEI module in a schema is to reference its RELAX NG source using the <span class="att">url</span> attribute on <a class="gi" title="(module reference) references a module which is to be incorporated into a schema." href="ref-moduleRef.html">moduleRef</a>. The following specification, for example, creates a schema in which declarations from the non-TEI module <span class="ident-file">svg11.rng</span> (defining Standard Vector Graphics) are included. To avoid any risk of name clashes, the schema specifies that all TEI patterns generated should be prefixed by the string "TEI_". <div id="index-egXML-d52e150018" class="pre egXML_valid"><span class="element">&lt;schemaSpec <span class="attribute">prefix</span>="<span class="attributevalue">TEI_</span>" <span class="attribute">ident</span>="<span class="attributevalue">testsvg</span>"<br /> <span class="attribute">start</span>="<span class="attributevalue">TEI svg</span>"&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">header</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">core</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">tei</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">key</span>="<span class="attributevalue">textstructure</span>"/&gt;</span><br /> <span class="element">&lt;moduleRef <span class="attribute">url</span>="<span class="attributevalue">svg11.rng</span>"/&gt;</span><br /><span class="element">&lt;/schemaSpec&gt;</span></div></div><div class="p">This specification generates a single schema which might be used to validate either a TEI document (with the root element <a class="gi" title="(TEI document) contains a single TEI-conformant document, combining a single TEI header with one or more members of the model.resourceLike class. Multiple &lt;TEI&gt; elements may be combined to form a &lt;teiCorpus&gt; element." href="ref-TEI.html">TEI</a>), or an SVG document (with a root element <span class="gi">&lt;svg:svg&gt;</span>), but would <em>not</em> validate a TEI document containing <span class="gi">&lt;svg:svg&gt;</span> or other elements from the SVG language. For that to be possible, the <span class="gi">&lt;svg:svg&gt;</span> element must become a member of a TEI model class (<a class="link_ptr" href="ST.html#STEC" title="The TEI Class System"><span class="headingNumber">1.3 </span>The TEI Class System</a>), so that it may be referenced by other TEI elements. To achieve this, we modify the last <a class="gi" title="(module reference) references a module which is to be incorporated into a schema." href="ref-moduleRef.html">moduleRef</a> in the above example as follows: <div id="index-egXML-d52e150049" class="pre egXML_valid"><span class="element">&lt;moduleRef <span class="attribute">url</span>="<span class="attributevalue">svg11.rng</span>"&gt;</span><br /> <span class="element">&lt;content&gt;</span><br />  <span class="element">&lt;rng:define <span class="attribute">name</span>="<span class="attributevalue">TEI_model.graphicLike</span>"<br />   <span class="attribute">combine</span>="<span class="attributevalue">choice</span>"&gt;</span><br />   <span class="element">&lt;rng:ref <span class="attribute">name</span>="<span class="attributevalue">svg</span>"/&gt;</span><br />  <span class="element">&lt;/rng:define&gt;</span><br /> <span class="element">&lt;/content&gt;</span><br /><span class="element">&lt;/moduleRef&gt;</span></div></div><p>This states that when the declarations from the <span class="ident-file">svg11.rng</span> module are combined with those from the other modules, the declaration for the model class <a class="link_odd" title="groups elements containing images, formulae, and similar objects." href="ref-model.graphicLike.html">model.graphicLike</a> in the TEI module should be extended to include the element <span class="gi">&lt;svg:svg&gt;</span> as an alternative. This has the effect that elements in the TEI scheme which define their content model in terms of that element class (notably <a class="gi" title="groups elements representing or containing graphic information such as an illustration, formula, or figure." href="ref-figure.html">figure</a>) can now include it. A RELAX NG schema generated from such a specification can be used to validate documents in which the TEI <a class="gi" title="groups elements representing or containing graphic information such as an illustration, formula, or figure." href="ref-figure.html">figure</a> element contains any valid SVG representation of a graphic, embedded within an <span class="gi">&lt;svg:svg&gt;</span> element.</p></div><div class="div2" id="TD-LinkingSchemas"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#ST-aliens"><span class="headingNumber">22.8.2 </span>Combining TEI and Non-TEI Modules</a></li><li class="subtoc"></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h4><span class="bookmarklink"><a class="bookmarklink" href="#TD-LinkingSchemas" title="link to this section "><span class="invisible">TEI: Linking Schemas to XML Documents</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.8.3 </span><span class="head">Linking Schemas to XML Documents</span></h4><p>Schemas can be linked to XML documents by means of the <span class="tag">&lt;?xml-model?&gt;</span> processing instruction described in the W3C Working Group Note <span class="titlem">Associating Schemas with XML documents</span> (<a class="link_ptr" href="http://www.w3.org/TR/xml-model/"><span>http://www.w3.org/TR/xml-model/</span></a>). <span class="tag">&lt;?xml-model?&gt;</span> can be used for any type of schema, and may be used for multiple schemas: </p><pre class="pre_eg cdata">&lt;?xml-model href="tei_tite.rng" type="application/xml" ?&gt;
&lt;?xml-model href="checkLinks.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron" ?&gt;
&lt;?xml-model href="tei_tite.odd" type="application/tei+xml" schematypens="http://www.tei-c.org/ns/1.0" ?&gt;</pre><p> This example includes a standard RELAX NG schema, a Schematron schema which might be used for checking that all pointing attributes point at existing targets, and also a link to the TEI ODD file from which the RELAX NG schema was generated. See also <a class="link_ptr" href="HD.html#HDSCHSPEC" title="The Schema Specification"><span class="headingNumber">2.3.9 </span>The Schema Specification</a> for details of another method of linking an ODD specification into your file by including a <a class="gi" title="(schema specification) generates a TEI-conformant schema and documentation for it." href="ref-schemaSpec.html">schemaSpec</a> element in <a class="gi" title="(encoding description) documents the relationship between an electronic text and the source or sources from which it was derived." href="ref-encodingDesc.html">encodingDesc</a>.</p></div></div><div class="div2" id="TDformal"><div class="miniTOC miniTOC_right"><ul class="subtoc"><li class="subtoc"><span class="previousLink"> « </span><a class="navigation" href="TD.html#TDB1"><span class="headingNumber">22.8 </span>Building a TEI Schema</a></li><li class="subtoc"></li><li class="subtoc"><a class="navigation" href="index.html">Home</a></li></ul></div><h3><span class="bookmarklink"><a class="bookmarklink" href="#TDformal" title="link to this section "><span class="invisible">TEI: Module for Documentation Elements</span><span class="pilcrow">¶</span></a></span><span class="headingNumber">22.9 </span><span class="head">Module for Documentation Elements</span></h3><p>The module described in this chapter makes available the following components: </p><dl class="moduleSpec"><dt class="moduleSpecHead"><span lang="en">Module</span> tagdocs: Documentation of TEI modules</dt><dd><ul><li><span lang="en">Elements defined</span>: <a class="link_odd" title="(alternate identifier) supplies the recommended XML name for an element, class, attribute, etc. in some language." href="ref-altIdent.html">altIdent</a> <a class="link_odd" title="an alternation of references" href="ref-alternate.html">alternate</a> <a class="link_odd" title="indicates the presence of any elements in a content model" href="ref-anyElement.html">anyElement</a> <a class="link_odd" title="(attribute) contains the name of an attribute appearing within running text." href="ref-att.html">att</a> <a class="link_odd" title="(attribute definition) contains the definition of a single attribute." href="ref-attDef.html">attDef</a> <a class="link_odd" title="contains documentation for all the attributes associated with this element, as a series of &lt;attDef&gt; elements." href="ref-attList.html">attList</a> <a class="link_odd" title="(attribute pointer) points to the definition of an attribute or group of attributes." href="ref-attRef.html">attRef</a> <a class="link_odd" title="points to the specification for an attribute or model class which is to be included in a schema" href="ref-classRef.html">classRef</a> <a class="link_odd" title="(class specification) contains reference information for a TEI element class; that is a group of elements which appear together in content models, or which share some common attribute, or both." href="ref-classSpec.html">classSpec</a> <a class="link_odd" title="specifies all the classes of which the documented element or class is a member or subclass." href="ref-classes.html">classes</a> <a class="link_odd" title="contains literal code from some formal language such as a programming language." href="ref-code.html">code</a> <a class="link_odd" title="(constraint rules) the formal rules of a constraint" href="ref-constraint.html">constraint</a> <a class="link_odd" title="(constraint on schema) contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model" href="ref-constraintSpec.html">constraintSpec</a> <a class="link_odd" title="(content model) contains the text of a declaration for the schema documented." href="ref-content.html">content</a> <a class="link_odd" title="Restricts the value of the strings used to represent values of a datatype, according to XML Schemas: Part 2: Datatypes." href="ref-dataFacet.html">dataFacet</a> <a class="link_odd" title="identifies the datatype of an attribute value, either by referencing an item in an externally defined datatype library, or by pointing to a TEI-defined data specification" href="ref-dataRef.html">dataRef</a> <a class="link_odd" title="(datatype specification) documents a datatype." href="ref-dataSpec.html">dataSpec</a> <a class="link_odd" title="specifies the declared value for an attribute, by referring to any datatype defined by the chosen schema language." href="ref-datatype.html">datatype</a> <a class="link_odd" title="(default value) specifies the default declared value for an attribute." href="ref-defaultVal.html">defaultVal</a> <a class="link_odd" title="(example) contains any kind of illustrative example." href="ref-eg.html">eg</a> <a class="link_odd" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> <a class="link_odd" title="points to the specification for some element which is to be included in a schema" href="ref-elementRef.html">elementRef</a> <a class="link_odd" title="(element specification) documents the structure, content, and purpose of a single element type." href="ref-elementSpec.html">elementSpec</a> <a class="link_odd" title="indicates the presence of an empty node within a content model" href="ref-empty.html">empty</a> <a class="link_odd" title="(equivalent) specifies a component which is considered equivalent to the parent element, either by co-reference, or by external link." href="ref-equiv.html">equiv</a> <a class="link_odd" title="groups an example demonstrating the use of an element along with optional paragraphs of commentary." href="ref-exemplum.html">exemplum</a> <a class="link_odd" title="(element name) contains the name (generic identifier) of an element." href="ref-gi.html">gi</a> <a class="link_odd" title="(identifier) contains an identifier or name for an object of some kind in a formal language. &lt;ident&gt; is used for tokens such as variable names, class names, type names, function names etc. in formal programming languages." href="ref-ident.html">ident</a> <a class="link_odd" title="(list of references) supplies a list of significant references to places where this element is discussed, in the current document or elsewhere." href="ref-listRef.html">listRef</a> <a class="link_odd" title="points to the specification for some pattern which is to be included in a schema" href="ref-macroRef.html">macroRef</a> <a class="link_odd" title="(macro specification) documents the function and implementation of a pattern." href="ref-macroSpec.html">macroSpec</a> <a class="link_odd" title="specifies class membership of the documented element or class." href="ref-memberOf.html">memberOf</a> <a class="link_odd" title="describes the processing intended for a specified element." href="ref-model.html">model</a> <a class="link_odd" title="any grouping of &lt;model&gt; or &lt;modelSequence&gt; elements with a common output method" href="ref-modelGrp.html">modelGrp</a> <a class="link_odd" title="any sequence of model or &lt;modelSequence&gt; elements which is to be processed as a single set of actions" href="ref-modelSequence.html">modelSequence</a> <a class="link_odd" title="(module reference) references a module which is to be incorporated into a schema." href="ref-moduleRef.html">moduleRef</a> <a class="link_odd" title="(module specification) documents the structure, content, and purpose of a single module, i.e. a named and externally visible group of declarations." href="ref-moduleSpec.html">moduleSpec</a> <a class="link_odd" title="describes the rendering or appearance intended for all occurrences of an element in a specified context for a specified type of output." href="ref-outputRendition.html">outputRendition</a> <a class="link_odd" title="provides a parameter for a model behaviour by supplying its name and an XPath expression identifying the location of its content." href="ref-param.html">param</a> <a class="link_odd" title="list of parameter specifications" href="ref-paramList.html">paramList</a> <a class="link_odd" title="supplies specification for one parameter of a model behaviour" href="ref-paramSpec.html">paramSpec</a> <a class="link_odd" title="contains any commentary or discussion about the usage of an element, attribute, class, or entity not otherwise documented within the containing element." href="ref-remarks.html">remarks</a> <a class="link_odd" title="(schema specification) generates a TEI-conformant schema and documentation for it." href="ref-schemaSpec.html">schemaSpec</a> <a class="link_odd" title="sequence of references" href="ref-sequence.html">sequence</a> <a class="link_odd" title="(specification description) indicates that a description of the specified element or class should be included at this point within a document." href="ref-specDesc.html">specDesc</a> <a class="link_odd" title="(specification group) contains any convenient grouping of specifications for use within the current module." href="ref-specGrp.html">specGrp</a> <a class="link_odd" title="(reference to a specification group) indicates that the declarations contained by the &lt;specGrp&gt; referenced should be inserted at this point." href="ref-specGrpRef.html">specGrpRef</a> <a class="link_odd" title="(specification list) marks where a list of descriptions is to be inserted into the prose documentation." href="ref-specList.html">specList</a> <a class="link_odd" title="contains text of a complete start- or end-tag, possibly including attribute specifications, but excluding the opening and closing markup delimiter characters." href="ref-tag.html">tag</a> <a class="link_odd" title="indicates the presence of a text node in a content model" href="ref-textNode.html">textNode</a> <a class="link_odd" title="(value) contains a single attribute value." href="ref-val.html">val</a> <a class="link_odd" title="(value description) specifies any semantic or syntactic constraint on the value that an attribute may take, additional to the information carried by the &lt;datatype&gt; element." href="ref-valDesc.html">valDesc</a> <a class="link_odd" title="documents a single value in a predefined list of values." href="ref-valItem.html">valItem</a> <a class="link_odd" title="(value list) contains one or more &lt;valItem&gt; elements defining possible values." href="ref-valList.html">valList</a></li><li><span lang="en">Classes defined</span>: <a class="link_odd" title="provides attributes indicating how multiple references to the same object in a schema should be combined" href="ref-att.combinable.html">att.combinable</a> <a class="link_odd" title="provides attributes indicating how a deprecated feature will be treated in future releases." href="ref-att.deprecated.html">att.deprecated</a> <a class="link_odd" title="provides the identifying attribute for elements which can be subsequently referenced by means of a @key attribute." href="ref-att.identified.html">att.identified</a> <a class="link_odd" title="provides an attribute indicating the target namespace for an object being created" href="ref-att.namespaceable.html">att.namespaceable</a> <a class="link_odd" title="supplies attributes for the elements which define component parts of a content model." href="ref-att.repeatable.html">att.repeatable</a> <a class="link_odd" title="groups elements which may appear as part of the content element." href="ref-model.contentPart.html">model.contentPart</a></li><li><span lang="en">Macros defined</span>: <a class="link_odd" title="" href="ref-macro.schemaPattern.html">macro.schemaPattern</a></li></ul></dd></dl><p> The selection and combination of modules to form a TEI schema is described in <a class="link_ptr" href="ST.html#STIN" title="Defining a TEI Schema"><span class="headingNumber">1.2 </span>Defining a TEI Schema</a>.</p><p>The elements described in this chapter are all members of one of three classes: <a class="link_odd" title="groups elements which generate declarations in some markup language in ODD documents." href="ref-model.oddDecl.html">model.oddDecl</a>, <a class="link_odd" title="groups elements which reference declarations in some markup language in ODD documents." href="ref-model.oddRef.html">model.oddRef</a>, or <a class="link_odd" title="groups phrase-level elements used to encode XML constructs such as element names, attribute names, and attribute values" href="ref-model.phrase.xml.html">model.phrase.xml</a>, with the exceptions of <a class="gi" title="(schema specification) generates a TEI-conformant schema and documentation for it." href="ref-schemaSpec.html">schemaSpec</a> (a member of <a class="link_odd" title="groups paragraph-level elements appearing directly within divisions." href="ref-model.divPart.html">model.divPart</a>) and both <a class="gi" title="(example) contains any kind of illustrative example." href="ref-eg.html">eg</a> and <a class="gi" title="(example of XML) a single XML fragment demonstrating the use of some XML, such as elements, attributes, or processing instructions, etc., in which the &lt;egXML&gt; element functions as the root element." href="ref-egXML.html">egXML</a> (members of <a class="link_odd" title="groups common chunk- and inter-level elements." href="ref-model.common.html">model.common</a> and <a class="link_odd" title="groups elements containing examples or illustrations." href="ref-model.egLike.html">model.egLike</a>). All of these classes are declared along with the other general TEI classes, in the basic structure module documented in <a class="link_ptr" href="ST.html" title="3"><span class="headingNumber">1 </span>The TEI Infrastructure</a>.</p><p>In addition, some elements are members of the <a class="link_odd" title="provides the identifying attribute for elements which can be subsequently referenced by means of a @key attribute." href="ref-att.identified.html">att.identified</a> class, which is documented in <a class="link_ptr" href="TD.html#TDbuild" title="TEI customizations"><span class="headingNumber">22.8.1 </span>TEI customizations</a> above, and make use of the <code>macro.schemaPattern</code> pattern, which is documented in <a class="link_ptr" href="TD.html#TDTAG" title="Element Specifications"><span class="headingNumber">22.5 </span>Element Specifications</a> above.</p></div></div><nav class="left"><span class="upLink"> ↑ </span><a class="navigation" href="index.html">TEI P5 Guidelines</a><span class="previousLink"> « </span><a class="navigation" href="CE.html"><span class="headingNumber">21 </span>Certainty, Precision, and Responsibility</a><span class="nextLink"> » </span><a class="navigation" href="USE.html"><span class="headingNumber">23 </span>Using the TEI</a></nav><!--Notes in [div]--><div class="notes"><div class="noteHeading">Notes</div><div class="note" id="Note124"><span class="noteLabel">87 </span><div class="noteBody">ODD is short for <span class="q">‘One Document Does it all’</span>, and was the name invented by the original TEI Editors for the predecessor of the system currently used for this purpose. See further <a class="link_ptr" href="BIB.html#Burnard1995b" title="Lou Burnard C. Michael SperbergMcQueen The Design of the TEI Encoding Scheme10.1007BF01830314Computers and the Humanities291199...">Burnard and Sperberg-McQueen (1995)</a> and <a class="link_ptr" href="BIB.html#TD-BIBL-01" title="Lou Burnard Sebastian Rahtz RelaxNG with Son of ODDProceedings of Extreme Markup Languages 20042004">Burnard and Rahtz (2004)</a>.</div> <a class="link_return" title="Go back to text" href="#Note124_return">↵</a></div><div class="note" id="Note125"><span class="noteLabel">88 </span><div class="noteBody">The distinction between base and additional tagsets in earlier versions of the TEI scheme has not been carried forward into P5.</div> <a class="link_return" title="Go back to text" href="#Note125_return">↵</a></div></div><div class="stdfooter autogenerated"><p>
    [<a href="../../en/html/TD.html">English</a>]
    [<a href="../../de/html/TD.html">Deutsch</a>]
    [<a href="../../es/html/TD.html">Español</a>]
    [<a href="../../it/html/TD.html">Italiano</a>]
    [<a href="../../fr/html/TD.html">Français</a>]
    [<a href="../../ja/html/TD.html">日本語</a>]
    [<a href="../../ko/html/TD.html">한국어</a>]
    [<a href="../../zh-TW/html/TD.html">中文</a>]
    </p><hr /><div class="footer"><a class="plain" href="http://www.tei-c.org/About/">TEI Consortium</a> | <a class="plain" href="http://www.tei-c.org/About/contact.xml">Feedback</a></div><hr /><address><br />TEI Guidelines <a class="link_ref" href="AB.html#ABTEI4">Version</a> <a class="link_ref" href="../../readme-3.1.1.html">3.1.1a</a>. Last updated on <span class="date">10th May 2017</span>, revision <a class="link_ref" href="https://github.com/TEIC/TEI/commit/bd8dda3">bd8dda3</a>. This page generated on 2017-05-12T12:30:09Z.</address></div></div></body></html>
back to top