[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Does the count() function require access to the wh

Subject: Re: Does the count() function require access to the whole subtree?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Mon, 13 Jan 2014 12:53:22 +0000
Re:  Does the count() function require access to the wh
> My first question in other words: Is count( x ) always streamable, no
> matter what x (or a $x or...) is?

No. Counter-example: count(following-sibling::x) is not streamable.

More specifically, count(X) is streamable (more specifically, its posture is
grounded) if the posture of X is grounded, climbing, striding, or crawling,
but not if it is roaming.

Sorry - I know that's a lot of new jargon to absorb on a Monday morning!

Michael Kay
Saxonica


>
> The "positioned" was referring to a quote from Roger, see his post, please.
>
> -W
>
>
> On 13/01/2014, Michael Kay <mike@xxxxxxxxxxxx> wrote:
>>
>> On 13 Jan 2014, at 11:59, Wolfgang Laun <wolfgang.laun@xxxxxxxxx> 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.