Project

Profile

Help

Bug #1751

closed

Wrong location information when debugging

Added by Alex Jitianu over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Low
Category:
Internals
Sprint/Milestone:
-
Start date:
2013-04-29
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

I have run a transformation over the attached sample files with trace information:


As you can see in the log, the location information starting with variable *v* is wrong (for example variable *v* is located on line *4*):
<pre>
<trace saxon-version="9.5.0.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <source node="/" line="0" file="deb.xml">
  <xsl:template match="/" line="2" module="deb.xsl">
   <xsl:variable name="a" line="3" module="deb.xsl">
    <xsl:variable name="v" line="3" module="deb.xsl">
     <xsl:choose line="4" module="deb.xsl">

The problem appears to be related to variable a which is unused. Also, if you disable the optimizations the line information is correct:

java -cp saxon9ee.jar;saxon-license.lic net.sf.saxon.Transform -s:deb.xml -xsl:deb.xsl -T -opt:0

Correct output:

<trace saxon-version="9.5.0.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <source node="/" line="0" file="deb.xml">
  <xsl:template match="/" line="2" module="deb.xsl">
   <xsl:variable name="a" line="3" module="deb.xsl">
    <xsl:variable name="v" line="4" module="deb.xsl">
     <xsl:choose line="5" module="deb.xsl">

Files

deb.xsl (474 Bytes) deb.xsl Alex Jitianu, 2013-04-29 14:42
deb.xml (221 Bytes) deb.xml Alex Jitianu, 2013-04-29 14:42

Please register to edit this issue

Also available in: Atom PDF