W3C home > Mailing lists > Public > public-qt-comments@w3.org > June 2015

[Bug 28791] [xslt 3.0] Streamabiity of simple mapping operator

From: <bugzilla@jessica.w3.org>
Date: Sat, 27 Jun 2015 23:25:00 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28791-523-AbPgXG1VAc@http.www.w3.org/Bugs/Public/>

Abel Braaksma <abel.braaksma@xs4all.nl> changed:

           What    |Removed                     |Added
                 CC|                            |abel.braaksma@xs4all.nl

--- Comment #2 from Abel Braaksma <abel.braaksma@xs4all.nl> ---

> (a) rule 1, which handles the case where the LHS is grounded, is missing for 
> the bang operator. [...] As far as I can see, if this rule is needed for 
> xsl:for-each, then it is also needed for the bang operator, and indeed for "/".

This seems to only apply to fn:current, which is now covered in Bug 28833.

> (b) I can't see anything disallowed by rule 2 that isn't also disallowed by 
> rule 3a.

Rule 2 prevents overlapping nodes to be consumed in the body of the for-each
(crawling context, then motionless for-each seqtor). Rule 3a covers "normal"
cases with non-overlapping context posture, in which case the body is allowed
to be consuming.

In the case of the mapping operator, a semantically similar expression is
(a//b)!string(.). We allow this currently in the mapping operator, same way we
allow string(a//b) (the "minimal buffer" rule). With for-each, this gives more
problems, as the body could, for instance, do an apply-templates. I'm not sure
we need to restrict this for map expressions.

> (c) Rule 3b is blatantly different from the rule for the bang operator. I 
> think the rule for bang is seriously wrong here. Consider "author!." or 
> "author!name()" - the "wider sweep" rule would give us consuming, but the 
> current rule gives us motionless.

Yes, I think it should work similar to path expressions, where the "wider
sweep" rule actually exists. So this needs to be fixed for map expressions.

> One difference between A!B and <xsl:for-each select="A"><xsl:sequence 
> select="B"/></xsl:for-each> is that the semantics of a call to current() 
> within B are different. This case is of course relevant.

Yes, see Bug 28833. But also that a sequence constructor can have constructs
like apply-templates and xsl:fork, which is not possible in a mapping
expression. One might argue that you can create a streamable stylesheet
function, but rules restrict overlapping nodes to be consumed by a streamable
stylesheet function (by and, rule 3).

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Saturday, 27 June 2015 23:25:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:54 UTC