W3C home > Mailing lists > Public > public-forms@w3.org > July 2010

Re: XPath 2.0 execution scope in XForms

From: Steven Pemberton <Steven.Pemberton@cwi.nl>
Date: Wed, 21 Jul 2010 15:44:21 +0200
To: public-forms@w3.org
Message-ID: <op.vf64f7h9smjzpq@steven-750g.lan>
On Tue, 20 Jul 2010 12:48:31 +0200, Nick Van den Bleeken  
<Nick.Van.den.Bleeken@inventivegroup.com> wrote:

> All,
>
>
> *         Currently the now() function says that 'Attaching a  
> calculation of "now()" to an instance data node would not result in a  
> stream of continuous recalculations of the XForms Model.', but it  
> doesn't say when now() will return a different value.

My memory of this text is that it is not intended to suggest that you  
always get the same value. Each time that now() is evaluated it returns  
the current now() (so it is not a pure function). The bit about a  
continuous stream had something to do with clocks, but the exact details  
escape me.

Steven

>
>
> *         In XPath 2.0 we have functions such as  
> fn:doc()<http://www.w3.org/TR/xpath-functions/#func-doc>,  
> fn:collection()<http://www.w3.org/TR/xpath-functions/#func-collection>,  
> fn:current-dateTime()<http://www.w3.org/TR/xpath-functions/#func-current-dateTime>,  
> fn:current-date<http://www.w3.org/TR/xpath-functions/#func-current-date>  
> and  
> fn:current-time()<http://www.w3.org/TR/xpath-functions/#func-current-time>  
> whose result depends on the external environment.
>
>
> *         In XPath 2.0 they say that those functions have the property  
> that calling the same function twice within an *execution  
> scope*<http://www.w3.org/TR/xpath-functions/#execution-scope> with the  
> same arguments returns the same result: these functions are said to be  
> stable.
>
> What is the groups opinion on formalizing the 'execution scope'[1] in  
> XForms? (Currently it isn't specified when now() returns an updated  
> result, this may result in incompatibilities between implementations)
>
> There are a couple possibilities for a boundary for the 'execution  
> scope' (i.e. when any two calls executed with the same arguments returns  
> the same result):
>
> Boundary
>
> Pro
>
> Con
>
> Form live time
>
>
>
> To big (there are a lot of use cases that need a smaller execution scope)
>
> xforms-rebuild
>
> The form author can force the end of an execution scope
>
> In current implementations now() has a smaller execution scope
>
> xforms-refresh
>
>
> *         Smallest for which we can be sure we don't violate the not on  
> the now() function related to recalculation
>
> *         Easy to understand for the form author
>
> Should be ended at the end of the default action processing, otherwise  
> expressions for calculates and constraints will use stale results  
> compared to the UI controls (they will be off by one refresh)
>
>
>
> Any remarks and all other 'good' possibilities are welcome.
>
> Regards,
>
> Nick Van den Bleeken
> R&D Manager
>
> Phone: +32 3 821 01 70
> Office Fax: +32 3 821 01 71
> nick.van.den.bleeken@inventivegroup.com  
> <mailto:nick.van.den.bleeken@inventivegroup.com>
> http://www.inventivedesigners.com<http://www.inventivedesigners.com/>
> Linked in<http://be.linkedin.com/in/nvdbleek>
>
> 1: http://www.w3.org/TR/xpath-functions/#execution-scope
> 2: http://www.w3.org/TR/xpath-functions/#stable
>
> ________________________________
> Inventive Designers' Email Disclaimer:
> http://www.inventivedesigners.com/email-disclaimer
Received on Wednesday, 21 July 2010 13:45:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:54 UTC