Hi Max,
can you possibly provide us with a small, self-contained example? Maybe the error occurs somewhere else, even if the error points to this function. An example: Maps may also contain updating functions.
Cheers, Christian
On Wed, Jun 25, 2014 at 4:21 PM, Maximilian Gärber mgaerber@arcor.de wrote:
Hi,
I just tried a previously (7.8-Snapshot) working application with 8.0-Snapshot and got:
Stopped at /intersect-nodes.xqm, 22/13: [XUST0001] fn:fold-left(items,zero,function): all expressions must be updating or return an empty sequence.
but there are no updates applied in this function (or ones calling this function):
declare %public function _:intersect( $map as map(*)) as node()* { fold-left( map:keys($map), $_:ALL, function($s1, $key as item()*) { let $s2 := $map($key), $a1 := _:all($s1), $a2 := _:all($s2) return if($a1) then if($a2) then $_:ALL else $s2 else if($a2) then $s1 else $s1 intersect $s2 } )
Any ideas?
Regards, Max