<content>
content model
contains a declaration of the intended content model for the element (or other construct) being specified.
Attributes
- @autoPrefixcontrols whether or not pattern names generated in the corresponding RELAX NG schema source are automatically prefixed to avoid potential nameclashes.
- Status
- Datatype
- teidata.truthValue
- Legal values
true- Each name referenced in e.g. an rng:ref element within a content model is automatically prefixed by the value of the @prefix attribute on the current schemaSpec
false- No prefixes are added: any prefix required by the value of the @prefix attribute on the current schemaSpec must therefore be supplied explicitly, as appropriate.
Classes and content
- May contain
- Contained by
Note
It is required that the content element has only one child element. If several RELAX NG elements are desired, they must be wrapped in a rng:div.
Examples
This sample content element indicates that the element being specified has no content:
<teix:content>
<teix:empty/>
</teix:content>
This content element defines a content model, expressed directly in the TEI ODD language, that allows either a sequence of paragraphs or a series of msItem elements optionally preceded by a summary:
<teix:content>
<teix:alternate>
<teix:classRef key="model.pLike" maxOccurs="unbounded"/>
<teix:sequence>
<teix:elementRef key="summary" minOccurs="0" maxOccurs="1"/>
<teix:elementRef key="msItem" maxOccurs="unbounded"/>
</teix:sequence>
</teix:alternate>
</teix:content>
This sample content element defines a content model, expressed in the RELAX NG schema language, that allows either a sequence of paragraphs or a series of msItem elements optionally preceded by a summary:
<teix:content>
<rng:choice>
<rng:oneOrMore>
<rng:ref name="model.pLike"/>
</rng:oneOrMore>
<rng:group>
<rng:optional>
<rng:ref name="summary"/>
</rng:optional>
<rng:oneOrMore>
<rng:ref name="msItem"/>
</rng:oneOrMore>
</rng:group>
</rng:choice>
</teix:content>
Content model
<content>
<alternate>
<elementRef key="valList" minOccurs="1" maxOccurs="1"/>
<classRef key="model.contentPart" minOccurs="1" maxOccurs="1"/>
<anyElement minOccurs="1" maxOccurs="1" require="http://relaxng.org/ns/compatibility/annotations/1.0 http://relaxng.org/ns/structure/1.0"/>
</alternate>
</content>