Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp:amp

xdmp:amp(
   $namespace as xs:string,
   $localname as xs:string,
   $module-uri as xs:string,
   $database as xs:unsignedLong
) as xs:unsignedLong

Summary

Returns the amp ID for the specified amp. Unlike the security library module function sec:uid-for-name , this function can be evaluated against any database and does not need to be evaluated directly against the security database. It returns the amp ID from the security database configured for the database in which the App Server evaluates against.

Parameters
namespace A function namespace.
localname A function localname.
module-uri The module URI for the amp.
database The ID of the database in which the module to which this amp refers is stored. If the module is on the filesystem under the Modules directory, then specify 0 for the database ID.

Example

xdmp:amp("http://my-app/test","my-func","/modules/my-module.xqy",
            xdmp:modules-database())
=> 2392349873545

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