Loading TOC...

trgr:trigger-module

trgr:trigger-module(
   $database-id as xs:unsignedLong,
   $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-id A database-id.
root The root path within the database.
path The path to the module relative to $root within the database identified by $database-id.

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().
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.