XPath 2.0 execution scope in XForms


*         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):




Form live time

To big (there are a lot of use cases that need a smaller execution scope)


The form author can force the end of an execution scope

In current implementations now() has a smaller execution scope


*         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.


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>
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:

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