W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2007

[Bug 4200] Static typing of annex-4

From: <bugzilla@wiggum.w3.org>
Date: Fri, 12 Jan 2007 15:25:57 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1H5OI1-0007B7-7v@wiggum.w3.org>

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

           Summary: Static typing of annex-4
           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


This fails static type checking because [.=$arg2] is an attempt to compare an
xs:anyAtomicType against another xs:anyAtomicType.


(: Name: annex-4 :)
(: Description: User defined function # 4 from annex E of F& O Specs. :)

declare namespace eg = "http://example.org";

declare function eg:value-intersect (
  $arg1 as xs:anyAtomicType*,
  $arg2 as xs:anyAtomicType* ) as xs:anyAtomicType*
{
  fn:distinct-values($arg1[.=$arg2])
};

let $arg1 as xs:anyAtomicType := 1
let $arg2 as xs:anyAtomicType := 1
return
 eg:value-intersect($arg1,$arg2)
Received on Friday, 12 January 2007 15:26:00 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:32 UTC