xsl-list
[Top] [All Lists]

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

2014-01-16 10:21:07

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.

Generally you can't keep a "pointer" to a streamed node, because it's 
transient. But you can keep a copy.

So you should be able to do 

reverse(/copy-of(/x))

The result of copy-of(//x) is grounded (it doesn't contain any streamed nodes), 
and that makes it amenable to operations such as reverse().


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.

Or possibly because the streaming design was completely up in the air at that 
moment because we had just found a major bug. But I think we've still got some 
issues with multi-phase streaming that need to be sorted out (that is, with 
reading from a stream of nodes that is itself constructed by the stylesheet), 
and such use cases need further work: we've got an agenda item to discuss this.

http://xsl-list.markmail.org/thread/pwuzpcvdoi7eam4h

Michael Kay
Saxonica


--~------------------------------------------------------------------
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>
--~--