Project

Profile

Help

Bug #2992

closed

treat as not testing sequence cardinality

Added by John Lumley over 7 years ago. Updated over 6 years ago.

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

100%

Estimated time:
Applies to JS Branch:
0.9
Fix Committed on JS Branch:
0.9
Fixed in JS Release:
SEF Generated with:
Platforms:
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.

Actions #1

Updated by John Lumley over 7 years 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.

Actions #2

Updated by Debbie Lockett over 7 years 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.

Actions #3

Updated by Community Admin over 6 years 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