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 30289 - [XSLT30] Streamability rules for ASCENT stylesheet functions are incorrect
Summary: [XSLT30] Streamability rules for ASCENT stylesheet functions are incorrect
Status: NEW
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Recommendation
Hardware: PC All
: 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: 2018-09-25 17:41 UTC by Michael Kay
Modified: 2019-02-20 00:31 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2018-09-25 17:41:15 UTC
The streamability rules for stylesheet functions with streamability="ascent" (ยง19.8.5.7) appear to give incorrect results.

The first argument of the function call is assigned an operand usage of inspection, and this results in a call such as f:ascend(.) being assessed as grounded and motionless ("inspection" of the context item is assumed to return a "property of the node", which is assumed to be grounded).

Assigning a usage of transmission seems to work better. The function call then gets assessed as motionless and climbing.
Comment 1 Michael Kay 2018-09-25 17:42:10 UTC
See also Saxon bug #3916.
Comment 2 Michael Kay 2018-09-27 11:53:58 UTC
A further modification to the rules seems to be needed: if the return type of the function doesn't allow nodes, then the posture should be GROUNDED rather than CLIMBING.

(Demonstrated by Saxon-specific test TestXslt30Streaming.testSimple rather than by any W3C test).
Comment 3 Abel Braaksma 2018-10-24 13:55:49 UTC
I agree. This would modify Rule 1 (s/inspection/transmission/) 

And Rule 6, which should perhaps point to the result of the "Rules of the function body": that one already determines whether the function can only ever return a grounded, or otherwise a potentially climbing result and is dependent on "type-adjusted posture".