logo       

Re: Global variables in XQuery: msg#00013

Subject: Re: 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/




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
region.costa-ri...    user-groups.lin...    lang.prothon.us...    xfree86.cvs/200...    finance.aqbanki...    ietf.smtp/1993-...    web.turbogears....    jakarta.cactus....    yellowdog.gener...    php.gtk+.genera...    org.region.indo...    hurd.l4/2005-10...    culture.religio...    apple.fink.gene...    db.mysql.window...    bluez.devel/200...    security.pgp-ba...    video.blender.d...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe