Project

Profile

Help

Bug #6256

closed

function-name returns an empty sequence for node-name#0, string#0 and more?

Added by Nico Kutscherauer about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2023-11-20
Due date:
% Done:

0%

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

Description

Hi,

I was faced with a strange behavior of Saxon 12: The XPath expression function-name(node-name#0) returns an empty sequence. In oposite function-name(node-name#1) returns fn:node-name. Same for string#0, though position#0 returns fn:position as expected.

I demonstrate it in this GitHub project:

https://github.com/nkutsche/saxon-issue-function-name-zero-arg/blob/main/src/main/resources/xsl/main.xsl

Here you see the result:

https://github.com/nkutsche/saxon-issue-function-name-zero-arg/actions/runs/6934049245/job/18861459121#step:4:19

Also interesting in Saxon 11 it returned anon instead of an empty sequence. See: https://github.com/nkutsche/saxon-issue-function-name-zero-arg/actions/runs/6934049245/job/18861459121#step:5:411

Is this a desired behavior?

Best Regards, Nico

Please register to edit this issue

Also available in: Atom PDF