trgr:trigger-module( $database as xs:anyAtomicType, $root as xs:string, $path as xs:string ) as element(trgr:module)
Returns the XML representation of a trigger module which can be used
as the module parameter of
trgr:create-trigger
.
Parameters | |
---|---|
database | A database-id (all digits) or database name. |
root | The root path within the database. |
path | The path to the module relative to $root
within the database identified by $database-id .
|
Note: A database name which is the same as a database ID will be treated as an ID. Do not use a database ID as database name.
xquery version "1.0-ml"; import module namespace trgr="http://marklogic.com/xdmp/triggers" at "/MarkLogic/triggers.xqy"; trgr:trigger-module( xdmp:database("Documents"), "/modules/", "log-create.xqy") => An internal XML representation of the trigger module, usable as the module parameter of trgr:create-trigger(). trgr:trigger-module( "Documents", "/modules/", "log-create.xqy") => An internal XML representation of the trigger module, usable as the module parameter of trgr:create-trigger().