[xquery-talk] Results from previous iterations
dflorescu at mac.com
Tue Nov 16 20:57:04 PST 2010
That might help
Allows variables assignment.
On Nov 9, 2010, at 3:57 PM, Vyacheslav Zholudev wrote:
> Hi all,
> probably a simple question, but playing around didn't bring me any
> positive results.
> My intention is to pass the result of a particular iteration of a
> for loop to the next iteration, sth, like
> let $val := 1 return
> for $i in 1 to 10 return
> let $val := local:plus-one($val) return $val
> where local:plus-one increments the value by 1. So the desired
> results would be (2, 3, 4..., 10), but in practice of course
> I know that it's against the "side-effect free" design in XQuery,
> but are there any common patterns to simulate something like this?
> Thanks a lot in advance!
> talk at x-query.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk