I was thinking of http://www.w3.org/TR/xquery-update-30/#id-dynamic-function-invocation and http://www.w3.org/TR/xquery-update-30/#id-inline-function
Allowing something like: declare updating function local:check($fn){ if(1=random:integer(2)) then db:output($fn()) else db:output("no action") }; let $v:="good" return local:check(%updating function(){ db:output($v)}) /Andy On Wed, Jan 9, 2013 at 9:38 PM, Christian Grün <christian.gr...@gmail.com>wrote: > Hi Andy, > > true.. For everyone else: the latest versions of the XQuery 3.0 specs > have just been made > public: > > http://www.w3.org/TR/xquery-30/ > http://www.w3.org/TR/xquery-update-30/ > http://www.w3.org/TR/xpath-full-text-30/ > > > From my reading: it looks like the latest version of the spec has > addressed > > the "updating operations in closures" issue. Can we expect a BaseX > > implementation soon :-) > > Could you give me a hint which section do you exactly refer to? > Christian > ___________________________ > > On Wed, Jan 9, 2013 at 10:19 PM, Andy Bunce <bunce.a...@gmail.com> wrote: > > > > /Andy > > > > > > > > On Thu, Nov 22, 2012 at 2:40 PM, Christian Grün < > christian.gr...@gmail.com> > > wrote: > >> > >> Hi Daniel, > >> > >> > Doesn't it introduce performance problems though? If you do this > copying > >> > with some bigger chunk of XML does it take the same amount of memory > or is > >> > it somehow "delta" optimized? > >> > >> Yes; this is due to the specification, btw. Whatever you copy in your > >> XQUF spec. is supposed to be cached before it is being evaluated. > >> > >> Regarding updating operations in closures: the current version of the > >> spec. disallows updating operations, because it cannot be statically > >> determined if a dynamic function invocation is an updating expression > >> or not. See [1] for more details. > >> > >> Best, > >> Christian > >> > >> [1] > http://www.w3.org/TR/xquery-update-30/#id-dynamic-function-invocation > >> _______________________________________________ > >> BaseX-Talk mailing list > >> BaseX-Talk@mailman.uni-konstanz.de > >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > > > >
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk