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 30045 - [fo3.1] Error in specification of array:fold-right()
Summary: [fo3.1] Error in specification of array:fold-right()
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate 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
Depends on:
Reported: 2017-01-12 12:57 UTC by Michael Kay
Modified: 2017-01-17 16:15 UTC (History)
1 user (show)

See Also:


Description Michael Kay 2017-01-12 12:57:12 UTC
Pointed out by Wouter S. Hager on the xquery-talk list:

Not sure if anyone already noticed, but there's an error in the XPath/XQuery F&O docs, where the example implementation of array:fold will always return an array...

It seems that in the "reference implementation" given to specify the function,

then [$zero]

should read

then $zero

to ensure that the function delivers the result implied by the examples and notes, as well as all the test cases in the test suite.

The same error is present in array:fold-left.
Comment 1 Michael Kay 2017-01-12 14:35:45 UTC
Because of the current timescales I have committed this fix to the specs pending WG approval at the next opportunity.
Comment 2 Andrew Coleman 2017-01-17 16:15:30 UTC
The WG agrees