[Bug 24343] xsl:merge cannot be streamable because of semantics doc() etc

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CLOSED                      |REOPENED
         Resolution|FIXED                       |---

--- Comment #5 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
I'm taking the liberty of reopening this because of some (possible) bugs
introduced in the new streaming rules (numbered 1 to 6):

1) About rule #2
"The expression in the select attribute of that xsl:merge-source element must
have striding posture;"

This should probably be:

"The expression in the select attribute of that xsl:merge-source element must
have striding or grounded posture and a sweep that is not free-ranging;"

I think the limitation on only the posture is not necessarily enough, yet I
seem to fail to find an expression that is free-ranging and striding/grounded
at the same time. I.e., the expression snapshot(a//b) is roaming and
free-ranging because the argument has usages absorption, though at first look
it might seem like grounded and free-ranging (because of the result of snapshot
always being grounded).

2) About rule #4
"The select expression of each merge key in that xsl:merge-source element must
be a motionless expression;"

This should be something like:

"The select expression of each merge key in that xsl:merge-source element must
be a motionless expression, assessed with the posture of the select expression
of the immediate xsl:merge-source parent;"

3) About rule #5
Typo: "and and either" => "and either a"

Also, the context item of xsl:merge-action is the result of the select
expression of xsl:merge-source, hence it might make sense to set the context
posture to the higher result posture of all select expressions (allowing that,
if all are grounded, free-ranging expressions are allowed). However, this might
over-complicate things. If we don't add this, we should perhaps explain what
the context posture is for the assessment of the posture of the
xsl:merge-action (striding?).

4) About the example
Currently, the example is not streamable with the rules given. It is streamable
if the changes mentioned above are applied.

The Note on the example should probably go into the green section of the
example, as it applies to example, not to the body of the text of section 15.4.

5) About context posture
It is not clear from the get-go what the context posture is for assessing the
select expression of the xsl:merge-source element. Perhaps it is irrelevant?

6) About 19.8.4.25, Streamability of xsl:merge
There is no rule about how to assess xsl:merge-source children, the operands
are not known. 

The current rule:
"If all xsl:merge-source children are motionless then the instruction is
grounded and motionless."

does not take into account a that a select expression on xsl:merge-source can
be motionless, but can still select streamable nodes, hence allowing the
xsl:merge-action to return streamable nodes and still be motionless. This
should be disallowed.


I think we could fix this by writing something like the following:

#1. If all xsl:merge-source without @for-each-stream and @for-each-item have a
select expression that is motionless and grounded;

#2. If all xsl:merge-source with @for-each-item have a for-each-item expression
that is grounded and motionless;

#3. If all xsl:merge-source with @for-each-stream follow the rules under 15.4
Streamable Merging;

Then grounded and motionless. Otherwise, roaming and free-ranging.

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

Received on Tuesday, 4 March 2014 14:20:45 UTC