Re: XQuery (sandbox) and declare variable - err:XQST0049
2006-12-01 08:49:43 GMT
> I'm trying to use variables in my XQuery: > > ---XQuery--BEGIN----------------------------------------- > > declare variable $foo as xs:integer := 7; > > //* > ---XQuery--END----------------------------------------- > > But I get the following error: "org.exist.xquery.XPathException: > err:XQST0049: It is a static error if more than one variable declared > or imported by a module has the same expanded QName. Variable: foo > [at line 1, column 40]" This only happens with the sandbox. If you execute your query in the Java admin client, all will be ok. The sandbox is itself written in XQuery, so we are executing an XQuery from within an XQuery. This may cause problems sometimes, especially with prolog expressions. I'll try to fix this. Wolfgang ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
It looks like the cause is
util:eval(), which reuses the outer context.
If that helps...
RSS Feed