Loading TOC...

prof:xslt-eval

prof:xslt-eval(
   $stylesheet as node(),
   [$input as node()?],
   [$params as map:map?],
   [$options as (element()|map:map)?]
) as item()*

Summary

Evaluate a string as an XSLT stylesheet for profiling. A prof:report node will be prepended to any output produced by evaluating the string. 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
stylesheet The stylesheet to be executed, an XML document or element.
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:

<mode>

The initial stylesheet mode to use.

<template>

The name of the initial template to apply.

Required Privileges

Either http://marklogic.com/xdmp/privileges/profile-my-requests or http://marklogic.com/xdmp/privileges/profile-any-requests is required for prof:eval (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 iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.