- From: Jim Melton <jim.melton@acm.org>
- Date: Mon, 14 Jun 2004 11:57:12 -0600
- To: "Roger L. Costello" <costello@mitre.org>
- Cc: <public-qt-comments@w3.org>, "'Roger L. Costello'" <costello@mitre.org>
Roger,
While I regret that XQuery's sequences cannot be nested (and have raised a
comment on this subject), I don't believe that the situation that you
observed constitutes an exception to this rule.
At 11:31 AM 6/14/2004 Monday, Roger L. Costello wrote:
>Hi Folks,
>
>In section 3.3 of the XPath spec it says:
>
>"Sequences are never nested-for example, combining the values 1, (2, 3), and
>( ) into a single sequence results in the sequence (1, 2, 3)."
>
>Aren't the arguments to a function a sequence? If sequences cannot be
>nested, then the example in 3.1.5 would not be valid:
The answer, in short, is that the arguments to a function are not, in fact,
a sequence. It is true that the syntax of function invocation involves a
comma-separated list of argument values enclosed in parentheses, but that
is explicitly not syntactically defined to be a sequence.
>"my:two-argument-function((1, 2), 3) denotes a function call with two
>arguments, the first of which is a sequence of two values."
The statement that you quote is precise and accurate (and correct). The
function call has two arguments. It does not have a "sequence of two
values", one of which is itself another "sequence of two values". It has
two arguments. The first argument is the value that is a sequence of
values "(1, 2)" and the second argument is the value "3".
>Do we not have a sequence with a nested sequence in this example?
Nope, we do not.
>It would seem that sometimes sequences can be nested (e.g., in function
>calls) and other times sequences cannot be nested.
Not true, since argument lists are (a)not defined syntactically to be a
sequence and (b)not represented in the data model at all, particularly not
as a sequence.
>Can someone clarify this please? /Roger
Hope this helps,
Jim
========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144
Oracle Corporation Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive Standards email: jim dot melton at acm dot org
Sandy, UT 84093-1063 Personal email: jim at melton dot name
USA Fax : +1.801.942.3345
========================================================================
= Facts are facts. However, any opinions expressed are the opinions =
= only of myself and may or may not reflect the opinions of anybody =
= else with whom I may or may not have discussed the issues at hand. =
========================================================================
Received on Monday, 14 June 2004 13:55:36 UTC