No trace execution point around main XQuery body expression
When trace code is injected into a query during query compilation, trace instructions are injected at strategic points, e.g. round expressions that construct new nodes, around the body of a function, around the branches of a conditional, etc. This is designed to enable a useful level of tracing if the injected code is used to trace execution.
There is no trace point around the main expression of a query, which makes things difficult for certain kinds of tracing application, e.g. one that wants to instrument timings or monitor code coverage.
This is being fixed by adding a new trace point with locationKind = XQUERY_BODY. The effect is that when a query is run with the -T option, there is an extra wrapper element around the entire trace output.
Please register to edit this issue