xsl-list
[Top] [All Lists]

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

2014-01-16 10:23:31
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(_at_)wendellpiez(_dot_)com> wrote:
Hi,

Just a question prompted by David's commentary:

On Thu, Jan 16, 2014 at 6:44 AM, David Carlisle 
<davidc(_at_)nag(_dot_)co(_dot_)uk> 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_^

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--