xquery - expected return found let -
i error saxon,
engine name: saxon-pe xquery 9.2.1.2 severity: fatal description: xquery syntax error in #... (:return :) let $#: expected "return", found "let" start location: 776:0
on function
declare function local:set-internet-type($req1 element(ns0:req), $cate element()) xs:string { if(count( $itm in $req/*:cust/*:inter/*:itm $789/*:product/*:030/*:specs/*:name/text()= data($11/internet) , $22/*:action/text()="change" return $33)>0) ( $44 in $55 $tt/*:name/text()= data($t/internet) , $u/*:action/text()="change" (:return <fake/>:) let $z:= $a/*:product/*:c/*:e[1] return concat($x,'>',$y) ) else ("") };
i new xquery , spent lot on error without getting solution. vars masked intentionally error message seems related function flow.
any appreciated.
thanks in advance alessandro
saxon declares have "partial support of xquery 1.1". therefore, guess, supports old flwor format in cannot use let
after where
. try swap these clauses:
for $44 in $55 let $z:= $a/*:product/*:c/*:e[1] $tt/*:name/text()= data($t/internet) , $u/*:action/text()="change" return concat($x,'>',$y)
Comments
Post a Comment