Subject: Re: [xsl] XSLT 4: Define proper streaming|
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 May 2020 15:51:39 -0000
On Mon, May 25, 2020 at 10:13 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Are there any such designs or implementations in terms of the XDM? Not that I know of, but it is possible to express any tree - processing using a 2-dimensional fold - like function. See the *foldtree* function as defined by John Hughes in "Why functional programming matters" (p. 7): https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf Although this particular example isn't strictly a left fold (a left fold is tail-recursive and can be implemented without recursion) , it is possible to write a left-fold-tree function -- see for example: https://stackoverflow.com/questions/52451923/variations-of-folds-on-haskell-trees Cheers, Dimitre On Mon, May 25, 2020 at 10:13 PM Martin Honnen martin.honnen@xxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Am 25.05.2020 um 22:00 schrieb Dimitre Novatchev dnovatchev@xxxxxxxxx: > > This one should be obvious enough: > > > > In XSLT 3.0 only a source XML document can be streaming -processed. > > > > Why not an output of a (potentially other/unknown/external/independent) > > transformation? > > I think you can chain two or more streaming transformations with Saxon > EE, at least from the host language like Java and s9api or even relying > on SAX APIs. Not sure whether it is also possible using fn:transform. > > > > Please, don't tell us that we don't know how to exactly formulate this > > requirement, or that it is ("extremely") difficult to implement it. Both > > a possible design and implementation are delivered in the concept of a > > **concurrent queue**. > > Are there any such designs or implementations in terms of the XDM?