prof:xslt-invoke( $path as xs:string, [$input as node()?], [$params as map:map?], [$options as (element()|map:map)?] ) as item()*
Profiles and returns the result of evaluating an XSLT stylesheet at
the given path.
Any result produced by the evaluation will be prepended with a
prof:report
node containing timing and count information
about the evaluation.
If profiling is not allowed for the App Server, this function will
throw a PROF-PROFILEALLOW
exception.
Note that profiling does not cross eval/invoke boundaries. If the request being profiled calls xdmp:eval or xdmp:invoke, the individual expressions in that code will not be profiled. The overall time taken by the called code will appear as a single call in the caller's profiling report.
For details on profiling requests and interpreting the output of a profile request, see Profiling Requests to Evaluate Performance in the Query Performance and Tuning Guide.
Parameters | |
---|---|
path | The path of the stylesheet to be executed. The path is resolved against the root of the App Server evaluating the query, the Modules directory, or relative to the calling module. For details on resolving paths, see "Importing XQuery Modules and Resolving Paths" in the Developer's Guide. |
input | The context node to which the stylesheet is applied. |
params | The stylesheet parameter values for this evaluation. Each key in the map is a string representing the name of the parameter in Clark notation: "{namespaceURI}localname". Each entry in the map is the value of the corresponding parameter. |
options |
The options node. The default value is (). The node must be in the
xdmp:eval namespace. See the
xdmp:eval section for a list of options.
Additional options include:
|
Either
http://marklogic.com/xdmp/privileges/profile-my-requests
or
http://marklogic.com/xdmp/privileges/profile-any-requests
is required for prof:invoke
(the
profile-my-requests
privilege is suffient because the
resulting request is always run by the same user who initiated the call,
but the profile-any-requests
privilege will also work).
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.