<constraint>

<constraint> (constraint rules) the formal rules of a constraint [22.5 Element Specifications]
組件 tagdocs — Documentation Elements
屬性
可包含在於
可包含 ANY
例子
<constraintSpec ident="isoconstraint"
 scheme="schematron">

 <constraint>
  <sch:assert test="tei:fileDesc/tei:titleStmt/tei:title[@type='main']"> a main title must be supplied
  </sch:assert>
 </constraint>
</constraintSpec>
例子
<constraintSpec ident="local"
 scheme="private">

 <constraint>
   (output = (ident(title) ident(author) "You must supply a title or an author"))
 </constraint>
</constraintSpec>
Content model
<content>
 <alternate minOccurs="0"
  maxOccurs="unbounded">

  <textNode/>
  <anyElement/>
 </alternate>
</content>
宣告
<rng:element name="constraint">
 <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:zeroOrMore>
  <rng:choice>
   <rng:text/>
   <rng:ref name="anyElement_constraint_4"/>
  </rng:choice>
 </rng:zeroOrMore>
</rng:element>
element constraint
{
   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,
   ( text | anyElement_constraint_4 )*
}