Value-equals test required, constraint on grandchild

From W3C Wiki
Jump to: navigation, search

Value-equals test required, constraint on grandchild (a co-constraint use case)

A given element does not occur (is no longer optional but forbidden), if the value of another element -- a left-sibling of its parent, in the example here -- is equal to a given constant.

Cf. Value equality - and null/non-null, which has a similar scenario but does not specify the relation of the controlling element to the controlled element (here: aunt to niece). Cf. also Value equality - and children of following sibling, which appears to be essentially the same as this use case.

source: San Coulibaly [1]

Other use cases: Co-constraint Use Cases


   A XML-Instance:


   Now, I want to generate, if A=10, then element D in C does
   not appear!


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

Possible solutions

Relax NG


Check clause


Conditional Type