<constraintDecl>

<constraintDecl> (constraint declaration) contains declarations pertaining to formal constraints expressed elsewhere in constraintSpec elements [23.5.2 Additional Constraints]
Modulo tagdocs — Documentation Elements
Attributi
scheme⚓︎ supplies the name of the language to which the declarations herein apply
Stato Richiesto
Tipo di dati teidata.enumerated
I valori suggeriti includono:
schematron
(ISO Schematron)
queryBinding⚓︎ (query language binding) specifies the query language binding for rule-based schema expressions in constraintSpec elements that have a matching scheme attribute
Stato Consigliato
Tipo di dati teidata.enumerated
I valori suggeriti includono:
exslt
stx
xslt
xslt2
xslt3
xpath
xpath2
xpath3
xpath31
xquery
xquery3
xquery31
Membro del
Contenuto in
header: encodingDesc
tagdocs: schemaSpec
Può contenere ANY
Esempio
<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>
Dichiarazione
<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* )
}