Tracing xquery params and returns

Help
2004-11-01
2012-10-08
  • Is there a way to get XQuery parameter and return value data while the query is running? I've already built a custom TraceListener, but I'm not sure if I can use that to get the parameter and return values.

    Just looking for a pointer to get me headed in the right direction...

    Thanks!
    Phil

     
    • Michael Kay
      Michael Kay
      2004-11-02

      You might like to try the debugger in Stylus Studio, which exchanges information with Saxon using some fairly intimate internal interfaces. In principle you could replicate this in your own TraceListener, but it's quite hard work (Stylus also interacts with Saxon at compile time to get a map of where the variables are).

      Alternatively, just use the trace() function. If full execution tracing is switched on (-T option), the output of trace() is now sent to the trace file, so you can identify more easily where it came from.