[xquery-talk] Problem with "let" statements in an xquery function
ignaciot at gmail.com
Tue Aug 12 17:45:43 PDT 2008
I'm puzzled about this function I'm working on:
declare updating function
$a as element(),
$b as xs:string
let $c := $a//some_element[.=$b]/..[another_elem='foo']
let $d := $a//anoher/element
if( exists($c) )
replace value of node $c/xxx with $d
The problem is, those "let" statements aren't working... if I check the
value of $c or $d they're null. And the xpath expression I'm using is valid.
Based on the W3 specs I understand those "let" declarations are valid:
What am I missing? Should I assign those variables in some other way? I
tried using "declare variable" instead but that didn't work either.
Thanks for any comments, I think I could use an extra pair of eyes. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk