trgr:collection-scope( $uri as xs:string ) as element(trgr:collection-scope)
Returns the XML representation of a collection scope, usable as the
scope parameter of a trigger event constructor such as
trgr:trigger-data-event
.
Parameters | |
---|---|
uri | The collection uri. |
xquery version "1.0-ml"; import module namespace trgr="http://marklogic.com/xdmp/triggers" at "/MarkLogic/triggers.xqy"; trgr:trigger-data-event( trgr:collection-scope("/myCollection/"), trgr:document-content("modify"), trgr:post-commit()) => A collection modification trigger event that can be used to create a trigger which fires whenever the /myCollection/ collection is modified.