plugin:capability( $capability as xs:string, $uri as xs:string, [$scope as xs:string] ) as xdmp:function?
This function returns a function pointer implementing a given capability from a particular plugin. If the plugin doesn't exist an exception is thrown. If the plugin does exist but the capability isn't present, an empty sequence is returned.
xquery version "1.0-ml"; import module namespace plugin = "http://marklogic.com/extension/plugin" at "/MarkLogic/plugin/plugin.xqy"; plugin:capability( "http://marklogic.com/appservices/infostudio/collector/cancel", "plugin:collector-filescan.xqy") (: Returns a pointer to the function that implements the 'cancel' capability. :)