[Bug 5460] [FS] Error in static typing judgement for fn:sum

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5460

           Summary: [FS] Error in static typing judgement for fn:sum
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: jmdyck@ibiblio.org
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


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.

Received on Thursday, 7 February 2008 15:03:35 UTC