alert:action-insert( $config-uri as xs:string, $action as element(alert:action) ) as empty-sequence()
This function inserts the specified action
into the collection. The caller must have the
alert-admin
privilege to call this
function.
Parameters | |
---|---|
config-uri | The URI passed
to alert:make-config
.
|
$action | The representation of an action. |
http://marklogic.com/xdmp/privileges/xdmp-alert-admin
,
http://marklogic.com/xdmp/privileges/xdmp-invoke-modules-change
(if changing the modules database),
http://marklogic.com/xdmp/privileges/xdmp-invoke-modules-change-fs
(if changing the modules db to someplace on the filesystem)
xquery version "1.0-ml"; import module namespace alert = "http://marklogic.com/xdmp/alert" at "/MarkLogic/alert.xqy"; let $action := alert:make-action("") return alert:action-insert("http://acme.com/alert/message-board", $action) => Inserts the XML for the action into the database