<content>

<content> (content model) contains the text of a declaration for the schema documented. [22.4.4 Element Specifications]
Moduletagdocs — Documentation Elements
Attributesatt.global (@xml:id, @n, @xml:lang, @xml:base, @xml:space) (att.global.rendition (@rend, @style, @rendition)) (att.global.linking (@corresp, @synch, @sameAs, @copyOf, @next, @prev, @exclude, @select)) (att.global.analytic (@ana)) (att.global.facs (@facs)) (att.global.change (@change)) (att.global.responsibility (@cert, @resp))
autoPrefixcontrols whether or not pattern names generated in the corresponding Relax NG schema source are automatically prefixed to avoid potential nameclashes.
Status Optional
Datatype

<rng:ref name="data.truthValue"/>
data.truthValue
Legal values are:
true
Each name referenced in e.g. a <rng:ref> element within a content model is automatically prefixed by the value of the prefix attribute on the current schemaSpec [Default]
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.
Contained by
May containANY
Declaration

<rng:element name="content">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.rendition.attributes"/>
 <rng:ref name="att.global.linking.attributes"/>
 <rng:ref name="att.global.analytic.attributes"/>
 <rng:ref name="att.global.facs.attributes"/>
 <rng:ref name="att.global.change.attributes"/>
 <rng:ref name="att.global.responsibility.attributes"/>
 <rng:optional>
  <rng:attribute name="autoPrefix"
   a:defaultValue="true">

   <xhtml:dl class="valList"/>
  </rng:attribute>
 </rng:optional>
 <rng:choice>
  <rng:group>
   <rng:ref name="valList"/>
  </rng:group>
  <rng:oneOrMore>
   <rng:ref name="macro.anyXML"/>
  </rng:oneOrMore>
  <rng:zeroOrMore>
   <rng:ref name="model.contentPart"/>
  </rng:zeroOrMore>
 </rng:choice>
</rng:element>
element content
{
   att.global.attributes,
   att.global.rendition.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   att.global.responsibility.attributes,
   attribute autoPrefix { text }?,
   ( ( valList ) | macro.anyXML+ | model.contentPart* )
}
Example

This content element indicates that the element being specified has no content:

<content/>
Example

This content element defines a content model allowing either a sequence of paragraphs or a series of msItem elements optionally preceded by a summary:

<content>
 <alternate>
  <classRef key="model.pLike"
   maxOccurs="unbounded"/>

  <sequence>
   <elementRef key="summaryminOccurs="0"
    maxOccurs="1"/>

   <elementRef key="msItem"
    maxOccurs="unbounded"/>

  </sequence>
 </alternate>
</content>
Example

This content model defines a content model allowing either a sequence of paragraphs or a series of msItem elements optionally preceded by a summary:

<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>
</content>
Note

As the example shows, content models may be expressed using the RELAX NG syntax directly. To avoid ambiguity when schemas using elements from different namespaces are created, the name supplied for an element in a content model will be automatically prefixed by a short string, as specified by the prefix attribute on schemaSpec. The autoPrefix attribute may be used to reverse this behaviour.

The macro macro.schemaPattern defines which elements may be used to define content models. Alternatively, a content model may be expressed using the TEI valList element.