Project

Profile

Help

Bug #2992

treat as not testing sequence cardinality

Added by John Lumley over 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
2016-10-11
Due date:
% Done:

100%

Applies to JS Branch:
0.9
Fix Committed on JS Branch:
0.9
Fixed in JS Release:
SEF Generated with:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

The treat as operator code is testing type conformance, but not sequence cardinality, as illustrated by cbcl-treat-as-011 -

(1 to 10)[. mod 2 = 0] treat as xs:integer

which returns (2,4,6,8,10) incorrectly.

History

#1 Updated by John Lumley over 1 year ago

  • Status changed from New to Resolved

The problem is that the treat instruction only handles type checking. Under normal (Saxon EE) compilation the argument is surrounded by an appropriate cardinality check instruction if the cardinality is anything other than "*". This has now been added to the compile-XPath() code.

#2 Updated by Debbie Lockett over 1 year ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 0.9.1

Bug fix applied in the Saxon-JS 0.9.1 beta release.

#3 Updated by Community Admin 10 months ago

  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 0.9.1
  • Applies to JS Branch 0.9 added
  • Fix Committed on JS Branch 0.9 added

Please register to edit this issue

Also available in: Atom PDF Tracking page