[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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


Subject: Re: [xsl] RE: Does the count() function require access to the whole subtree?
From: Wolfgang Laun <wolfgang.laun@xxxxxxxxx>
Date: Mon, 13 Jan 2014 12:59:58 +0100

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.

-W


On 13/01/2014, Costello, Roger L. <costello@xxxxxxxxx> wrote:
> Thanks everyone, great discussion!
>
> From what you've said, it seems like the difference between inspection and
> absorption is like the difference between inspecting a book's table of
> contents versus diving into each chapter and absorbing its information.
>
> Here's my current understanding of inspection and absorption. Please let me
> know if it is not correct or not clear.
>
> Inspection
>
> 	Inspection: operations that can be performed
> 	while positioned at each item's start tag. Each
> 	item can be treated as opaque. There is no need
> 	to peek inside each item.
>
> 	These are inspection operations: count(), exists(),
> 	name().
>
> 	Consider a sequence of items. The function count()
> 	can count each item in the sequence, without peeking
> 	inside each item.
>
> 	Inspection operations are those that require only a
> 	surface understanding of the items: we merely skim
> 	the items.
>
> Absorption
>
> 	Absorption: operations that require going inside each
> 	item.
>
> 	These are absorption operations: string(), data(),
> 	xsl:value-of.
>
> 	Consider a sequence of items. The function string()
> 	requires going inside each item in the sequence to
> 	collect and concatenate all the values.
>
> 	Absorption operations are those that require a deep
> 	understanding of the items: we must absorb all the
> 	information in the items.


Current Thread