RE: isValid and pertinent subgraph

Hi Ray,

No, you haven't missed the main gist of things, and yes the
recalculation algorithm is designed to work on isValid and other
recalculable properties.  Note at the beginning of the recalculation
algorithm section that it says "A vertex is created for each model item
and model item property".  So, you will have vertices to represent the
content (text value), readOnly, relevant, required and isValid state of
a given XML node of instance data.

The vertex representation does need a tweak to help make this point,
which should be fixed in the next draft.  Each vertex also needs a
'type' to distinguish what aspect of an XML node is being represented by
the vertex.  Originally, I had thought that the current values of model
item properties would be represented by XForms attributes in the
instance data.  This idea doesn't hold up if you consider bindings to
attribute nodes in the instance data, although it remains unfortunate
that the values of properties are not preserved anywhere.  Anyway, the
XMLNode for each vertex will be one of the actual nodes referred to by
the ref attribute in the bind, and a type setting will be used to
indicate whether the calculation represented by the vertex comes from
isValid, calculation, etc.  Also, note that some vertices are not
calculated by exist because, as model items, they can be referred to by
expressions (indeed, an implementation need not create vertices for
nodes that are not actually referenced by an expression).

Hope this helps, and the tweaks should be along soon.

Cheers,
John Boyer


http://lists.w3.org/Archives/Public/www-forms/2001Oct/0028.html

-----Original Message-----
From: Ray Cromwell [mailto:ray_cromwell@yahoo.com]
Sent: Friday, October 19, 2001 5:55 PM
To: www-forms-request@w3.org; www-forms@w3.org
Subject: isValid and pertinent subgraph



When performing revalidation, don't you have to obey
the pertinent subgraph of a vertex too? 

For example, let's say I have 

<bind id="x" ref="i/x" isValid="i/y > 10"/>
<bind id="y" ref="i/y" type="xsd:float"/>

<input bind="y"/>
<output bind="x"/>


Now, if I enter a value of '1' on the control bound to
Y, schema/facet validation will evaluate to true.
However, the control bound to X is now invalid since y
is less than 11.

It seems that if we are going to allow isValid to
happen before the entire recalculation, then isValid
must also be processes according a topological
sort/pertinent subgraph.

And what happens is isValid is dependent on a
calculated value from another binding? Since this
happens before the recalculate step, it will use the
old value, however, it may be that the control will
not be valid after the recalculate step.

For example:

X (current value 6)
Y isValid() = Z > 10 (current value, true)
Z calculate() = 2*X (current value, 12)

X is changed to 5. isValid() occurs on Y before Z is
recalculated, Y will return true. After recalculation,
Z will have a value of 10. Thus, the display will show
X=5, Y being valid, and Z being 10, which is an
invalid state, but no error message will be shown.


Am I missing something in the spec, or in the
Processing Model section wrong?



__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Received on Monday, 22 October 2001 12:16:16 UTC