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

Re: [xsl] XSLT Streaming Terminology: why is it called "striding"?


Subject: Re: [xsl] XSLT Streaming Terminology: why is it called "striding"?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Sun, 9 Feb 2014 11:06:36 +0000

On 9 Feb 2014, at 10:38, Costello, Roger L. <costello@xxxxxxxxx> wrote:

> Hi Folks,
>
> A striding construct is one that returns a sequence of items and the items
are all disjoint (item i is not nested in item j).
>
> Why are such constructs called "striding"? Would you please give some
intuition on why such constructs are called striding?

Largely whimsical, I was having a bit of fun. In the earlier spec they (or the
nearest equivalent) were called "incrementally consuming"; but in the new
analysis self::* comes out as striding but not consuming. The word "crawling"
is fairly natural for something that visits every node of a tree (visualise a
caterpillar), and I wanted a contrast for something that skips across from one
branch of a tree to another without visiting all the leaves. I thought of
"skipping" but that seemed to have connotations implying that there are nodes
that are not processed.
>
> Also, why is striding important? I think that striding constructs are
important because:
>
> 	The sequence of items returned by a striding
> 	construct can be operated on in a streaming
> 	fashion.
>
> Is that correct?
>

Seems a gross over-simplification. The essence of striding expressions is that
they deliver a sequence of nodes with disjoint subtrees, so you can process
(and consume) the subtree of one node in the sequence before moving on to the
next.

Michael Kay
Saxonica


Current Thread