for $x in //x return xdmp:eval ($x) ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation d...@marklogic.com Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com
-----Original Message----- From: Mike Sokolov [mailto:soko...@ifactory.com] Sent: Wednesday, October 17, 2012 9:24 AM To: MarkLogic Developer Discussion Cc: David Lee; Florent Georges Subject: Re: [MarkLogic Dev General] Eval and invoke: set the context item? 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? _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general