One issue I struggled with was trying to catch focus/blur events on a contentEditable element.  I found a post from Phil in another email thread that explains these events do not bubble up to the document like normal and suggests a javascript event handler instead.  

After seeing usage <xsl:value-of select="ixsl:call()"/> referenced in one of the sample applications, I went back and tried this:

<xsl:template name="main" match="/">
   <xsl:result-document href="#main" method="append-content">
      <xsl:value-of select="trace(.,'here')"/>
      <xsl:apply-templates select="*"/>
   </xsl:result-document>
</xsl:template>

and now I do see the trace message 'here' in the log, However I also get all the concatenated fn:text(/) output displayed as a result of the <xsl:value-of/> prior to the HTML generated by the <xsl:apply-templates/>.  I would expect the result of trace() to be an empty string.




On Sat, Dec 28, 2013 at 3:44 PM, Michael Kay <mike@saxonica.com> wrote:
If a template rule isn't firing, it's always difficult to work out why. It could be, for example, that a different template rule is firing in preference: but the tracing would typically reveal this.

I'm afraid at this stage my next step would be to run in GWT development mode using the Java level debugger - but that's because I'm typically looking for Saxon bugs rather than stylesheet bugs.

What element is the event on? We know there are issues intercepting onClick on things like button objects where Javascript has a built-in behaviour.

Michael Kay
Saxonica


On 28 Dec 2013, at 18:54, Todd Gochenour <todd.gochenour@gmail.com> wrote:

> 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
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help