- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Wed, 2 Jan 2002 18:17:30 -0500 (EST)
- To: www-xpath-comments@w3.org
Hi, In the basic conversion rules, when the required type is a sequence of simple values, it says: "If the given value is a sequence containing one or more nodes, each such node is replaced by its typed value, resulting in a sequence of simple values." I think it would be worth giving a note to indicate what happens when the typed value of a node is an empty sequence or a sequence with more than one value. For example, given the following XML: <lists> <list>1</list> <list>2 3 4</list> <list /> </lists> Assuming that the list elements are defined with list types, if the required type is a sequence of doubles, and the given value is a sequence containing the three list elements in turn, is the sequence of simple typed values (1, 2, 3, 4)? or is it (1, 2) or is it an error because the last list element doesn't have any items in its typed value, or because the second list has more than one item in its typed value? The reason that this is confusing is that in other contexts (where the 'basic conversion rules' don't apply - with comparisons or arithmetic expressions), you get an error if you have empty sequences or sequences that contain more than one item are errors. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Thursday, 3 January 2002 07:44:51 UTC