Re: [xsl] Does the count() function require access to the whole subtree?

Subject: Re: [xsl] Does the count() function require access to the whole subtree?
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Thu, 16 Jan 2014 17:23:16 +0100
OK, I understand that some expressions can be collected while the
input document streams through the system.

But what is the possible consequence of *emitting* the result into the
output document, e.g., if I need to omit it "up front"? Does this mean
that the output is held back or its construction delayed? Or can the
way a result is used make streaming impossible?

-W


On 16/01/2014, Wendell Piez <wapiez@xxxxxxxxxxxxxxx> wrote:
> Hi,
>
> Just a question prompted by David's commentary:
>
> On Thu, Jan 16, 2014 at 6:44 AM, David Carlisle <davidc@xxxxxxxxx> wrote:
>> Some operations are intrinsically not streamable, if you replace data()
>> by reverse() for example then reverse(//x) is going to have to buffer
>> every node somewhere and return the x elements in reverse order so since
>> it has to return the last one first the operation can't be streamed in
>> any reasonable way irrespective of the input sequence, which happens to
>> be //x here. So nesting of x would not be relevant.
>
> I imagine that even in this case, streaming might not be completely
> useless when used within a pipeline.
>
> For example, your pipeline could collect all //x (streaming) and then
> reverse them (not streaming).
>
> In principle, you would need only the memory for holding //x (or
> rather, copies of //x or pointers to them), not the entire collection
> within which they are found.
>
> This is correct, isn't it? I imagine the general principle here is
> that pipelining and streaming play well together.
>
> I also had a related question, back in September. It wasn't answered
> (rare for this list), either because it wasn't clear, or because XML
> Summer School was going on at the time. Or both.
>
> http://xsl-list.markmail.org/thread/pwuzpcvdoi7eam4h
>
> Cheers, Wendell
>
> Wendell Piez | http://www.wendellpiez.com
> XML | XSLT | electronic publishing
> Eat Your Vegetables
> _____oo_________o_o___ooooo____ooooooo_^

Current Thread