What is XQuery?
XQuery is a technology from the World Wide Web Consortium (W3C) that's designed to query collections of XML data -- not just XML files, but anything that can appear as XML, including relational databases. XQuery has broad support from IBM, Microsoft, and Oracle as well as application server vendors such as BEA and Software AG, and upcoming companies like Mark Logic.
This site contains real-life help for XQuery developers. We have mailing lists, original content, fast links, and other material that make this the best place outside the W3C to look for XQuery information. The site was created by Jason Hunter, creator of Servlets.com, and he hopes this site will help XQuery developers the way Servlets.com has helped servlet developers.
If you're new to XQuery, we recommend the introductory article "X is for XQuery" by Jason Hunter published in Oracle Magazine.
Once you're familiar with XQuery, you can read the follow-on article "Updating XQuery" that explains the major changes in the May 2003 draft. Then continue on to "An XQuery Update" by Per Bothner that covers the tweaks in the August 2003 draft. For experts, you'll want to read "XQuery Tricks and Traps" that covers the important but tricky and commonly misunderstood aspects of the XQuery language.
We strongly recommend people interested in XQuery join the firstname.lastname@example.org mailing list. This list is for practical discussion about XQuery: a place to work together to learn a new language, talk about problem solutions, discuss engines and implementations, chat about the latest announcements, and so on. You'll find the archives here.
Note the W3C maintains the www-ql mailing list on "query languages" but it's extremely low traffic and hasn't generated a community feel. If you want to comment to the W3C on the XQuery drafts, there's the public-qt-comments mailing list.
Some fast links to the important specifications:
- XQuery Language
- XQuery Functions and Operators
- XQuery Data Model
- XQuery Serialization
- XQuery Use Cases
- XQuery Requirements
The XQuery drafts are always posted at http://www.w3.org/XML/Query.
Some fast links to the best XQuery implementations for getting real work done today.
- Mark Logic Server
- Combines a search engine with a database to produce a content database. Scales into the Terabytes. For learning, you can get a free, non-expiring Community Licensed version.
- BEA's Liquid Data
- Lets you write a single query to access data from Web services, relational databases, flat files, XML files, applications, and Web sites. Time-limited evaluation license.
- Ipedo's XML Intelligence Platform
- Provides access to XML and relational data sources for Enterprise Information Integration. Time-limited evaluation license.
- A native XML database. Includes an online demo. Time-limited evaluation license.
- Famous for database drivers, DataDirect now has a Java-based XQJ driver that specializes in joins between an XML document and relational database.
Other interesting XQuery implementations.
- A Java-based, open source XQuery engine.
- A self-described "prototype" engine. Free for non-commercial use.
- Open source under a license similar to the GPL, managed by Per Bothner.
- Open source from Michael Kay, with a commercial variety from Saxonica Limited.
There's a full list of vendors at http://www.w3.org/XML/Query#implementations.
To compare vendor implementations you'll want to use BumbleBee, the XQuery Test Harness with over 1000 unit tests for compatibility. Once you've chosen your vendor, you can use BumbleBee to regression test your queries during upgrades, vendor changes, new deployments, and day to day code work.