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