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
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
Hi,
self-contained example attached, just drop to restxq enabled folder and navigate to [restxq url] /tmp/test-fold-left
still gives
Problem accessing /tmp/test-fold-left. Reason:
Stopped at restxq/tmp/test-update-error.xqm, 33/13: [XUST0001] fn:fold-left(items,zero,function): all expressions must be updating or return an empty sequence.
Regards,
Max
2014-06-25 16:25 GMT+02:00 Christian Grün christian.gruen@gmail.com:
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
self-contained example attached, just drop to restxq enabled folder and navigate to [restxq url] /tmp/test-fold-left
Appreciated! We have added an issue for that; will probably be fixed today:
https://github.com/BaseXdb/basex/issues/964
Christian
basex-talk@mailman.uni-konstanz.de