Computed values

From W3C Wiki
Jump to: navigation, search

Computed values (a co-constraint use case)

Make names and default values of attributes depend dynamically on functions which are called if certain conditions are true.


Other use cases: Co-constraint Use Cases

Description

source: Anand Awasthi [1]

   ... If I define my schema like following:


    <attributeGroup name="trigger-attribute-group">
    <attribute name="XYZ()" value=" ((X < 20) && (Y > 400)) || (Z == 45) "/>
    <attribute name="ABC()" value="MAX(J:TT)  ==  20"/>
    </attributeGroup>


   I want functions XYZ()/ABC() to be triggered 
   if the condition in the value
   attribute is true....

Analysis

(Add your analysis here; see your name in pixels!)

Possible solutions

Relax NG

Schematron

Check clause

SchemaPath

Conditional Type