Loading TOC...

xdmp:function-module

xdmp:function-module(
   $function as xdmp:function
) as xs:string

Summary

Returns the module location (if any) that the xdmp:function value refers to.

Parameters
$function The function value.

Example

xquery version "1.0-ml";
declare namespace admin="http://marklogic.com/xdmp/admin";

let $fn := xdmp:function(xs:QName("admin:get-configuration"),
             "/MarkLogic/admin.xqy")
return
xdmp:function-module($fn)

=> "/MarkLogic/admin.xqy"

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

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • Should this function return the module URI if the function has not been constructed with the two-parameter version of xdmp:function()? When I use the one-parameter version of xdmp:function() for an in-scope function, xdmp:function-module() returns the empty-sequence. The use-case would be for a re-locatable module that wants to eval() some code that imports itself in order to execute a function in another transaction.