Loading TOC...

MarkLogic 10 Product Documentation
trgr.documentScope

trgr.documentScope(
   uri as String
) as element(trgr.documentScope)

Summary

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

Parameters
uri The document uri.

Example

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

trgr.triggerDataEvent(
  trgr.documentScope('/myDir/interesting.xml'),
  trgr.documentContent('modify'),
  trgr.postCommit());

// A collection modification trigger event that may
// be used to create a trigger which fires whenever the
// document with URI /myDir/interesting.xml is modified.
   

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