xsl-list
[Top] [All Lists]

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

2014-01-13 06:14:38

On 13 Jan 2014, at 11:59, Wolfgang Laun 
<wolfgang(_dot_)laun(_at_)gmail(_dot_)com> wrote:

With growing insecurity ;-)

My understanding is that count($x) may be called on the construction
of a sequence which (the construction) is not streamable, and that
calling count(...) on it does not make it streamable.

Another thing: calling count(...) doesn't require to be positioned anywhere.


Sorry, but I'm afraid I don't even understand what you're saying/asking here. 
What do you mean by an expression being positioned?

What we are discussing, is in simplified terms, the fact that count(//x) is 
streamable, but data(//x) is not. Here //x is a "crawling" expression - one 
that selects nodes which may overlap each other. When an expression returns 
(potentially) overlapping nodes, the W3C spec says you can apply inspection 
operations like count() to those nodes, but you cannot apply absorption 
expressions like data(), because doing so would require buffering.

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