trgr:property-content

trgr:property-content(
   $property-name as xs:QName
) as element(trgr:property-content)

Summary

Returns the XML representation of a property part to a triggering event, usable as the content parameter of a trigger event constructor such as trgr:trigger-data-event .

Parameters
property-name The QName of the property.

Usage Notes

Adding, changing or removing the $property-name document property matches this event part.

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:property-content(
    fn:QName("", "myInterestingProperty")),
  trgr:post-commit())

  => A property modification trigger event that can
     be used to create a trigger which fires whenever 
     the property myInterestingProperty is added, modified
     or removed from a document in /myDir/.
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy