Bug #3029
closedMissing some xsl:when and xsl:choose instructions in trace
0%
Description
The data the reproduce the case are in bug #3027.
In the case provided, the xsl:when and xsl:otherwise instructions are not listed on the trace file. The test case covers all the conditional branches, so that they should be tracked. Or is it an optimization side-effect? I've the same result with -opt:0.
I haven't this behaviour with saxon 6.5.5.
Updated by Michael Kay over 7 years ago
- Category set to Diagnostics
- Status changed from New to Won't fix
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Applies to branch 9.8 added
- Fix Committed on Branch 9.7, 9.8 added
The code is working as designed.
We try to avoid having two trace points for the same (internal) expression. Since the source XSLT
<xsl:variable name="shorturl" select="substring-after($url, 'http:/')"/>
<xsl:variable name="protocol" select="'HTTP'"/>
<external where="{$shorturl}" protocol="{$protocol}"/>
compiles to a single internal expression (a LetExpression, which is subsequently optimized by variable inlining - but the optimization isn't relevant here) it is already traced and so we avoid wrapping another trace instruction around it to represent the xsl:when. Perhaps not perfect, but I think it works, and I'm reluctant to add extra trace points which could upset the people who implement interactive debuggers based on the existing logic.
Updated by Ben Guillon over 7 years ago
Ok, thanks for the feedback.
Since I'm trying to update my little package:
https://github.com/marsgui/xslcoverage
The logic to monitor such line coverage is: "if something into the block is covered, then the wrapping conditional block is covered".
To avoid changing something for people already using the trace classes, you could add a new enter/leave function pair like saxon-ce does with enterChooseItem/leaveChooseItem :
But i guess it is more complicated or there are side-effects. Thanks for having fixed the other bugs.
Updated by O'Neil Delpratt almost 7 years ago
- Applies to branch deleted (
9.8) - Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Please register to edit this issue