A RESTful browser for eXist Java-Based Function Modules


http://exist-db.org/xquery/util
A module for various utility extension functions.

util:eval-with-context($expression as item(), $context as node()?, $cache-flag as xs:boolean) node()*
Dynamically evaluates an XPath/XQuery expression.
$expressionThe expression to be evaluated. If it is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.
$cache-flagThe flag for whether the compiled query should be cached. The cached query will be globally available within the db instance.

Returns the results of the evaluated XPath/XQuery expression

util:eval-with-context($expression as item(), $context as node()?, $cache-flag as xs:boolean, $eval-context-item as item()?) node()*
Dynamically evaluates an XPath/XQuery expression.
$expressionThe expression to be evaluated. If it is of type xs:string, the function tries to execute this string as the query. If the first argument is of type xs:anyURI, the function will try to load the query from the resource to which the URI resolves. If the URI has no scheme, it is assumed that the query is stored in the db and the URI is interpreted as a database path. This is the same as calling util:eval(xs:anyURI('xmldb:exist:///db/test/test.xq')). The query inherits the current execution context, i.e. all namespace declarations and variable declarations are visible from within the inner expression. The function returns an empty sequence if a whitespace string is passed.
$cache-flagThe flag for whether the compiled query should be cached. The cached query will be globally available within the db instance.
$eval-context-itemthe context item against which the expression will be evaluated

Returns the results of the evaluated XPath/XQuery expression
Return to list of all modules