Type-list.odd

This ODD demonstrates how to replace an attribute that a TEI element inherits from a class with a locally defined one, e.g., to add a controlled vocabulary. In this case, the type= attribute of &lt;div> is modified.

     Sample ODD for Constraining type of div  Syd Bauman   Intended for publication as an example TEI P5 customization on TEI Wiki © 2010 Syd Bauman and Brown University Women Writer's       Project. Available under the GFDL.   Born digital, based on the WWP EMPB schema. </sourceDesc> </fileDesc> </teiHeader> <divGen type="toc"/> Introduction This TEI ODD file (and thus the derived schema or reference documentation you may be         reading) is the technical specification of a toy schema that exists just to demonstrate how one constrains the value of an attribute that is normally inherited from a class. Modifying the definition of an attribute on a given element when that element normally inherits that attribute from a class is a bit tricky. The main <soCalled>gotcha</soCalled> is that we     intuitively expect the mode attribute of      classes</gi> to be inherited from its parent elementSpec</gi>. But classes</gi> has its own mode attribute (rather than inheriting it from <name     type="class">att.combinable ), for which the default value is replace. Thus we need to specify classes mode="change". <schemaSpec ident="div-type-list" xml:lang="en" prefix="dtl_" start="teiCorpus TEI text body div1"> <moduleRef key="tei"/> <moduleRef key="header"/> <moduleRef key="core"/> <moduleRef key="textstructure"/>

<elementSpec ident="div" module="core" mode="change"> <memberOf key="att.typed" mode="delete"/> <attList> <attDef ident="type" mode="replace" usage="req"> <datatype minOccurs="1" maxOccurs="1"> <rng:ref name="data.enumerated"/> <valList type="semi"> <valItem ident="tst1"> test one a boring test string </valItem> <valItem ident="tst2"> test two another boring test string </valItem> <valItem ident="tst3"> test three yet another boring test string </valItem> </valList> </attDef> </attList> </elementSpec>

</schemaSpec> </TEI>