Project

Profile

Help

Bug #1928

Singleton value not recognized as numeric subscript

Added by Michael Kay almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2013-11-02
Due date:
% Done:

100%

Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
9.5
Fixed in version:
9.5.1.4

Description

In particular circumstances, a single item selected by taking a subsequence of a sequence might not be recognized as a numeric value for the purpose of subscripting.

For example, if $i is tail((1,2)) then the expression $x[$i] may use the effective boolean value of $i rather than its numeric value.

The problem arises because the constructor

public SequenceExtent(SequenceExtent<T> ext, int start, int length)

may return a SequenceExtent of length 1 rather than reducing it to a NumericValue.

History

#1 Updated by Michael Kay almost 3 years ago

  • Status changed from New to Resolved

Patch committed to the 9.5 and 9.6 branches. Test case added to QT3.

#2 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.5.1.4

Bug fix applied in Saxon maintenance release 9.5.1.4

Also available in: Atom PDF