http://docs.marklogic.com/xdmp:invoke
$path The path of the module to be executed as a string. The path is resolved against the root of the App Server evaluating the query, the Modules directory, or relative to the calling module. The module is considered to be JavaScript if the module path ends with a file extension matching the ones configured for application/vnd.marklogic-javascript in MarkLogic's Mimetypes configuration. For details on resolving paths, see "Importing XQuery Modules and Resolving Paths" in the Application Developer's Guide. Cheers, Geert From: <general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>> on behalf of Florent Georges <li...@fgeorges.org<mailto:li...@fgeorges.org>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Date: Monday, May 29, 2017 at 9:36 PM To: MarkLogic Developer Discussion <general@developer.marklogic.com<mailto:general@developer.marklogic.com>> Subject: [MarkLogic Dev General] Invoke SJS from XQuery Hi, Is there any way to invoke a JavaScript script from XQuery, the same way it is possible to invoke an XQuery module using xdmp:invoke()? The only way I can think of is using xdmp:javascript-eval(), constructing an expression using 'require(' || $href || ')'. But it would be nice not to have to rely on string concatenation and eval. You know, little bobby tables... Regards, -- Florent Georges H2O Consulting http://h2o.consulting/
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general