[xquery-talk] Sequences
David Lee
dlee at calldei.com
Fri Jan 31 16:16:52 PST 2014
The piece if information you are missing is that sequences dont nest.
They flatten.
(1,2,3) == (1,(2,3)) == (1,((2),(3)) ...
No such thing as sequences inside a sequence (unlike what you might expect if you thought of them as arrays.
So
let $a := (1,2,(function(),function()),5,6) ==
(1,2,function(),function(),5,6)
{( assuming you mean a full function declaration )}
$a[3] == function() ...
$a[3][2] == ()
-----Original Message-----
From: Misztur, Chris [mailto:CMisztur at macleanfogg.com]
Sent: Friday, January 31, 2014 7:14 PM
To: David Lee
Cc: talk at x-query.com
Subject: Re: Sequences
So can I ever get at $seq[3][2]() ?
(1,2,(function(),function()),5,6)
> On Jan 31, 2014, at 6:04 PM, "David Lee" <dlee at calldei.com> wrote:
>
> 9
>
> Now for the fun ... how big is this sequence ( (),((),()))
>
>
> -----Original Message-----
> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of Misztur, Chris
> Sent: Friday, January 31, 2014 6:55 PM
> To: talk at x-query.com
> Subject: [xquery-talk] Sequences
>
> Is this a sequence of 7 or 9 items?
>
> (
> 1,
> 2,
> 3,
> (4,5,6),
> 7,
> 8,
> 9
> )
>
> ________________________________
>
> The contents of this message may be privileged and confidential. Therefore, if this message has been received in error, please delete it without reading it. Your receipt of this message is not intended to waive any applicable privilege. Please do not disseminate this message without the permission of the author.
>
> Please consider the environment before printing this e-mail
>
>
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk
________________________________
The contents of this message may be privileged and confidential. Therefore, if this message has been received in error, please delete it without reading it. Your receipt of this message is not intended to waive any applicable privilege. Please do not disseminate this message without the permission of the author.
Please consider the environment before printing this e-mail
More information about the talk
mailing list