- From: John Boyer <JBoyer@PureEdge.com>
- Date: Wed, 10 Oct 2001 10:39:26 -0700
- To: "J?r?me N?gre" <jerome.negre@ecl2000.ec-lyon.fr>, <www-forms@w3.org>
Hi Jérôme, It is important to note that there is a difference between 'vertex' and 'XML node in instance data'. 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. In your example, isvalid="number(.) < sum(../price)", the subexpression number(.) does not cause the vertex for the 'isValid' property of the instance node to refer to itself but rather to the vertex representing the content of the instance node. One of the tweaks we will be making soon to clear this up is to add a 'type' member to the data structure for a vertex because one needs a pointer not only to the instance node but also an indication of what aspect of the instance node the vertex was representing. Back when I didn't know that the group wanted to bind to attributes in instance data, I thought that model item properties would be represented as attributes in the markup of the instance data such that the instanceNode pointer would've been enough without an extra type indicator. I've since learned more about it (at the last FtF), but the spec hasn't been updated yet. Also, I would point out that even though your example does not contain a self-reference, it does appear that the explicit allowance for self-reference in the first version of the recalculation algorithm that I submitted to the group was inadvertently edited out in the version that made it to the spec. I would like to be able to do things like calculate="if(string(.)="", some calculation, string(.))" which means roughly "if my value is empty, then perform some calculation to give me a value, otherwise retain my current value". Another handy calculation is calculate="if(some condition happens, number(.)+1, number(.))" which increments the value of some node every time some condition happens. In order to do these things, the depList should exclude references to the vertex containing the depList. I'll speak to the editors about making sure the right tweaks are made, and thanks for looking in detail at the calculation algorithm. Cheers, John Boyer Senior Product Architect PureEdge Solutions Inc. Hello, If I understand correctly chapter 11.4.5, the following model item propertie is invalid : isvalid="number(.) < sum(../price)" According to §11.4.5.3.1, inDegree must be 0 for a vertex to be selected, but since the xapth expression uses ".", it's inDegree will never go under 1. So, is this model item property really invalid, should the algorithm be changed, or am I missing something ? Jérôme Nègre PS : I think the algorithm is correct only for "calculate"
Received on Wednesday, 10 October 2001 13:40:04 UTC