ok, im going nuts, why am i getting an error here? PLEASE HELP
error:
XQuery Validation Error!
Unexpected token - "}</count> } </total_vacci"
Code:
xquery version "1.0";
let $count := 0
for $dept in doc("store.xml")/root/dept
return
<total_items>
{
<name>{ $dept/name/text() }</name>,
<count>
{
if (contains($dept/toys, "test"))
then let $count := $count + 1
}
</count>
}
</total_items>
XQuery Validation Error!
Unexpected token - "}</count> } </total_vacci"
Comment