|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] ANSWERS to "What's wrong with XQuery" questionMike Sokolov sokolov at ifactory.comWed Jul 28 13:10:21 PDT 2010
On 07/28/2010 03:26 AM, Daniela Florescu wrote:
>> but in xquery, a comma can introduce an entirely new statement
>> because a sequence can appear pretty much anywhere and there is no
>> required statement terminator
>
> Mike,
>
> I am not sure what you mean by that.
>
Sorry, I was a bit vague. What I meant was that at one time I had some
confusion due to the difference between:
for $x in (1 to 2)
return (<x>{$x}</x>, <y>3</y>)
and
for $x in (1 to 2)
return <x>{$x}</x>, <y>3</y>
My experience has been that the first statement returns:
<x>1</x>
<y>3</y>
<x>2</x>
<y>3</y>
while the second returns:
<x>1</x>
<x>2</x>
<y>3</y>
since it splits the whole expression at the comma and handles the two
halves as separate statements (flwors).
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








