Page 1 of 1

Troubles debugging in XSLTC (Compiled XSLT) mode

Posted: Mon Nov 08, 2004 10:30 pm
by Guest
Hi,

Here is my setup:

JAXP XSLT transformer value is org.apache.xalan.xsltc.trax.TransformerFactoryImpl

Engine: Xalan 2.6.2

Problem: whenever I'm trying to step into the code like this

<xsl:apply-templates select="$nodesetEntryElements" mode="createBaseFrame">
<xsl:with-param name="titlePattern" select="$titlePattern"/>
<xsl:with-param name="descriptionPattern" select="$descriptionPattern"/>
</xsl:apply-templates>

the debugger behaves like I hit Run to the end instead of step into. It seems like apply-templates statement is key here. Debugger steps into call-templates just fine.


Is XSLTC debugging fully supported by Oxygen (including apply-templates tags)?

Thank you,
-Boris

Posted: Tue Nov 09, 2004 1:12 pm
by george
Hi Boris,

The XSLT Debugger works with Xalan (not XSLTC).
The problem may be that no template matches your apply-templates.
If you still have problems it will help if you can post a cut down sample that can be used to reproduce the problem.

Best Regards,
George

Posted: Tue Nov 09, 2004 10:43 pm
by Boris
Thank you for the reply, George.

I forgot to mention that all my XSLs work perfectly in non-XSLTC mode both under debugger and outside. The problem only happens when I turn on "compiled" mode.

I'm trying to locate the "bad" spot in XSLs that cause the failure with the help of the Oxygen's debugger...

Our XSLs are very complex and it will be very difficult for me extract just the relevant piece. As I said above, I'm looking for that "culprit" code myself.

I didn't quite understand your answer: is XSLTC mode supported by Oxygen debugger or not?

Thanks,

-Boris

BUG: <xsl:with-param> causes debug abort

Posted: Wed Nov 10, 2004 2:08 am
by Boris
I've narrowed it down and have data for the bug reproduction.

1. Set transformer to org.apache.xalan.xsltc.trax.TransformerFactoryImpl
2. Switch to debug perspective
3. Pick Xalan as your engine
4. Prepare your data as below:


XSL:
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/">
<TABLE>
<xsl:for-each select="//number">
<TR>
<TH>
<xsl:choose>
<xsl:when test="text() mod 2">
<xsl:apply-templates select=".">
<xsl:with-param name="type">odd</xsl:with-param>
</xsl:apply-templates>

</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>
</xsl:otherwise>
</xsl:choose>
</TH>
</TR>
</xsl:for-each>
</TABLE>
</xsl:template>

<xsl:template match="number">
<xsl:param name="type">even</xsl:param>
<xsl:value-of select="."/>
<xsl:text> (</xsl:text>
<xsl:value-of select="$type"/>
<xsl:text>)</xsl:text>
</xsl:template>


</xsl:stylesheet>




XML:
<source>

<number>1</number>
<number>3</number>
<number>4</number>
<number>17</number>
<number>8</number>

</source>

Problem:
Description: java.lang.NullPointerException when trying to StepInto the bold line in the XSL sample above and execution is aborted.

Posted: Wed Nov 10, 2004 4:53 pm
by george
Hi Boris,

The JAXP setting has no effect for the debugger. The debugger supports Xalan 2.5.1, Saxon 6.5.3 and SaxonB 8.1.1.

I tried debugging your files with all the tree XSLT processors above but everything went fine. Please contact us at support@oxygenxml.com in order to give you instructions to enable the application logging so we can get more details.

Best Regards,
George