[Bug 4199] Static typing of K-GenCompEq-9, 10, 32, 33

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

           Summary: Static typing of K-GenCompEq-9, 10, 32, 33
           Product: XML Query Test Suite
           Version: 1.0.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML Query Test Suite
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The way in which general comparisons are expanded in the Formal Semantics spec
mean that these four queries which really should pass static type checking do
not.

some $v1 in fn:data(([Expr1]Expr)) satisfies
  some $v2 in fn:data(([Expr2]Expr)) satisfies
    let $u1 := fs:convert-operand($v1, $v2) return
      let $u2 := fs:convert-operand($v2, $v1) return
        [GeneralOp]GeneralOp ($u1, $u2)

e.g. if v1 has type xs:untypedAtomic and v2 has type (xs:untypedAtomic |
xs:decimal), type checking will fail.

(:*******************************************************:)
(: Test: K-GenCompEq-10                                  :)
(: Written by: Frans Englich                             :)
(: Date: 2006-10-05T18:29:37+02:00                       :)
(: Purpose: Example from the XPath 2.0 specification.    :)
(:*******************************************************:)
not((xs:untypedAtomic("1"), xs:untypedAtomic("2")) =
                                   (xs:untypedAtomic("2.0"), 3.0))

Received on Friday, 12 January 2007 15:16:26 UTC