W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2004

[F&O] IBM-FO-043: OK to cast an empty sequence

From: Don Chamberlin <chamberl@almaden.ibm.com>
Date: Tue, 16 Mar 2004 16:56:17 -0800
To: public-qt-comments@w3.org
Cc: Andrew Eisenberg <andrew.eisenberg@us.ibm.com>, Scott Boag <scott_boag@us.ibm.com>, Henry Zongaro <zongaro@ca.ibm.com>
Message-ID: <OF6A6B504D.EF36C434-ON88256E5A.00010740-88256E5A.00051EDF@us.ibm.com>
(IBM-FO-043): Section 17 (Casting), paragraph 3 says "If an empty sequence 
is passed to a cast expression, an error is raised [invalid value for 
cast]." This is not correct. The XQuery syntax provides a way for the user 
to specify whether empty sequences are acceptable in a path expression. 
This feature was first added to the XQuery language document in the Nov. 
15, 2002 version, after discussions at the Query Working Group meeting at 
Chapel Hill, NC. The feature is described in the XQuery language document, 
Section 3.12.3 (Cast) as follows:

If the result of atomization is an empty sequence:
(a) If ? is specified after the target type, the result of the cast 
expression is an empty sequence.
(b) If ? is not specified after the target type, a type error is raised. 
[XQ0004] [XP0006]

This part of the F&O document should be made consistent with the language 

--Don Chamberlin
Received on Tuesday, 16 March 2004 19:56:53 UTC

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