MarkLogic Server 11.0 Product Documentation
plugin:capability

plugin:capability(
   $capability as xs:string,
   $uri as xs:string,
   [$scope as xs:string]
) as xdmp:function?

Summary

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.

Parameters
capability The desired capability to match.
uri The unique identifier of the plugin.
scope A scope identifier. This must be a "dotted" package-style path, which will be resolved relative to the marklogic-dir/Assets/plugins directory. For example, a $scope value of my-plugin-scope is resolved to the marklogic-dir/Assets/plugins/myplugin-scope directory and a $scope value of my.plugin.scope is resolved to the marklogic-dir/Assets/plugins/my/plugin/scope directory.

Example

  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. :)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy