<constraintSpec>

<constraintSpec> contains a constraint, expressed in some formal syntax, which cannot be expressed in the structural content model [22.4.4 Element Specifications]
Modultagdocs — Documentation Elements
Attributeatt.global (@xml:id, @n, @xml:lang, @rend, @style, @rendition, @xml:base, @xml:space) (att.global.linking (@corresp, @synch, @sameAs, @copyOf, @next, @prev, @exclude, @select)) (att.global.analytic (@ana)) (att.global.facs (@facs)) (att.global.change (@change)) att.identified (@ident, @predeclare, @module, @status) (att.combinable (@mode) (att.deprecated (@validUntil)) ) att.typed (@type, @subtype)
schemesupplies the name of the language in which the constraints are defined
Zustand Obligatorisch
Datentyp

<rng:ref name="data.enumerated"/>
data.enumerated
Gültige Werte:
schematron
isoschematron
xsl
private
Mitglied des
Enthalten in
Kann enthalten
Deklaration

<rng:element name="constraintSpec">
 <rng:ref name="att.global.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.identified.attributes"/>
 <rng:ref name="att.combinable.attributes"/>
 <rng:ref name="att.deprecated.attributes"/>
 <rng:ref name="att.typed.attributes"/>
 <rng:attribute name="scheme">
  <rng:choice>
   <rng:value>schematron</rng:value>
   <rng:value>isoschematron</rng:value>
   <rng:value>xsl</rng:value>
   <rng:value>private</rng:value>
  </rng:choice>
 </rng:attribute>
 <rng:zeroOrMore>
  <rng:choice>
   <rng:ref name="model.glossLike"/>
   <rng:ref name="model.descLike"/>
  </rng:choice>
 </rng:zeroOrMore>
 <rng:optional>
  <rng:ref name="constraint"/>
 </rng:optional>
</rng:element>
element constraintSpec
{
   att.global.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   att.identified.attributes,
   att.combinable.attributes,
   att.deprecated.attributes,
   att.typed.attributes,
   attribute scheme { "schematron" | "isoschematron" | "xsl" | "private" },
   ( model.glossLike | model.descLike )*,
   constraint?
}
SchematronRelationship between scheme attribute and contents

<sch:ns prefix="suri="http://www.ascc.net/xml/schematron"/>
<sch:report
 test="tei:constraint/s:* and not(@scheme='schematron')">
Rules in the Schematron 1.* language must be inside
a constraintSpec with a value of 'schematron' on the scheme attribute
</sch:report>
Schematron

<sch:ns prefix="schuri="http://purl.oclc.org/dsdl/schematron"/>
<sch:report
 test="tei:constraint/sch:* and not(@scheme='isoschematron')">
Rules in the ISO Schematron language must be inside
a constraintSpec with a value of 'isoschematron' on the scheme attribute
</sch:report>
Schematron

<sch:ns prefix="schuri="http://purl.oclc.org/dsdl/schematron"/>
<sch:rule
 context="tei:macroSpec/tei:constraintSpec[@scheme='isoschematron']/tei:constraint">

<sch:report test="sch:assert|sch:report">An ISO Schematron constraint specification for a macro should not have an 'assert' or 'report' element without a parent 'rule' element</sch:report></sch:rule>
Beispiel

This constraint uses Schematron to enforce the presence of the spanTo attribute (which comes from an attribute class) on the addSpan element:

<constraintSpec ident="demo-c1scheme="isoschematron">
 <desc>Enforce the presence of the <att>spanTo</att> attribute</desc>
 <constraint>
  <sch:assert test="@spanTo">The spanTo= attribute of <sch:name/>
     is required.</sch:assert>
 </constraint>
</constraintSpec>
Beispiel
<constraintSpec ident="demo-c2scheme="isoschematron">
 <desc>Implement an accessibility rule which says that pictures should
   have textual explanations</desc>
 <constraint>
  <sch:report test="not(tei:figDesc or tei:head)"> You should
     provide information in a figure from which
     we can construct an alt attribute in HTML </sch:report>
 </constraint>
</constraintSpec>
Beispiel

This constraint uses a language which is not expressed in XML to check whether the title and author are identical:

<constraintSpec ident="localscheme="private">
 <constraint>
   (output = leq(title,author) "title and author cannot be the same")
 </constraint>
</constraintSpec>