W3C home > Mailing lists > Public > www-forms@w3.org > January 2007

Question about dependency model and referents node in XPath Expression

From: Sébastien CRAMATTE <contact@zeninteractif.com>
Date: Sat, 06 Jan 2007 16:59:58 +0100
Message-ID: <459FC77E.8090208@zeninteractif.com>
To: www-forms@w3.org


I've got a question about  dependency model and referents node in XPath
Expression ...
Considering  this XForms ...

<root xmlns="">
    <class enable="true">
    <class enable="false">
    <class enable="true">
<xf:bind nodeset="//class/@enable" type="xsd:boolean" />

<xf:output value="sum(//class[@enable='true']/rate)" />

<xf:repeat nodeset="class">
    <xf:input ref="@enable">
    <xf:input ref="rate">


As you can see using the repeat module I can display three class rate
value with a checkbox (type xsd:boolean) button to enable/disable each.
Considering this XPath output element :

<xf:output value="sum(//class[@enable='true']/rate)" />

When My XForms processor evaluate  the expression and find "referents"
nodes bellow, only "rate" node with predicate @enable='true' are added
to dependency model during initial
"rebuild+recalculate+revalidate+refresh" sequence

Now, if I change @enable attribute value of the 2nd class node to 'true'
(intialiy @enable='false') and If i change the "rate" value the  "sum" 
output will not be recomputed.
I must check / uncheck  the enable button to refresh it ...

My question is : does my XPath engine should ignore [@enable='true]
predicate and append all  "rate" childs  nodes as referents  ?
When I force this behavior in my XPath lib the "sum"  is recomputed
correctly when I change any rate value.

Thanks for you help

Received on Saturday, 6 January 2007 16:00:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:19 UTC