Hi Gary, If I understand your question correctly, what you need to do is write a library module, then import it in a main module. In the main module, you can call the function defined in the imported module just as you would if it was defined locally. (: common.xqy :) module "http://www.w3.org/2003/05/xpath-functions" define function uris() as xs:string* { for $n in collection() return xs:string(xdmp:node-uri($n)) } (: main.xqy :) import module "http://www.w3.org/2003/05/xpath-functions" at "common.xqy" uris() See the developer's guide (section 12) for more detail. --Colleen
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gary Vidal Sent: Tuesday, November 06, 2007 9:41 AM To: [email protected] Subject: [MarkLogic Dev General] External Functions In XQuery Specifications they allow for functions that are defined as external. I have read through the documentation but do not see how to call them in MarkLogic. Ideally I would like to develop a interface type of functionality to allow another module to define the implementation of the module and allow that called module to use that function. But I don't see how this can be implemented. Ex. Module "urn:my-hello-world" define function hello-world($name as xs:string) as xs:string external ??How would you call this module??? Gary Vidal Sr. .Net Developer Tel: 212-592-4946 [EMAIL PROTECTED]
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
