Loading TOC...

trgr.documentContent

trgr.documentContent(
   update-kind as String
) as element(trgr.documentContent)

Summary

Returns the XML representation of a document part of a triggering event, usable as the content parameter of a trigger event constructor such as trgr.triggerDataEvent .

Parameters
update-kind "create", "modify", or "delete"

Example

const trgr = require('/MarkLogic/triggers');

trgr.triggerDataEvent(
  trgr.directoryScope('/myDir/', '1'),
  trgr.documentContent('modify'),
  trgr.postCommit());

// A directory modification trigger event that can
// be used to create a trigger which fires whenever the
// /myDir/ directory in the database is modified.
   

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