W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2006

[Bug 4046] ForExprType049 - ForExprType053

From: <bugzilla@wiggum.w3.org>
Date: Fri, 08 Dec 2006 17:38:02 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1Gsjfe-0001wD-GS@wiggum.w3.org>

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

           Summary: ForExprType049 - ForExprType053
           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


I presume I have made some silly mistake, but I get type checking errors when
attempting to compile these queries.

Our XQTS implementation modifies the $input-context variable to be of type
document-node().

Given this, we deduce the type of $input-context/root/InterleaveType/* to be
a sequence of zero or more element() of xs:anyType.

The return type of fn:data is therefore deduced to be xs:untypedAtomic*.

This then fails the "as xs:decimal" part of this expression.

Note that if we were able to rewrite the query to be more specific about the
type of $input-context, we would pass this test.  That's doesn't appear to
be possible because the type of element root is anonymous.

Would anyone be so kind as to point out what we've done wrong?  

(: Name: ForExprType049 :)
(: Description: FLWOR expressions with type declaration. Non-trivial value type
promotion: Interleave value type integer|decimal -> decimal :)

(: insert-start :)
import schema default element namespace "http://typedecl";

declare variable $input-context external;
(: insert-end :)

for $test as xs:decimal in data( $input-context/root/InterleaveType/* )
return $test
Received on Friday, 8 December 2006 17:38:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:16 UTC