Actions
Bug #6448
closedSaxon-HE 12.4J has wrong column number in trace, unlike Saxon-EE
Start date:
2024-06-07
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java
Description
In XSpec code coverage reports, I get different results with Saxon-HE vs. Saxon-EE (v12.3, via Oxygen), even when I use -opt:0
with both. The Saxon-EE results look correct. The Saxon-HE results occur in both v12.3 and v12.4.
I have reproduction steps below that take XSpec out of the picture.
Sample XSLT¶
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
<xsl:template match="*">
<root>
<node type="on-non-empty">
<xsl:sequence select="@nonexistent-attribute" />
<xsl:on-non-empty> <!-- Expected miss -->
<xsl:text>400</xsl:text> <!-- Expected miss -->
</xsl:on-non-empty> <!-- Expected miss -->
</node>
</root>
</xsl:template>
</xsl:stylesheet>
Command¶
java -cp "%SAXON_CP%" net.sf.saxon.Transform -xsl:xsl-on-non-empty-01.xsl -s:xsl-on-non-empty-01.xsl -T -opt:0 -o:result.xml 2>trace-saxon-he-12.4.xml
Resulting Trace¶
<trace saxon-version="12.4" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<source node="/xsl:stylesheet" line="2" file="xsl-on-non-empty-01.xsl">
<xsl:template match="*" line="3" column="27" module="xsl-on-non-empty-01.xsl">
<LRE name="root" line="4" column="11" module="xsl-on-non-empty-01.xsl">
<LRE name="node" line="5" column="33" module="xsl-on-non-empty-01.xsl">
<ATTR name="type" line="5" column="33" module="xsl-on-non-empty-01.xsl">
</ATTR>
<condSeq line="6" column="22" module="xsl-on-non-empty-01.xsl">
<xsl:text text="400" line="8" column="21" module="xsl-on-non-empty-01.xsl">
</xsl:text>
</condSeq>
</LRE>
</LRE>
</xsl:template>
</source><!-- /xsl:stylesheet -->
</trace>
The puzzling part of the trace is <condSeq line="6" column="22" module="xsl-on-non-empty-01.xsl">
because line 6 in XSLT is the following (i.e., column 22 is in the middle of the instruction):
<xsl:sequence select="@nonexistent-attribute" />
Saxon-EE reports column 57, at the end of the instruction.
This may be related to https://saxonica.plan.io/issues/6428 or https://saxonica.plan.io/issues/6405, but I'm creating a new issue to be on the safe side.
Please register to edit this issue
Actions