FLWOR window clause
Friday, 23 November 2012 · 2 messages
HR
Hans-Juergen Rennau23 Nov 2012 06:59 #
Hello,
are there already any plans for implementing the XQuery 3.0 feature "window clause in FLWOR expressions"?
It seems to me so interesting as it allows the creation and evaluation of "self describing item streams", that is, streams of XDM items with interspersed control items which define and annotate sub units (windows) of the stream total, thus effectively translate the stream of items into a stream of larger units, in analogy to XML tags which translate a stream of characters into a stream of information items...
Thank you,
Hans-Juergen
LW
Leo Wörteler23 Nov 2012 12:39 #
Hi Hans-Juergen,
Quoted text · Hans-Juergen Rennau · 3 lines
Am 23.11.2012 06:59, schrieb Hans-Juergen Rennau: > are there already any plans for implementing the XQuery 3.0 feature > "window clause in FLWOR expressions"?
I actually implemented them (and the other missing features of General FLWOR Expressions) in the
stack-frames branch [1] some time ago, but the code unfortunately bit-rotted quite a bit while I wrote my bachelor thesis. I'm currently in the process of integrating the changes back into master [2].Quoted text · Hans-Juergen Rennau · 6 lines
> It seems to me so interesting as it allows the creation and evaluation > of "self describing item streams", that is, streams of XDM items with > interspersed control items which define and annotate sub units (windows) > of the stream total, thus effectively translate the stream of items into > a stream of larger units, in analogy to XML tags which translate a > stream of characters into a stream of information items...
Yes, they are quite powerful and I regularly miss them when writing XQuery. If you want to play around with them, you can download an older snapshot of the
stack-frames branch from my Dropbox [3]. Just keep in mind that it's still based on BaseX 7.2.1 and probably not quite bug-free yet.
Hope that helps,
Leo
[1] https://github.com/BaseXdb/basex/tree/stack-frames
[2] https://github.com/BaseXdb/basex/issues/572
[3] https://dl.dropbox.com/u/22915638/basex-7.2.1-stack-frames.jarWritten for BaseX 7.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery