API support for debugging extension functions
Added by Anonymous over 17 years ago
Legacy ID: #4057824 Legacy Poster: Joseph Thomas-Kerr (jak09)
Hi, I use the saxon xslt engine in oxygen and do a lot of debugging with it. I am currently using the saxon:transform function to chain stylesheets together, and would love for oxygen to be able to step into a transform called in this manner. Unfortunately, on suggesting such a feature to syncroSoft, I was told "I am sorry, the Saxon engine does not offer a public API for knowing when extension functions are called in the stylesheet. Without such a public API it is impossible to step into the chained transforms." Is it possible to provide such an api so that oxygen can step into stylesheets called via saxon:transform? Regards, Joe.
Replies (1)
RE: API support for debugging extension funct
-
Added by Anonymous over 17 years ago
Legacy ID: #4058133 Legacy Poster: Michael Kay (mhkay)
There is in fact such a mechanism, and I believe Stylus Studio uses it. Saxon calls extension functions using a class called ExtensionFunctionCall, which you can subclass by tailoring the ExtensionFunctionFactory, which is accessible via the Configuration. In a subclass you can intercept the actual call of the underlying Java method. This only works for user-defined extension functions and for those Saxon-defined extension functions that use the standard call mechanism, but that list includes saxon:transform(). (It's not true of saxon:parse() and saxon:serialize(), because they need access to the static context, which isn't available to ordinary extension functions.) Of course oXygen may well feel that this is not a high-priority requirement, but it can be done if they choose to. I believe Stylus allows you to single-step from XSLT/XQuery debugging straight into the Java debugger when extension functions are invoked.
Please register to reply