[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" question

Mike Sokolov sokolov at ifactory.com
Wed Jul 28 13:10:21 PDT 2010


  ANSWERS to "What's wrong with XQuery" question
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.