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 5460 - [FS] Error in static typing judgement for fn:sum
Summary: [FS] Error in static typing judgement for fn:sum
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Recommendation
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Michael Dyck
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 15:03 UTC by Oliver Hallam
Modified: 2008-08-28 01:06 UTC (History)
0 users

See Also:


Attachments

Description Oliver Hallam 2008-02-07 15:03:23 UTC
The static typing rules for fn:sum at the end of section 7.2.10 of formal semantics contains the following judgment:

statEnv |-  Type2 <: xs:anyAtomicType ?
Type3 = prime(Type1)
Type4 = convert_untypedAtomic(Type3, xs:double)
FormalItemType 1, ...,FormalItemType n = Type4
statEnv |-  FormalItemType 1 can be promoted to Type0
...
statEnv |-  FormalItemType n can be promoted to Type0
statEnv |-  Type2 <: Type0
Type0 in { xs:integer, xs:decimal, xs:float, xs:double, xs:yearMonthDuration }
------------------------------------------------------------------------------
statEnv |-  (FN-URI,"sum")(Type1,Type2) : Type0 ยท aggregate_quantifier(quantifier(Type1))

The line

Type0 in { xs:integer, xs:decimal, xs:float, xs:double, xs:yearMonthDuration }

should read

Type0 in { xs:integer, xs:decimal, xs:float, xs:double, xs:yearMonthDuration, xs:dayTimeDuration }

to keep in line with the text.
Comment 1 Michael Dyck 2008-02-12 04:02:45 UTC
I agree.
Comment 2 Michael Dyck 2008-02-12 22:35:07 UTC
The Working Group also agrees. So eventually, this will become an erratum.

I'm marking this bug as resolved-FIXED. Please indicate your acceptance of this resolution by marking the bug CLOSED.
Comment 3 Michael Dyck 2008-08-28 01:06:12 UTC
The suggested fix was incorporated into the solution proposed in Bug 5459
Comment #16. That solution has been committed to the source files for the
next edition of the FS document, as part of the fix for FS erratum E033.