W3C XML Query (XQuery)

30,000 Foot View

XQuery: 30,000 foot view (CIO, CTO, Journalist)

XQuery is a standardized language for combining
documents, databases, Web pages and almost anything
else. It is very widely implemented. It is powerful
and easy to learn.

XQuery is replacing proprietary middleware languages and
Web Application development languages. XQuery is replacing
complex Java or C++ programs with a few lines of code.
XQuery is simpler to work with and easier to maintain
than many other alternatives.

Alberta learning Center
for education in the Canadian province of Alberta; e.g. see
the Search link, which does not require registration.

AuthorMapper
shows authors of scientific papers and articles broken down
by geography and subject. The site is by Springer.

Business Week Business School Comparator
is said to use XQuery to let users compare universities and
business schools; it didn't seem to work for me, so maybe IE only?
Or maybe I'm not cut out for business.

Business Exchange, another Business Week site, uses XQuery to drive a site where, it
says, usiness professionals can collaborate and network
around business topics.

MarkMail is an XQuery-based
application for searching and visualising mailing lists.

The New England Journal of Medicine
uses XQuery to search and retrieve comprehensive case summaries and
graphical icons that identify available supplemental content such as
lab reports, radiological scans, histopathology slides, and photos
associated with a particular case record.

O'Reilly Labs use
XQuery to power code search, image search,
statistics and more.

Pop Culture Universe
is a Web site about American popular culture, including movies,
books and music, with over 300
publications indexed and searchable.

Have you got a Web site that's powered by XML Query?
A success story to share? Contact liam at w3.org.

Users

XQuery: choosing an implementation

There are over 40 different software packages that
support XML Query in some way. Things to look for
include availability of support, platforms, price,
performance, all the usual issues, but you should also
ask whether the software supports the final syntax from
the W3C Recommendation or implements an earlier draft.
Another XML Query specific feature is support for
XML files, for fetching documents via HTTP, and for
connecting to relational (or other) data sources: that is,
whether the package lives up to the XML Query promise of
unifying access to many different forms of information.

Learning

There are some books listed; there are also people
offering training and tutorials. If there is anything
you found particular helpful, let us know!

There are also some mailing lists devoted to XML
and to XML Query. You should look at the archives of each list
before posting; you'll also need to subscribe to the list before
you can post to it in most cases.

This is the W3C public mailing list on query languages, including (but not
limited to) discussion on the XML Query project.
Do not use this to send comments on the specification, such as errata or feature
requests; see the Status section in each specification for instructions on
how to send comments to the Working Group.

Reading the Specs

W3C Specifications are aimed first and foremost
at programmers writing implementations of them.
We also try to make them readable for people trying
to learn the language—but given a choice between
making a standard precise and making it easy to read,
we have to make it precise.

If you are fairly technical, you could start by
reading the XML Query specification, and the
XQuery Use Cases document has some examples.
Many people would rather look for a book or tutorial.

Implementers

XQuery for the implementer: hard core query

Implementers: what would you most like to see here?
What would have helped you the most?

The XQuery Test Suite

W3C test suites exist to show that specifications
can be implemented. They are testing the specs, not the
code!

The QT 3.0 Test suite is for people implementing XQuery 3, XPath 3, Functions and Operators 3 and related specifications.

Static Typing and Formal Semantics

XPath 2 has typed values; that is, the language
associates a value type with each expression, variable or
function. The set of possible types is that defined by
W3C XML Schema, augmented by user-defined types derived from
those basic Schema types using an external schema. The way
in which an XPath or XQuery system derives and checks the type of
an expression is defined formally, using a mathematical notation,
in the XQuery 1.0 and XPath 2.0 Formal Semantics Recommendation.

Note that both external W3C Schema support and static typing
are optional features, so not all implementations support them.

Conformance Statements

You will often see things in the specifications marked as
being implementation defined. You must document
what your implementation does for each of these.

Documents

Specifications and Working Group Notes

The W3C XML Query Working Group has published a lot
of documents. Many of these were done together with the
XSL Working Group and
are marked Joint.

The XML Query Working Group is working on the next
version of XML Query, XQuery 3.1, but this is not yet public.

The XML Query Working Group is working on Scripting Extensions for XQuery.
The goal is to investigate whether adding imperative (procedural)
features such as variable assigment and explicit sequencing to
XQuery makes the language significantly more powerful or
easier to use. This work is not currently active.

Recently added...

Send your XQuery-related news item to
liam@w3.org, with [XQuery] in the Subject.
Note, I am sorry that sometimes I miss announcements.
I get hundreds, sometimes thousands, of messages in a day.
If your announcement does not appear within one week,
send it again and please accept my apologies!

XQuery 3.0, XPath 3.0 and supporting specs now W3C Recommendations

BaseX 7.8 Released

Wed, 12 Feb 2014

BaseX 7.8 was released today;
it adds a project view, enhancements to the built-in editor,
speedups to insert, delete, XQuery functions and more,
and includes enhancements to the the XQuery add-on modules
such as JSON , Full-Texxt and ExPath File. The software is
also now available in Russian and Spanish.

XMLSpy 2014

Sat, 14 Dec 2013

Altova has released
XML Spy 2014
with support for XQuery 3.0, XPath 3.0, XSLT 3.0 draft and
also XML Schema 1.1 using the RaptorXML engine.

Apache Lux

BaseX 7.7 Released

Wed, 07 Aug 2013

BaseX 7.7 was released today;
it includes support for the XQuery 3.0 Candidate Recommendation,
many new features and performance enhancements,
improved support for large databases,
and a birthday cake for Leo.

Zorba 2.9 released

Mon, 24 Jun 2013

Zorba 2.9 was released today; Zorba is an open source XQuery implementation in C++ that
also includes a JSONiq implementation. This release increases
XQuery 3 support (including higher order functions) and also makes
changes to the JSONiq implementation.

Xidel HTML/XML data extraction tool 0.7

Fri, 29 Mar 2013

Xidel is a tool for extracting data from Web pages using a combination
of CSS selectors, XQuery and JSONiq.

W3C Java Applets updated

Tue, 29 Jan 2013

W3C Java Applets
have been updated to incorporate the latest versions of the specifications for
the XPath and XQuery 3.0 Candidate Recommendations as well as for the
1.0 and 2.0 documents.

Email: use member-query-feedback@w3.org to comment/suggest new content for this page, or if for some reasons you need to directly contact the W3C XQuery responsibles; otherwise, please use the mailing lists listed below

The public mailing list on query languages, including (but not
limited to) discussion on the XML Query project. This list
originated from the QL'98 w3c-ql@w3.org
mailing list, and has now become a public list (see the migration
announcement). Only subscribed users can post to this
list. Subscription is open to everybody: to subscribe or
unsubscribe just send a message to www-ql-request@w3.org with
your request. The list is publicly archived at http://lists.w3.org/Archives/Public/www-ql/.

Note: before posting to this mailing list, be sure
to read the Status section in the document on which you are
commenting. Most of our documents now ask you to send
comments using bugzilla.

This public mailing list is used to submit comments on the
publications of the XML Query and XSL working groups. This is
not a discussion list (use www-ql@w3.org instead), and so
you shouldn't subscribe: this list is just a way for
people to provide their comments to the XML Query and XSL WGs, and
for the WGs to reply. The list is publicly archived at http://lists.w3.org/Archives/Public/public-qt-comments/.

Abacus Systems'
Relational XQuery
supports both relational data (via JDBC) and other sources
including XML files, and
also claims XQJ (XQuery for Java API) conformance. Includes
a GUI for creating and editing queries. 30 day evaluation.
[2011-03-25: Last update July 2009; project homepage is gone.

David Carlisle's xq2xml
converts XQuery to XML, to XQueryX and to XSLT.

Cerebra Inc.'s
Cerebra Server
supports XQuery, OWL-DL and RDF, and can connect to external databases,
but their Web server no longer responds.

Cognetic Systems's XQuantum
implements XML Query 1.0 in an XML-native indexed data store.
They have a Web page demonstrating the XQuery Use Cases, and
support static typing and modules as well as some
full-text extensions.
[Windows and Linux; 30-day evaluation]
Full-Text Support

The open source
GCX,
a streaming in-memory XQuery engine with static and
dynamic buffer minimzation developed originally at Saarland University
[open source]

MXQuery from ETH,
a research project; the sourceforge page
says, The Micro XQuery Engine is a low-footprint, extensible
implementation of XQuery 1.0 including extensions like the XQuery Update
and XQueryP. It supports streaming execution and runs on all devices
support CLDC 1.0 upwards. [Open source, BSD/Apache license].
ETH is an active participant in the XML Query Working Group.Implements the XQuery Update Facility

GAEL's Derby
provides a Java API via their Data Request Broker.
There is extensive support for data analysis, including
plotting graphs and making tables.

Galax.
Open-source (in OCAML), with a Galatex full text search implementation.
The authors of Galax include a number of
active participants in the XML Query Working Group, both
psat and present.Full-Text Support

GNU's Qexo (Kawa-Query)
by Per Bothner.
Compiles XQuery on-the-fly to Java bytecodes.
Based on and part of the
Kawa framework.
Qexo implements
the optional XQuery static typing feature.
[Open-source under the GPL-like Kawa License].

HXQ,
a compiler from XQuery to Haskell; appears to be an imcomplete
research project, but said to be already useful. Open source,
license terms unclear from the Web page.

IBM's xqnsta:
XQuery Normalizer and Static Analyzer (XQNSTA) is a Java API and GUI
for normalizing and computing the static type of XQuery expressions.
IBM is an active participant in the XML Query Working Group.

IBM's
DB2 9 stores XML in its native format and provides support
for
XQuery.

IPSI's IPSI-XQ
[java; free download]; this seems to have moved to
sourceforge. Last update 2001-11-29.

Ispras Modis' Sedna.
Native XML DBMS in C/C++ and Scheme; partial support for XML Query.
Includes an Apache HTTP module, and APIs for .NET, Python and
Chicken Scheme. There is also a Firefox extension,
XqUSEme,
and a special build of firefox,
XDIB
(XQuery In a Browser), for unning client-side XQuery scripts.
[Open source under the Apache License].

MarkLogic's MarkLogic Server 4.0 (formerly known as Content Interaction Server).
There is also a
technical overview document. Commercial, with free download restricted to 100 Megaybytes of data. A limited duration trial license is also available, limited
to 1G of content.
Full-Text Support.
Implements the XQuery Update Facility.
MarkLogic is an active participant in the XML Query Working Group.

Microsoft's SQL Server 2005 Express,
with XML Schema, XPath 2, and XML Query support. Later versions of SQL Server continue to support
XQuery.
Microsoft is an active participant in the XML Query Working Group.

CWI's
MonetDB/XQuery is
an XQuery system that also supports
XQUF updates.
It is based on the Pathfinder compiler developed at TU Munich,
and aims at achieving high performance.
Open Source (adapting the Mozilla Public License).
Implements the XQuery Update Facility.

Oracle Berkeley DB XML 2.0, formerly Sleepycat's,
an embeddable native XML database with support
for XQuery 1.0 (July 2004 draft), implemented in C++, with
interfaces for Java, Python, Perl and PHP. Open source.
Oracle is an active participant in the XML Query Working Group.Full-Text Support

Oracle'sOracle XQuery
implementation
is part of the Oracle Database product
[multi-platform; seems to be a free binary download].
Oracle is an active participant in the XML Query Working Group.

Renmin University of China's OrientX,
a native XML database system in C/C++
developed under Renmin University of China.
[open source]

Saarland University Database Group's
FluXQuery [no longer maintained], an extension of the XQuery language, FluX, that supports event-based query processing and the conscious handling of main memory buffers.
Obsoleted by GCX, but the web page is still
mirrored at Cornell.

Saxonica's Saxon implements both
XML Query and XSLT 2.0.
Available in a schema-aware version as a commercial
product, and without schema support as open source.
Saxonica is an active participant in the XML Query Working Group.

Worcester Polytechnic Institute's RainbowCore.
[Java. available at no charge and without warranty].

XBird,
a light-weight embeddable
XQuery processor and database system written in Java,
with a distributed XQuery processor.
[open source]

XMLmind's
Qizx comes
in three versions: (1) an open source one (Qizx/open);
(2) a commercial implementation, Qizx/db,
with an indexed native XML database and full-text support,
and (3) Qizx/db Free Engine, a freely downloadable version of Qizx/db
but that has a database size limit of approximately
one gigabyte of XML.
Implements the XQuery Update Facility;
Full-Text Support

XQilla,
C++ implementation based on pathan and Xerces-C.
Open source (BSD/Sleepycat license).
Sleepycat (Oracle) is an active participant in the XML Query Working Group.

XQSharp,
XQuery for the .NET framework, from
CBCL.
Includes Schema support and static typing.
XQSharp was previously known as Anglo.
[commercial; free for non-commercial use]
CBCL is an active participant in the XML Query Working Group.

Zorba, an open
source portable embeddable C++ implementation of XQuery.
There are also PHP, Python
and Ruby APIs. [open source, Apache licence]

Unconfirmed Implementations

Please send liam@w3.org any information about these;
I have tried to contact people where possible.

Actuate's
Actuate 8
incorporates Nimble's XQuery implementation.
The Summary of New Features requires a registration (!) so
I cannot be sure if this still implements XML Query.

ACL's Blackpearl 4 platform,
supposedly with an embedded XQuery engine but this is not
mentioned on their Web site as far as I can tell.
The rights to Blackpearl were bought by ACL,
who also do not seem to talk about XML Query.

AGiLiENCE's XPeerion;
AGiLiENCE is a spin-off from Siemens AG. The Web page
seems not to mention XML Query.

ATS' BizQuery [30-day free trial; no product link]

Axyana Software's Qizx/Open
is now marketed by XMLmind;
[Java, open source under the Mozilla Public License].
Full-Text Support

The Mono Project
implements a draft of XML Query, although this may
not be active. [open source]

Xenos purchesed
XML Global in 2003, and it is not clear from their
Web page whether they still have XQuery support.

XQuench has
not released any files since 2001 and is probably defunct.

AquaPath
by Todd Ditchendorf
is a free Cocoa-based developer tool for Mac OS X Tiger that allows
you to evaluate XPath 2.0 expressions against any XML document and view
the result sequence in a dynamic tree representation.

The Mono Project
implements a draft of XPath 2.0 and XQuery. [open source]

NSXML from Apple Computers
includes support for XQuery 1.0 and XPath 2.0; it is part of Cocoa.

I have tried to indicate where authors participated in
the XML Query Working Group, sent comments on the specifications,
or have written implementations themselves. This does not
necessarily make them good writers, but it may help you to
understand their point of view and their connection with
XML Query.

XQuery: The XML Query Language
by Michael Brundage; Addison-Wesley Professional, February 2004.
With a foreword by Michael Rys.
Book web site at
www.qbrundage.com/xquery/.
[The first half of the book is an introduction to XQuery,
including an interesting chapter on Idioms. The second half
is a reference. - Liam]

XQuery from the Experts
edited by Howard Katz, with chapters by
Don Chamberlin, Denise Draper, Mary Fernandez, Michael Kay, Jonathan Robie, Michael Rys, Jerome Simeon, Jim Tivy and Philip Wadler.
Addison-Wesley Professional, September 2003.
There are two chapters online at
www.fatdog.com.
[Although this book is older, the text is a very
happy mix of tutorials, design rationale and examples.
The authors have been heavily involved in the
design of XML Query, and most have been active memebers
of the W3C XML Query Working Group; the editor, Howard Katz,
has also made his own open-source implementation. - Liam]

XQuery Kick Start by James McGovern, Per Bothner,
Kurt Cagle, James Linn and Vaidyanathan Nagarajan; Sams, September 2003.
[I have not seen this book. Per Bothner made many helpful
public comments on the specifications - Liam]

Early Adopter XQuery
by Dan Maharry, Rogerio Saran, Kurt Cagle, Mark Fussell and
Nalleli Lopez.
Wrox Press; January, 2002.
[This book was probably too early to be of use today, although
I have not seen it to be sure. I am listing it for
completeness. Michael Brundage has written that it is out of date, but
that it reviewed some XQuery APIs - Liam]

Querying XML with XQuery (Advances in Database Systems)
by Yannis Papakonstantinou and Ioana Manolescu.
Springer; March 2006
[forthcoming, I assume.
Ioana participates in the XML Query Working Group. - Liam]

XQuery - Grundlagen und fortgeschrittene Methoden
by Wolfgang Lehner. dpunkt.verlag, January 2004; this book
is downloadable from Amazon for US$30.

First created by Massimo Marchiori on April 2000.
Page redesigned in 2007 by
Liam;
images from
www.fromoldbooks.org
used by permission.
Page maintained by
Liam Quin.
Current: $Revision: 1.214 $ $Date: 2014-12-12 23:13:22 $