[Bug 29153] [XSLT30] have we created a loop-hole with windowed streaming and copy-of or snapshot?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29153

--- Comment #2 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
> if (position() = last()) ...
>
> because with some limited lookahead that can be streamed easily enough.

In general, I agree, but I find it a tricky rule to get right. What with
if(position() + 10 = last()) or if(@x = last())? 

If the suggestion is to *only* allow the exact expression "position() =
last()", then still, that can be written in a variety of similar ways.

If we want to allow that, we should perhaps better consider to:

a) introduce something like fn:is-last, in line with fn:has-children
b) allow xsl:on-completion inside xsl:for-each (in tail position)

I would opt for (a), as it will be simpler to ban fn:last completely (you can
then use "if(is-last()) then position() else ()" as alternative), or at least
inside any higher-order context.

For a moment I thought this would also allow the now forbidden a/b[last()] as
a/b[is-last()], but that won't work when combining "a/b[is-last()] |
a/c[is-last()]". So the rule could be "is-last() is motionless and grounded in
grounded and climbing postures, and roaming and free-ranging otherwise".

(I know we aren't adding any new features, but this is no suggestion thereto,
the suggestion is to fix the bug.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 28 September 2015 15:39:59 UTC