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

[Bug 3717] Cardinality inference for 'cast as' should take operand into account

From: <bugzilla@wiggum.w3.org>
Date: Mon, 18 Sep 2006 23:48:17 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1GPSqX-0005zj-DT@wiggum.w3.org>

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





------- Comment #3 from simeon@us.ibm.com  2006-09-18 23:48 -------
It seems that if users are able to write functions like that:

xs:date(if (cond()) then () else "1999-12-31")

then static typing must be consistent with the dynamic semantics.

Another example is when using arithmetics:

declare function mycast($floatvalue as xs:float?) as xs:decimal? {
  xs:decimal($floatvalue * 0.2E-5)
};

So either such queries should type check (which is what currently happens), or
someone has to decide that constructors functions cannot take an empty
sequence.

Either way, I think either change is too big for the stage of development
XQuery
is right now.

- Jerome
Received on Monday, 18 September 2006 23:48:32 UTC

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