xsl-list
[Top] [All Lists]

Re: [xsl] XSLT 4: Define proper streaming

2020-05-26 10:51:47
  On Mon, May 25, 2020 at 10:13 PM Martin Honnen 
martin(_dot_)honnen(_at_)gmx(_dot_)de <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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(_dot_)honnen(_at_)gmx(_dot_)de <
xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:

Am 25.05.2020 um 22:00 schrieb Dimitre Novatchev 
dnovatchev(_at_)gmail(_dot_)com:
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?


--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>