MarkLogic Server 11.0 Product Documentation
trgr:trigger-module

trgr:trigger-module(
   $database as xs:anyAtomicType,
   $root as xs:string,
   $path as xs:string
) as element(trgr:module)

Summary

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.

Usage Notes

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.

Example

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().
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy