When below error occurs please check whether the string constant is enclosed with single quate(') such that it can be parsed by the XQyuery compiler
Multiple markers at this line - An error occurred compiling the XQuery resource: The use of an unbound current node is not supported for XQuery resources
Simple XQuery function example with constant and if else condition:
declare function xf:passCurrency(
$price as xs:string)
as xs:string {
return if (fn:starts-with($price,"$"))
then 'Dollar'
else 'Ruppes'
};
Multiple markers at this line - An error occurred compiling the XQuery resource: The use of an unbound current node is not supported for XQuery resources
Simple XQuery function example with constant and if else condition:
declare function xf:passCurrency(
$price as xs:string)
as xs:string {
return if (fn:starts-with($price,"$"))
then 'Dollar'
else 'Ruppes'
};
I also got this error when I forgot to put a $ sign in front of a variable
ReplyDeleteThanks a lot
DeleteI also got this error when I forgot to put a $ sign in front of a variable. this works out.
ReplyDeletelet $tpye := if (fn:data($result="true"))
ReplyDeletethen
'success'
else
'failed'
Can u pls help us... , I am getting this erorr "The use of an unbound current node is not supported for XQuery resources"
Have you declared $result variable?
Deletethanks a lot for the help. it was because of the $
ReplyDeleteI've also had this when referencing an Xml element but getting the case of one of the characters wrong.
ReplyDelete