[xquery-talk] Re: Best engine for learning?

Per Bothner per at bothner.com
Mon May 12 17:36:47 PDT 2003


 > One of the first topics I'd like to cover is this: What's the best
 > XQuery engine to learn on?

I haven't tried other implementations, but here are some reasons to
consider my own Qexo engine.  Of course I'm biased, but at least
when it comes to Qexo I know of what I speak!

 > 1) The engine must be readily downloadable and available for extended
 > experimental use without a fee.

Qexo is Free Software (Open-Source if you prefer), available without
charge in both binary and source form (with a public CVS repository).

 > 2) The engine must be rigorously faithful to the specs.  People
 > shouldn't learn bad habits.

Huh?  The most recent specs are about a week old.  Even those have
plenty of inconsistencies and unclear issues.  Are there any
implementations are are "regorously faithful to the specs"?  Even
the Novembver '02 version?  What about static typing and schema import?

Qexo may be less faithful/complete than some implementations, and
more than others, but it is coming along well.  I just implemented
the new comment syntax, plus some other changes, including the
new KindType syntax.

One peeve:  On the x-query.com homepage, only Qexo is listed as a
"partial implementation", with the misleading implication that the
other implementations are complete.  Qexo is complete enough
to do useful work with, as illustrated by the pages linked to
from Qexo home page (http://www.gnu.org/software/qexo/).

I admit there are big holes;  no schema support, very limited
static typing (though the hooks are there), no sorting, no
duplicate removal in path expressions, many functions are not
yet implemented, builtin functions are in the wrong namespace.
But it has FLWR expressions, functions, typeswitch, some typing
support, element constructors (both kinds), namespace support
(except for namespace nodes), an efficient XML parser and DOM
representation, decent error handling, a Java interface, lots
of functions, and can be used in various modes, including
command-line and servlets.

 > 3) The engine should be simple to setup and must be usable without a
 > large number of non-XQuery pieces.

All you need is a Java VM and the Kawa .jar file.  The kawa-1.7beta1
is usable, but kawa-1.7beta2 (should be out this weekend) will
have a number of improvents, including the ones mentioned above.

 > 4) The engine should have good, accurate error reporting.  I know how
 > frustrating "Nope, try again" errors can be.

It's fairly decent.  See the second half of this (draft) article at
http://www.gnu.org/software/qexo/simple-xquery-webapp.html . (The
article is servlet-centric, but the error handling is general.
I made some recent improvements to syntactic error recovery; and the
article is based on the CVS or forthcoming 1.7beta2 version of Qexo.)

This article http://www.gnu.org/software/qexo/Running.html is useful
how-to on using Qexo, and it illustrates error messages - though
it has not been updated for the new comment syntax.

 > 5) The engine need not scale or be high performant.

Since Qexo uses a compiler, it has decent performance, and hooks
for further optimization.
-- 
	--Per Bothner
per at bothner.com   http://per.bothner.com/





More information about the Talk mailing list