On 17 Oct 2012, at 06:24 , Mike Sokolov <soko...@ifactory.com> wrote:
> On 10/16/2012 03:07 PM, David Lee wrote: >> In MarkLogic the context item is the entire database, it isnt settable. >> >> >> -------------------------- > Just to expand a little on that, that's true for outermost expressions, > but there is a context item for every expression, and since xdmp:eval() > may occur within another expression, it's a reasonable question whether > its enclosing context is available or not: > > for $x in //x return xdmp:eval ("$x") > > but the answer is no ... > > XDMP-UNDVAR: (err:XPST0008) Undefined variable $x > > and I guess there is no way to provide it? If that's what you want to do, xdmp:value seems more appropriate. It evaluates in the scope of the enclosing expression, while xdmp:eval creates a new scope - in fact a new module scope. -- Mike _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general