[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: What niche is XQuery targeting?


Re:  What niche is XQuery targeting?
David Carlisle wrote:

> What seems strange to many people though is why the W3C docs don't
> describe (and possibly even define) Xquery as a cut down version of
> XSLT, with an ad-hoc syntax. That is, essentially, what it is isn't it?

Or maybe XSLT is a cut down version of XQuery that doesn't have FLWOR 
expressions and an XML syntax?

There's certainly a lot of overlap in the two languages, especially in 
path expressions and construction. The main difference is in the way 
transformations are done - using template matching in XSLT, and using 
FLWOR expressions in XQuery. But these are really at the heart of the 
two languages. Programming in XSLT is fundamentally recursive, 
programming in XQuery is more like writing queries.

There are other significant differences. XSLT is really two languages 
loosely coupled together. About 80% of the syntax of XQuery is shared 
with XPath, but instead of embedding XPath in a different language for 
construction and transformation, it adds construction and transformation 
directly to the language.

And the languages were designed for different purposes. XSLT was 
designed for the transformations used in formatting applications, which 
is why we speak of XSLT stylesheets. XQuery was designed as a query 
language, but also to handle many of the more 'XML programming' oriented 
scenarios found in our use cases.

> It may be that restricting the features of XSLT allows the system to be
> more readily optimised for dataabse queries, and this is no doubt a
> useful thing to do, but if that's what you are doing, why describe it as
> a completely new language?

We describe XQuery as a superset of XPath, and generate both documents 
from the same XML source. And we widely advertise this fact. If there's 
a clearer way to indicate that the languages are related, please feel 
free to suggest it.

Jonathan

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.