Project

Profile

Help

Bug #6405

closed

Saxon-EE 12.4J: saxon:column-number() seems incorrect for text nodes not inside xsl:text

Added by A Galtman 7 months ago. Updated 5 months ago.

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

100%

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

Description

I'm using the saxon:column-number() function to get column numbers of nodes in an XSLT stylesheet file. For a text node inside xsl:text , saxon:column-number() returns the column number that I expect, which is the column where the text node begins.

For a text node not inside xsl:text, the output of saxon:column-number() seems incorrect:

  • If the text node is all on one line of the XSLT file, saxon:column-number() seems to return the position of the parent element's end tag
  • If the text node is across multiple lines of the XSLT file, saxon:column-number() seems to return the position of the parent element's start tag

The documentation page https://www.saxonica.com/documentation12/index.html#!functions/saxon/column-number describes the result when the input node is an element node, but it doesn't say the input node must be an element node. What is supposed to happen when the input node is a text node, and why?

To reproduce this behavior, run the attached XSLT transformation in Saxon-EE 12.4J. (I've been running it via Oxygen 26.1 because I don't have an EE license.)

Thanks!


Files

check-column-number.xsl (1.53 KB) check-column-number.xsl Reproduces behavior A Galtman, 2024-04-28 20:54
text-inside-when.xsl (861 Bytes) text-inside-when.xsl Supporting file A Galtman, 2024-04-28 20:55

Please register to edit this issue

Also available in: Atom PDF