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

[Bug 4277] CastAs672

From: <bugzilla@wiggum.w3.org>
Date: Fri, 26 Jan 2007 10:52:12 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1HAOgm-0005Rh-7Z@wiggum.w3.org>

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

           Summary: CastAs672
           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: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


The query CastAs672 reads:

let $var := ("a","b","c") cast as xs:ENTITY 
return $var instance of xs:ENTITY

and the expected result is a dynamic error.

However, I believe that the rules on "errors and optimization" allow the value
true to be returned. Static type inference can deduce that the result of the
expression is either true or an error; the rules in 2.1 therefore allow the
system to return true without checking for the error.

This conclusion is not obvious from a reading of section 2.1, but I believe it
is correct. Section 2.1 doesn't allow the system to dispense with cardinality
checks on a sequence that is wholly or partly evaluated; but it does allow such
checks to be skipped in the case of a sequence that is not evaluated at all,
because the value of the sequence is never used, and I believe that is the case
here.

Suggestion: change the test to

("a","b","c") cast as xs:ENTITY 

which forces the error.
Received on Friday, 26 January 2007 10:52:21 UTC

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