Element list for ODD
author: Julia Flanders; Syd Bauman; James Cummings
language: en-US

This is a brief reference sheet listing the most essential elements used in writing a TEI ODD file.

Ordered by Function

High-level ODD Structures

<schemaSpec>
- The element that contains the formal schema specifications within the ODD file. All the schema customization elements listed below are children of <schemaSpec>.
@ident
- Used on <schemaSpec> indicates the name of the schema that will be created; required by roma.
<moduleRef>
- A reference to a TEI module (i.e. a grouping of elements representing a single chapter of the TEI Guidelines), by which the module is included in the custom schema.
@key
- Used on <moduleRef>, gives the short name of the module to be included
@except
- Used on <moduleRef>, lists which elements from the module which should not be included
@include
- Used on <moduleRef>, lists which elements from the module should be included (thus excluding all others)
@mode
- Used on almost all ODD elements, indicates the nature of the change being made in relation to unmodified TEI:

- "add" indicates that the feature in question originates with the customization and is additional to the unmodified TEI schema
- "delete" indicates that the feature in question is being deleted from the custom schema
- "change" indicates that the feature in question is being changed in some detail, and that the changed portion should override the corresponding portion of the unmodified TEI schema, leaving other portions unchanged
- "replace" indicates that the feature in question is being completely changed, and that the portion designated in the custom schema should entirely replace the specification for that feature in the unmodified TEI

Element Management

<elementSpec>
- A specification of a single element in the schema, which can be used to delete an element from an included module (with mode="delete") or to modify some aspect of the element's definition (with mode="change" or mode="replace").
@module
- Used with <elementSpec>, indicates the module in which the element in question is defined.
@ident
- Used with <elementSpec>, indicates the name of the element in question
<altIdent>
- Used inside <elementSpec> to change the name of an element; indicates the new name by which the element being specified will be known in the custom schema
<classes>
- Used within <elementSpec> (or <classSpec>) to change the class membership of the element (or class). Contains one or more <memberOf> elements which, by means of their @key attributes, indicate the specific classes to which the element (or class) is being added or from which it is being deleted.
<memberOf>
- Designates a specific model class to which an element is being added, or from which it is being deleted.
@key
- used on <memberOf>, contains the name of the class being designated.
@mode
- used on <memberOf>, with value "add", indicates that the element is being added to the class designated by the <memberOf> element.
<content>
- Contains the content model for an element in RELAX NG (XML syntax) or Pure ODD elements, for which see “Content”, below
<constraintSpec>
- Contains a further syntactic constraint, typically expressed in ISO Schematron.

Content

<elementRef>
- A reference to an element (typically a TEI element, but perhaps one you've added in your customization), indicating that it is permitted or required at this point
@key
- used on <elementRef>, indicates the element being refered to.
@minOccurs
- indicates the smallest number of times the indicated element may occur at this point (default is 1).
@maxOccurs
- indicates the largest number of times the indicated element may occur at this point (default is "unbounded", i.e. an infinite number of times).
<classRef>
- A reference to an entire model class, all of whose members may (or must) occur at this point
@key
- used on <classRef>, indicates the model class being referred to.
@include
- used on <classRef>, indicates which members of the model class are being referred to
@except
- used on <classRef>, indicates which members of the model class are not being referred to
<textNode>
- Used to indicate that a string of zero or more characters is allowed at this point.
<sequence>
- Indicates that each of the items referred to by the references inside must occur; if preserveOrder="true" then furthermore they must occur in the order specified
<alternate>
- Indicates that only one of the items referred to by the references inside must occur (the number of times a selected alternate must occur is specified by @minOccurs and @maxOccurs

Attribute Management

<attList>
- A list of attribute definitions; used to contain the <attDef> elements that are used to add, delete, or modify the attributes for an element.
<attDef>
- Used to designate an attribute that is being added, deleted, or modified.
@ident
- Used on <attDef>, indicates the name of the attribute in question.
<valList>
- A list of values for an attribute (used to add or alter a set of constrained values).
<valItem>
- A single value in a value list for an attribute.
<datatype>
- Contains a reference to a TEI datatype, used when constraining the contents of an element or attribute value.
<constraintSpec>
- Contains a further syntactic constraint, typically expressed in ISO Schematron.

Schema Documentation and Management

<gloss>
- Used inside <elementSpec>, <attDef>, and <valItem> to provide the full natural-language equivalent of the name (i.e. @ident) of the construct. E.g., the <gloss> for <elementSpec ident="att"> is “attribute” (as opposed to “attention”)
<desc>
- Used inside <elementSpec>, <attDef>, and <valItem> to document the new or altered element, attribute, or attribute value.
<exemplum>
- Contains an example of usage of the attribute (in <attDef>), class (in <classSpec>), element (in <elementSpec>), or macro (in <macroSpec>) along with optional commentary
<remarks>
- Contains commentary or discussion about usage of the attribute (in <attDef>), class (in <classSpec>), element (in <elementSpec>), or macro (in <macroSpec>)
<classSpec>
- A specification of a TEI class (either a model class or an attribute class); often used (with a @mode of "change") to change the membership of an attribute class
<macroSpec>
- A specification of a TEI datatype or a chunk of arbitrary RELAX NG code

Processing Model Documentation

<model>
- Documents potential processing for a specified element
@behaviour
- Names the process or function which this processing model uses in order to produce output
@predicate
- The XPath predicate expression giving the condition under which this model applies
@useSourceRendition
- Whether to obey any rendition attribute which is present (by default no)
<outputRendition>
- Description of the rendering of this element (in selected context)
<modelGrp>
- A grouping of <model> elements with common output
<modelSequence>
- A sequence of <model> elements intended as a single set of actions

Copyleft 2010 Syd Bauman and Julia Flanders; source available at http://www.wwp.neu.edu/outreach/seminars/_current/handouts/elementList_odd.tei.