trgr:document-content( $update-kind as xs:string ) as element(trgr:document-content)
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" |
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.