Actions
Bug #5193
closed![Author: Martin Honnen](https://www.gravatar.com/avatar/3ea75023c3c487f36257090d420b7c50?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
$nodes => fold-left((), function($all, $this) {$all, $this except $all}) call gives error "Supplied value element <a> does not match required type xs:error in dynamic call of anonymous function (arity 2)"
Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath Conformance
Sprint/Milestone:
Start date:
2021-12-29
Due date:
% Done:
100%
Estimated time:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-
Description
In the "aftermath" of a lively discussion of node identity on the XSL list I tried to run some code through Saxon-JS 2.3 and found an odd error message when using the arrow operator and fold-left
, when I run
xslt3 -xp:"let $xml := parse-xml('<t><a/><b/><c/></t>'), $nodes := ($xml/*/a, $xml/*/c, $xml/*/b, $xml/*/b) return $nodes => fold-left((), function($all, $this) {$all, $this except $all})"
I get an error
Error XPTY0004
Supplied value element <a> does not match required type xs:error in dynamic call of anonymous function (arity 2)
The plain use of fold-left
without the arrow operator, as in
xslt3 -xp:"let $xml := parse-xml('<t><a/><b/><c/></t>'), $nodes := ($xml/*/a, $xml/*/c, $xml/*/b, $xml/*/b) return fold-left($nodes, (), function($all, $this) {$all, $this except $all})"
works fine.
Please register to edit this issue
Actions
Also available in: Atom PDF Tracking page