This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24542 - Can we add a note on intrinsically non-streamable axes?
Summary: Can we add a note on intrinsically non-streamable axes?
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 23:19 UTC by Abel Braaksma
Modified: 2014-02-17 08:02 UTC (History)
1 user (show)

See Also:


Attachments

Description Abel Braaksma 2014-02-05 23:19:18 UTC
I think it helps if we add a small Note under 19.8.7.7 Streamability of Axis Steps (http://www.w3.org/TR/xslt-30/#streamability-of-axis-steps) mentioning the axes following, following-sibling, preceding, preceding-sibling as being intrinsically non-streamable (unless the context posture is grounded).

In line of that, I find it rather odd that we explicitly allow something like this (rule #3):

<xsl:value-of select="/preceding::*" />

or:

<xsl:value-of select="parent::attribute()/following-sibling::*" />

it's probably clearer to disallow these expressions altogether (i.e., add a rule between #2 and #3 in this section).
Comment 1 Michael Kay 2014-02-06 12:44:38 UTC
Rule #3 may be (unduly?) influenced by the fact that in Saxon, I do most optimization work before I do streamability analysis, and optimization turns trivially-void expressions such as "/.." and "@comment()" and "@x/following-sibling::*" into "()", making them intrinsically streamable.

I would defend the rule, however. We shouldn't make expressions non-streamable unless they really are, and on that basis, streaming of these "void path expressions" is possible.
Comment 2 C. M. Sperberg-McQueen 2014-02-12 10:40:46 UTC
We discussed this in Prague, and were not inclined to make any change; after discussion, the originator expressed agreement with this decision.

We noticed that rule 3 in 19.8.7.7 handles /preceding::* but not parent::attribute() or @comment().  The editor may or may not propose to generalize the rule to cover these cases (since they are likely to be error cases, it may not be worth while).
Comment 3 Michael Kay 2014-02-17 08:02:09 UTC
As suggested in comment #2, I have generalized rule 3 so that it now recognizes steps that are void because the node kind is inconsistent with the axis, as well as those that are void because the axis is inconsistent with the context item type.