- From: <Nick_Van_den_Bleeken@inventivegroup.com>
- Date: Fri, 14 Dec 2007 16:02:01 +0100
- To: public-xforms@w3.org, www-forms-editor@w3.org
- Message-ID: <OF8D1C672B.8073E43B-ONC12573B1.0051D6AE-C12573B1.005294C9@inventivegroup.com>
All, Can it be that the 'if' XPath expression of the 3th setvalue in the ' Summing Selected Results' sample [1] is missing an explicit reference to the default instance? <trigger> <label>Get Sum</label> <action ev:event="DOMActivate"> <setvalue ref="instance('temps')/counter" value="1"/> <setvalue ref="instance('temps')/accumulator" value="0"/> <action while="instance('temps')/counter <= count(/some/nodes)"> <setvalue ref="instance('temps')/accumulator" value=". + instance('default')/some/nodes[number(instance('temps')/counter)]" if="boolean-from-string(/some/nodes[number(instance('temps')/counter)]/@selected)"/> <setvalue ref="instance('temps')/counter" value=". + 1"/> </action> </action> </trigger> The ref of the 3th setvalue changes the instance of the in-scope evaluation context to instance 'temps'. But the '/some/nodes' are in the 'default' instance (see value of the setvalue). -> we should change 'boolean-from-string(/some/nodes' to 'boolean-from-string(instance('default')/some/nodes' Regards, Nick Van den Bleeken - Research & Development Manager Inventive Designers Phone: +32 - 3 - 8210170 Fax: +32 - 3 - 8210171 Email: Nick_Van_den_Bleeken@inventivegroup.com 1: http://www.w3.org/TR/xforms11/#action-iterated -------------------------------------------------- Inventive Designers' Email Disclaimer: http://www.inventivedesigners.com/email-disclaimer
Received on Friday, 14 December 2007 15:02:23 UTC