<constraintDecl>

<constraintDecl> (constraint declaration) contains declarations pertaining to formal constraints expressed elsewhere in constraintSpec elements [23.5.2 Additional Constraints]
Module tagdocs — Documentation Elements
Attributes
scheme⚓︎ supplies the name of the language to which the declarations herein apply
Status Required
Datatype teidata.enumerated
Suggested values include:
schematron
(ISO Schematron)
Note

The declarations contained in a particular constraintDecl (including queryBinding, if present) apply to the constraintSpec elements whose scheme matches the scheme of the constraintDecl.

queryBinding⚓︎ (query language binding) specifies the query language binding for rule-based schema expressions in constraintSpec elements that have a matching scheme attribute
Status Recommended
Datatype teidata.enumerated
Suggested values include:
exslt
stx
xslt
xslt2
xslt3
xpath
xpath2
xpath3
xpath31
xquery
xquery3
xquery31
Note

The suggested values above are the values reserved by the Schematron specification. Only exslt, stx, xslt, xslt2, xslt3, xpath2, and xpath3 are defined by the specification. Most processors only support one or more of xslt, xslt2, and xslt3.

Member of
Contained by
header: encodingDesc
tagdocs: schemaSpec
May contain ANY
Example
<constraintDecl scheme="schematron"
 queryBinding="xslt3">

 <sch:ns prefix="wwp"
  uri="http://www.wwp.northeastern.edu/ns/textbase"/>

</constraintDecl>
Schematron

<sch:rule context="/*[ count( //tei:constraintDecl ) gt 1 ]">
<sch:let name="schemes"
 value="//tei:constraintDecl[ not(ancestor::*[local-name(.) eq 'egXML'] ) ]/@scheme"/>

<sch:let name="disctinct_schemes"
 value="distinct-values( $schemes )"/>

<sch:assert test="count( $schemes ) eq count( $disctinct_schemes )"> Each <constraintDecl> element should have a @scheme attribute that is distinct from that of all the other <constraintDecl>s.
</sch:assert>
</sch:rule>
Content model
<content>
 <sequence>
  <alternate minOccurs="0"
   maxOccurs="unbounded">

   <classRef key="model.identEquiv"/>
   <classRef key="model.descLike"/>
  </alternate>
  <anyElement minOccurs="0"
   maxOccurs="unbounded"/>

 </sequence>
</content>
Schema Declaration
<rng:element name="constraintDecl">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.analytic.attributes"/>
 <rng:ref name="att.global.change.attributes"/>
 <rng:ref name="att.global.facs.attributes"/>
 <rng:ref name="att.global.linking.attributes"/>
 <rng:ref name="att.global.rendition.attributes"/>
 <rng:ref name="att.global.responsibility.attributes"/>
 <rng:ref name="att.global.source.attributes"/>
 <rng:attribute name="scheme">
  <rng:choice>
   <rng:value>schematron</rng:value>
   <rng:ref name="teidata.enumerated"/>
  </rng:choice>
 </rng:attribute>
 <rng:optional>
  <rng:attribute name="queryBinding">
   <rng:choice>
    <rng:value>exslt</rng:value>
    <rng:value>stx</rng:value>
    <rng:value>xslt</rng:value>
    <rng:value>xslt2</rng:value>
    <rng:value>xslt3</rng:value>
    <rng:value>xpath</rng:value>
    <rng:value>xpath2</rng:value>
    <rng:value>xpath3</rng:value>
    <rng:value>xpath31</rng:value>
    <rng:value>xquery</rng:value>
    <rng:value>xquery3</rng:value>
    <rng:value>xquery31</rng:value>
    <rng:ref name="teidata.enumerated"/>
   </rng:choice>
  </rng:attribute>
 </rng:optional>
 <rng:group>
  <rng:zeroOrMore>
   <rng:choice>
    <rng:ref name="model.identEquiv"/>
    <rng:ref name="model.descLike"/>
   </rng:choice>
  </rng:zeroOrMore>
  <rng:zeroOrMore>
   <rng:ref name="anyElement_constraintDecl_4"/>
  </rng:zeroOrMore>
 </rng:group>
</rng:element>
element constraintDecl
{
   att.global.attributes,
   att.global.analytic.attributes,
   att.global.change.attributes,
   att.global.facs.attributes,
   att.global.linking.attributes,
   att.global.rendition.attributes,
   att.global.responsibility.attributes,
   att.global.source.attributes,
   attribute scheme { "schematron" | teidata.enumerated },
   attribute queryBinding
   {
      "exslt"
    | "stx"
    | "xslt"
    | "xslt2"
    | "xslt3"
    | "xpath"
    | "xpath2"
    | "xpath3"
    | "xpath31"
    | "xquery"
    | "xquery3"
    | "xquery31"
    | teidata.enumerated
   }?,
   ( ( model.identEquiv | model.descLike )*, anyElement_constraintDecl_4* )
}