- From: <bugzilla@jessica.w3.org>
- Date: Tue, 23 Sep 2014 11:56:14 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26865 Tim Mills <tim@cbcl.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |tim@cbcl.co.uk Resolution|FIXED |--- --- Comment #4 from Tim Mills <tim@cbcl.co.uk> --- I'm not so sure about CastableAs655 and CastableAs656. Following through the rules: TT = d:canonicalDouble ST = xs:decimal SV = xs:decimal(93.7) * 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. * Cast the SV, up the hierarchy, to the primitive type of the source, as described in 18.3.2 Casting from derived types to parent types. ST' = primitive-type(xs:decimal) = xs:decimal SV' = xs:decimal(93.7) * If SV is an instance of xs:string or xs:untypedAtomic, check its value against the pattern facet of TT, and raise a dynamic error [err:FORG0001] if the check fails. SV is not an instance of xs:string or xs:untypedAtomic. * Cast the value to the primitive type of TT, as described in 18.1 Casting from primitive types to primitive types. If TT is derived from xs:NOTATION, assume for the purposes of this rule that casting to xs:NOTATION succeeds. ST'' = primitive-type(d:canonicalDouble) = xs:double SV'' = xs:double(93.7) Cast the value down to the TT, as described in 18.3.3 Casting within a branch of the type hierarchy We're now casting a double value (SV'') to d:canonicalDouble. The canonical form of this value is 9.37E1 which matches the pattern facet. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Tuesday, 23 September 2014 11:56:16 UTC