Skip to content

<constraintDecl>

constraint declaration

contains declarations pertaining to formal constraints expressed elsewhere in constraintSpec elements

Module tagdocsTDTAGCONS

Attributes

@schemesupplies the name of the language to which the declarations herein apply
Status
Required
Datatype
teidata.enumerated
Suggested values
schematron
(ISO Schematron)
@queryBindingspecifies 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
exslt
stx
xslt
xslt2
xslt3
xpath
xpath2
xpath3
xpath31
xquery
xquery3
xquery31

Classes and content

Member of
May contain

tagdocs

Contained by

tagdocs

Example

<constraintDecl scheme="schematron" queryBinding="xslt3">
  <sch:ns prefix="wwp" uri="http://www.wwp.northeastern.edu/ns/textbase"/>
</constraintDecl>

Schematron

<constraintSpec xmlns:sch="http://purl.oclc.org/dsdl/schematron" scheme="schematron" ident="one-constraintDecl-per-scheme" xml:lang="en">
    
    <constraint>
      <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 &lt;constraintDecl&gt; element should have a @scheme attribute that is distinct from that of all the other &lt;constraintDecl&gt;s.
        </sch:assert>
      </sch:rule>
    </constraint>
  </constraintSpec>

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>