xdmp:amp( $namespace as xs:string, $localname as xs:string, $module-uri as xs:string, $database as xs:unsignedLong ) as xs:unsignedLong
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.
xdmp:amp("http://my-app/test","my-func","/modules/my-module.xqy", xdmp:modules-database()) => 2392349873545