[Bug 5288] [XQuery] XPST0005 and conditional expressions

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





------- Comment #12 from mrys@microsoft.com  2008-04-16 18:56 -------
(In reply to comment #11)
> Could you please give a bit of background as to the reason for this decision?
> I was hoping that your decision would be to limit XPST0005 to steps in a path
> expression.
> Am I right in thinking that all XQuery Update expressions type as
> empty-sequence, and therefore must raise XPST0005 if static typing is enalbed?
> Do you know whether other implementations (which support static typing) raise
> this error as per the specification?

SQL Server 2005/2008 is implementing pessimistic static typing, however, we do
not error out on if (/a) then () else () (we are not supporting fn:error). We
often raise static errors on other expressions than path expressions that can
lead to always empty results, but raise more specific errors (e.g., () + 5 will
raise a static error).

Received on Wednesday, 16 April 2008 18:57:42 UTC