This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5694 - K2-SeqExprCast-22,78,90 may raise FOAR0002
Summary: K2-SeqExprCast-22,78,90 may raise FOAR0002
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-16 10:07 UTC by Ivan Shcheklein
Modified: 2008-05-21 20:22 UTC (History)
0 users

See Also:


Attachments

Description Ivan Shcheklein 2008-05-16 10:07:41 UTC
I believe K2-SeqExprCast-22,78,90 may raise FOAR0002 due to the following rule (F&O 11.1.7):

"In casting to numerics, if the value is too large or too small to be accurately represented by the implementation, it is handled as an overflow or underflow as defined in 6.2 Operators on Numeric Values."
Comment 1 Frans Englich 2008-05-20 10:54:21 UTC
Added FOAR0002 to K2-SeqExprCast-22.

Regarding K2-SeqExprCast-78 and K2-SeqExprCast-90: these doesn't run into implementation defined limits, they are invalid values no matter what. For that reason they expect FORG0001.

Does this sound correct?
Comment 2 Ivan Shcheklein 2008-05-20 17:06:41 UTC
I'm not sure actually.

It seems that xs:unsignedLong, xs:long. xs:integer built in datatypes don't have pattern facets defined by default. They have only restrictions through maxInclusive/minInclusive and similar facets.

So, in K2-SeqExprCast-78 for example we follow the specification (F&O 17.5):

-----------------------------------
"... Casting across the type hierarchy is logically equivalent to three separate steps performed in order. Errors can occur in either of the latter two steps.

...
   2.Cast the value to the primitive type of TT, as described in 17.1 Casting from primitive types to primitive types."
-----------------------------------
   
It means we should perform the following casting operation in the intermediate step:

"-9223372036854775809" cast as xs:integer

which may raise FOAR0002.
Comment 3 Frans Englich 2008-05-21 11:13:31 UTC
Should be fixed in CVS.
Comment 4 Ivan Shcheklein 2008-05-21 20:22:45 UTC
Thanks!