xdmp:eval-in( $xquery as xs:string, $ID as xs:unsignedLong*, [$vars as item()*], [$modules as xs:unsignedLong?], [$root as xs:string?] ) as item()*
[DEPRECATED: use xdmp:eval
with the
database option instead] Returns the result of evaluating a string as
an XQuery module in a given database.
xdmp:eval-in("1+1",2348790529) => 2
xquery version "0.9-ml" declare namespace my='http://mycompany.com/test' let $s := "xquery version '0.9-ml' declare namespace my='http://mycompany.com/test' define variable $my:x as xs:string external concat('hello ', $my:x)" return (: evaluate the query string $s using the variables supplied as the second parameter to xdmp:eval :) xdmp:eval-in($s, xdmp:database("Documents"), (xs:QName("my:x"), "world")) => hello world
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.