Subject: Re: [xsl] Does the count() function require access to the whole subtree? From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Mon, 13 Jan 2014 07:16:17 -0800 |
I can definitely say that I don't understand either of these terms and that this whole topic/discussion is so confusing, that it has once again re-affirmed my decision *never* to use this so called streaming. In case I can provide a hint to the processor that I know what I am doing, I believe I can write what I understand to be a "streamable" transformation and will live happily with this fact. On Mon, Jan 13, 2014 at 4:53 AM, Michael Kay <mike@xxxxxxxxxxxx> wrote: > >> >> 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 > -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might make mistakes may be the biggest mistake of all ------------------------------------ Quality means doing it right when no one is looking. ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play ------------------------------------- To achieve the impossible dream, try going to sleep. ------------------------------------- Facts do not cease to exist because they are ignored. ------------------------------------- Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :) ------------------------------------- I finally figured out the only reason to be alive is to enjoy it.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Does the count() function, Wolfgang Laun | Thread | Re: [xsl] Does the count() function, John Lumley |
Re: [xsl] Does the count() function, Wolfgang Laun | Date | Re: [xsl] Does the count() function, John Lumley |
Month |