Loading TOC...

MarkLogic 9 Product Documentation
trgr:document-content

trgr:document-content(
   $update-kind as xs:string
) as element(trgr:document-content)

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:trigger-data-event .

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

Example

xquery version "1.0-ml";
import module namespace trgr="http://marklogic.com/xdmp/triggers" 
   at "/MarkLogic/triggers.xqy";

trgr:trigger-data-event(
  trgr:directory-scope("/myDir/", "1"),
  trgr:document-content("modify"),
  trgr:post-commit())

  => 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.