Troubles debugging in XSLTC (Compiled XSLT) mode
Here should go questions about transforming XML with XSLT and FOP.
Troubles debugging in XSLTC (Compiled XSLT) mode
Post 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
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
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
-
- Posts: 5
- Joined: Mon Nov 08, 2004 10:20 pm
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
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
-
- Posts: 5
- Joined: Mon Nov 08, 2004 10:20 pm
BUG: <xsl:with-param> causes debug abort
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.
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.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
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
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
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service