I have a problem when I try to validate an attribute that depends on
another.
Let's suppose I have a XSD model in which attribute A of type double has a
valid range of values that depends on the value of another attribute B,
also double. Let's say that the range of values of A is 0.5*value(B) ...
1.5*value(B). I need a 'live' validation of the attribute as is done on
the generated editor.
The generated Validator simply checks the range of A against fixed values
specified using minInclusive and maxInclusive. I wish to modify the
generated validateA (or validateA_Min/Max) method to take account of the
dependency. The trouble is that I don't know how to access the EObject
instance being validated because the methods are called with just a
double parameter. I thought that the context parameter will be useful but
I couldn't get the instance reference from it.
Are there any simple trick to do such a validation?