<content>

<content> (modèle de contenu) contient la déclaration d'un modèle de contenu pour le schéma documenté. [22.5 Element Specifications]
Module tagdocs — Documentation Elements
Attributs
autoPrefix⚓︎ controls whether or not pattern names generated in the corresponding RELAX NG schema source are automatically prefixed to avoid potential nameclashes.
Statut Optionel
Type de données teidata.truthValue
Les valeurs autorisées sont:
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 [Valeur par défaut]
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.
Contenu dans
Peut contenir ANY
Exemple

Ce modèle de contenu permet d'introduire une suite de paragraphes ou une suite d'éléments msItem précédés éventuellement d'un résumé :

<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>
Schematron A temporary constraint to give users a warning that in the future the content of content will be restricted to 1 and only 1 child element.

<sch:rule context="tei:content[ *[2] ]">
<sch:let name="tot_kidsvalue="count( * )"/>
<sch:let name="tei_kids"
 value="count( tei:* )"/>

<sch:let name="rng_kids"
 value="count( rng:* | rna:* )"/>

<sch:let name="msg_part01"
 value="'In the near future the <content> element will be limited to 1 and only 1 child element. '"/>

<sch:let name="msg_part02"
 value="'This <content> element is in '"/>

<sch:let name="msg_part03"
 value="if ( local-name(..) eq 'elementSpec' ) then 'an ' else 'a '"/>

<sch:let name="msg_part04"
 value="concat( local-name(..), ' with ' )"/>

<sch:let name="msg_part05"
 value="if ( parent::tei:moduleRef/@key ) then 'a @key' else ''"/>

<sch:let name="msg_part06"
 value="if ( parent::tei:moduleRef/@url ) then 'a @url' else ''"/>

<sch:let name="msg_part07"
 value="if ( parent::tei:*/@ident ) then 'an @ident' else ''"/>

<sch:let name="msg_part08value="' of "'"/>
<sch:let name="msg_part09"
 value="../@ident | ../@key | ../@url"/>

<sch:let name="msg_part10"
 value="concat('" and has ', $tot_kids, ' children,')"/>

<sch:let name="msgs_1to10"
 value="concat( $msg_part01, $msg_part02, $msg_part03, $msg_part04, $msg_part05, $msg_part06, $msg_part07, $msg_part08, $msg_part09, $msg_part10 )"/>

<sch:report test="$tei_kids eq $tot_kids"
 role="warning">

 <sch:value-of select="$msgs_1to10"/> which could be wrapped in a <sequence> element.
</sch:report>
<sch:report test="$rng_kids eq $tot_kids"
 role="warning">

 <sch:value-of select="$msgs_1to10"/> which could be wrapped in an <rng:div> element.
</sch:report>
<sch:assert test="$tei_kids eq $tot_kids or $rng_kids eq $tot_kids"
 role="warning">

 <sch:value-of select="$msgs_1to10"/> but those children are neither all TEI elements nor
all RELAX NG elements, and thus this <content> is invalid and can not be easily rectified.
</sch:assert>
</sch:rule>
Modèle de contenu
<content>
 <alternate>
  <elementRef key="valListminOccurs="1"
   maxOccurs="1"/>

  <classRef key="model.contentPart"
   minOccurs="1maxOccurs="unbounded"/>

  <anyElement minOccurs="1"
   maxOccurs="unbounded"
   require="http://relaxng.org/ns/compatibility/annotations/1.0 http://relaxng.org/ns/structure/1.0"/>

 </alternate>
</content>
Schéma 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:ref name="att.global.source.attributes"/>
 <rng:optional>
  <rng:attribute name="autoPrefix"
   a:defaultValue="true">

   <rng:choice>
    <rng:value>true</rng:value>
    <rng:value>false</rng:value>
   </rng:choice>
  </rng:attribute>
 </rng:optional>
 <rng:choice>
  <rng:ref name="valList"/>
  <rng:oneOrMore>
   <rng:ref name="model.contentPart"/>
  </rng:oneOrMore>
  <rng:oneOrMore>
   <rng:ref name="anyElement_content_3"/>
  </rng:oneOrMore>
 </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,
   att.global.source.attributes,
   attribute autoPrefix { "true" | "false" }?,
   ( valList | model.contentPart+ | anyElement_content_3+ )
}