[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Global variables in XQuery

Jonathan Robie jonathan.robie at datadirect.com
Wed Oct 4 12:51:23 PDT 2006


  Global variables in XQuery
Liam Quin wrote:
> The "let" part of a FLWOR always creates new variables.
> Think of them as named constants if you prefer...
>   

This is the key point. Variables in XQuery never vary, they are 
constant. XQuery inherits this from other functional languages - but it 
does take some getting used to if you have been using procedural 
languages. On the plus side, it makes XQuery more declarative and 
optimizable.

FWIW, there is some work being done on procedural extensions to XQuery, 
which would allow the values of variables to be changed. But this is not 
part of the current language. For instance, see this paper:
http://www.ximep-2006.org/papers/Paper-Chamberlin-Carey.pdf

Jonathan

-- 
Read my Blog: http://blogs.datadirect.com/jonathan_robie/
Learn XQuery: http://media.datadirect.com/download/docs/ddxquery/tutorial_query.html
Learn XQJ (the JDBC for XQuery): http://www.datadirect.com/developer/xquery/topics/xqj_tutorial/
Get DataDirect XQuery: http://www.datadirect.com/products/xquery/




PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

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-2007 All Rights Reserved.