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

XPath 2.0 execution scope in XForms

From: Nick Van den Bleeken <Nick.Van.den.Bleeken@inventivegroup.com>
Date: Tue, 20 Jul 2010 12:48:31 +0200
To: "public-forms@w3.org" <public-forms@w3.org>
Message-ID: <98F519CDC2FA6146AE00069E9A1D91FD87075EA36C@erganix.dc.intranet>
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.


*         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

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
Received on Tuesday, 20 July 2010 10:50:08 UTC

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