Hello Michael and Phil.  

This holiday vacation has given me an opportunity to play with Saxon-CE again, this time concentrating on the technology as it was meant to be used where before my concern was replacing existing XSL 1.0 usage in a legacy framework.  I want to investigate the interactive transformation logic that Saxon-CE provides for handling DOM events.

I'm utilizing Phil's XMLQuire editor which is great for exploring Saxon-CE.  I appreciate that the integrated browser view updates automatically when the XSL is changed and saved.  This makes experimenting with the technology a breeze.  

However, when my experiment fails there isn't much feedback as to why.  I'm looking for techniques which will reveal why the failure occurred.  For instance, when I've written a template mode ixsl:onclick that doesn't seem to fire for whatever reason, how am I to diagnose the issue?

I have tracing set either at FINE or FINER.  At the level FINE, the initial transformation is logged:

Commencing transform type: UPDATE_HTML
processing result-document for href: main
Transform Complete

It appears that the interactive transformations (ixsl:onclick) log nothing similar when they fire.  At the log level FINER, I see the mouse click event, but no indication that code was executed as a result.

So then I thought I should add trace messages to the template as proof it executed.  I tried:

<xsl:variable name="t1" select="trace(.,'HERE')"/> 

but the message 'HERE' doesn't appear in the trace log.  I tried 

<xsl:message>HERE</xsl:message> 

but this also didn't produce any output in the log (even with templates that are working properly).

Loading the project in oXygen, I fine the XSL doesn't validate on:

<xsl:result-document href="#main" method="append-content">

because the method value is unknown.  So using oXygen's debugger to step through code is not possible.  Anyway, oXygen wouldn't understand the interactive transformations as they occur.

In the three days I've spent playing with this technology, I've managed to push through several issues already with some luck, finding silly programmer errors as the cause.  With Javascript, I have a debugger I can use to get the feedback necessary to determine this cause.  With Saxon-CE, not so much.  I would like to know how to properly use fn:trace() at least as a technique for debugging.  Are there other techniques for debugging Saxon-CE code?

Todd Gochenour
ServiceLogix, Inc.
Denver, CO