Loading TOC...

MarkLogic Server 11.0 Product Documentation
plugin:install-from-filesystem

plugin:install-from-filesystem(
   $scope as xs:string
) as xs:integer

Summary

This function installs a Library Module plugin from a fixed location on the filesystem (Assets/plugins/...) into the Extensions database. Any application that calls this function must do so through a function amped to the application-plugin-registrar role. It returns the number of plugins installed.

Parameters
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:install-from-filesystem("marklogic.appservices")

(: Installs all of the plugins located in /Assets/plugins/marklogic/appservices
   into the Extensions database. :) 
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.