Bug #2992
closedtreat as not testing sequence cardinality
100%
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.
Updated by John Lumley about 8 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.
Updated by Debbie Lockett almost 8 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.
Updated by Community Admin over 7 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