Page 1 of 1

XSLT debugger to step into saxon:transform functions

Posted: Sun Dec 10, 2006 4:29 am
by jokester01au
Hi,

A handy feature of the saxon XSLT engine is the ability to split a transform up into a chain of smaller transforms using the saxon:transform function. It would be great if the oxygen xslt debugger was able to step into transforms executed in this manner.

While it is possible to manually generate files for each step in the chain, this is very tedious and it would be much better for the debugger to be able to step into the transformation executed byt saxon:transform.

Regards,
Joe.

Posted: Tue Dec 12, 2006 11:26 am
by sorin_ristache
Hello,

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.


Regards,
Sorin

XSLT debugger to step into saxon:transform functions

Posted: Thu Dec 14, 2006 1:20 am
by jokester01au
Hi,

I asked Michael Kay about this. I have reproduced his response below.

Regards,
Joe.

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.

Posted: Thu Dec 14, 2006 3:24 pm
by sorin_ristache
Hello Joe,

Thank you for letting us know. We will consider stepping into and placing breakpoints in Java extension functions in the debugger in a future version of oXygen.


Regards,
Sorin