- From: Ray Cromwell <ray_cromwell@yahoo.com>
- Date: Mon, 22 Oct 2001 18:40:20 -0700 (PDT)
- To: John Boyer <JBoyer@PureEdge.com>, www-forms-request@w3.org, www-forms@w3.org
> 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. Ok, this makes more sense. Let me try to work through an example to see how it would apply. We have a form with 3 fields input X: 6 output Y: calculate() = X, isValid() Z > 10 output Z: calculate() = 2*X M-D graph looks like Y -> Z -> X When X is altered to X=5, we perform the validation step. X has no validation except for facet/schema, and passes. X's instance node is marked dirty for content. Next, recalculation occurs. X is processed first, then Z is processed, calculated to be 10, and set to dirty. Finally, Y's isValid() is processed and set to dirty (validation dirty flag) with false. Finally, UIRefresh happens. X, Y, and Z are all dirty. However, while X and Z are updated with the new content, Y is updated to show that the field is now invalid. So validation occurs before recalculation for the node being immediately changed, but for other dependent nodes, it happens during recalculation when isValid() is evaluated while walking the graph, and the results are displayed during UIRefresh by marking an instance node to be "validation dirty" (or just dirty) That seems to work. My big problem now is how to build the M-D graph in the first place, especally in the presence of non-root evaluation contexts, repeat elements, node-set functions, etc. Does anyone have pseudo-code to do this? If there is a <bind> element which is not referenced by any UI element, is it always assumed to be outermost context? I'm currently thinking of something like this: first, all binds on outermost UI elements are added for any bind not referenced by a UI element, it is considered an outermost binding and added to the M-D graph next, inner binding elements of <repeat>,<group> are added finally, if the instance is ever altered by an insert or delete action, the M-D is recalculated to include or remove any new or old instance nodes is that essentially correct? -Ray __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
Received on Monday, 22 October 2001 21:40:22 UTC