Mark Logic Command: invoke

invoke calls a server side xquery on a Mark Logic server

Synopsis

invoke [-c uri|-connect uri] [-t] [-v] script [varname value [varname value ...]]

Description

Invokes a script (xquery file) residing on a Mark Logic server.
Optionally passing in variable (parameters) to the script.


-c,connect uriUse the connection string instead of $MLCONNECT
-tOutput result as text (instead of xml).
-v Assign variables (parameters) from the remaining arguments
scriptpath to script on the marklogic server


Example

Assuming the prefix "ml" is imported as the marklogic module, invoke the "test.xq" script on the server passing in a parameter "id" with the value "123"

ml:invoke -v test.xq id 123


The "-t" option is used to serialize directly as text. This converts non element output such as attributes directly to text.
Otherwise xml output is used. Using -t and redirecting to a variable results in a string type variable, otherwise an XML type variable is produced.


See Serialization.





MarkLogic Extension Module
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki