Project

Profile

Help

Bug #4970

closed

line/column number in trace listener

Added by Air Quick about 3 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2021-04-16
Due date:
% Done:

100%

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

Description

Line and column numbers obtained in Saxon 9.9.1.8 trace listener:

$ cat in.xml
<?xml version="1.0" encoding="UTF-8"?>
<iron weight="1" />
$ java -jar ${SAXON_JAR} -s:in.xml -xsl:'https://github.com/xspec/xspec/raw/v2.0.7/tutorial/coverage/demo.xsl' -T
<trace saxon-version="9.9.1.8" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <source node="/iron" line="2" file="in.xml">
  <xsl:template match="iron" line="11" column="50" module="demo.xsl">
   <LRE name="shield" line="12" column="11" module="demo.xsl">
    <xsl:apply-templates line="13" column="48" module="demo.xsl">
     <source node="/iron/@weight" line="2" file="in.xml">
      <xsl:template match="@* | node()" line="8" column="48" module="demo-imported.xsl">
       <xsl:copy line="9" column="13" module="demo-imported.xsl">
       </xsl:copy>
      </xsl:template>
     </source><!-- /iron/@weight -->
    </xsl:apply-templates>
   </LRE>
  </xsl:template>
 </source><!-- /iron -->
<?xml version="1.0" encoding="UTF-8"?><shield weight="1"/></trace>

are different from 10.5:

$ java -jar ${SAXON_JAR} -s:in.xml -xsl:'https://github.com/xspec/xspec/raw/v2.0.7/tutorial/coverage/demo.xsl' -T
<trace saxon-version="10.5" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <source node="/iron" line="2" file="in.xml">
  <xsl:template match="iron" line="11" module="demo.xsl">
   <LRE name="shield" line="12" column="11" module="demo.xsl">
    <xsl:apply-templates line="13" column="3" module="demo.xsl">
     <source node="/iron/@weight" line="2" file="in.xml">
      <xsl:template match="@* | node()" line="8" module="demo-imported.xsl">
       <xsl:copy line="10" column="3" module="demo-imported.xsl">
       </xsl:copy>
      </xsl:template>
     </source><!-- /iron/@weight -->
    </xsl:apply-templates>
   </LRE>
  </xsl:template>
 </source><!-- /iron -->
<?xml version="1.0" encoding="UTF-8"?><shield weight="1"/></trace>

It looks to me 10.5 is incorrect or less consistent at best.

Please register to edit this issue

Also available in: Atom PDF