This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
From Dimitre Novachev on xsl-list today: So, to summarize, Wolfgang and I found three issues in the specification of the fold -xxx functions: 1. The Error Conditions paragraph for fold-left conflicts with the signature of the function. 2. The Error Conditions paragraph for fold-right conflicts with the signature of the function. 3. The Rules section (code) for fold-right conflicts the signature of the function.
The relevant message can be found here http://markmail.org/message/xqrtczzqa7dklj6x See also the subsequent thread.
Note also that in the equivalent XQuery function given for fold-left, there is a missing comma after the $seq argument in the function signature. Fixed in the 3.1 spec.
For fold-left() we have a simple editorial problem: 1. In the error description for fold-left(), change "and the second is $seq or any trailing subsequence of $seq." to "and the second is any single item from $seq". For fold-right() we have a slightly deeper problem. In the function signature proforma, we say that the supplied function has signature $f as function(item()*, item()) as item()* But then we say the effect of the function is equivalent to one in which $f is declared as $f as function(item(), item()*) as item()* So the question is, which should we adopt? In the first case, the signature is assuming that the "accumulated value" (starting from $zero) comes first, and the item from the supplied $seq comes second. The other version assumes the opposite. The prose description of the error condition agrees with the second interpretation, as do the examples and test cases. So I think it is the function proforma we have to change: it becomes $f as function(item(), item()*) as item()*. I have made these changes to the 3.1 specification and have noted them (in the changes.txt file) for any future 3.0 errata.