[Bug 5791] CVS: K-SeqExprInstanceOf-56, 57, 58

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


Michael Dyck <jmdyck@ibiblio.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdyck@ibiblio.org




--- Comment #6 from Michael Dyck <jmdyck@ibiblio.org>  2008-06-24 20:58:26 ---
Is none a subtype of xs:integer? Yes.

Is none an instance of xs:integer? It's a bad question, because none denotes a
type, not a value.

Instead, the proper question is something like: given an expression
    Expr instance of SequenceType
if the static type of Expr is a subtype of (the type denoted by) SequenceType,
is an implementation allowed to rewrite the expression as fn:true()?

I believe you could prove that, in such a case, the only non-error outcome is
the value true, and so (according to the XQuery rewriting rules) the rewrite is
allowed.

The particular test case is an example of the general case, so I believe
returning true is conformant. (However, I'm not familiar with the extent to
which the test suite caters to rewrites.)


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 24 June 2008 21:04:09 UTC