qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] New XQuery article


From: Per Bothner
Subject: Re: [Qexo-general] New XQuery article
Date: Mon, 29 Dec 2003 09:53:24 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007

Weiqi Gao wrote:

I've put a preliminary copy on my personal page at
http://www.weiqigao.com/articles/xquery-article.html.

I would really appreciate it if you can take a look at it and let me
know if there are any glaring mistakes or misconceptions.

A nice little intro.  Here are some notes.

> Saxon is a complete implementation of XQuery.

The Saxon web site says Saxon 7.8 implements "most of .. the working drafts". The conformance page says "Saxon is 100% conformant to the mandatory requirements of these recommendations." I'm not sure what Miachels means by this statement, as there are some known bugs.

> Qexo is an implementation in progress that supports interactive sessions, which is great for learning.

I guess I can't complain too much about this, though I want to make sure you don't oversell Saxon's "completeness" compared to Qexo's "in progress" - it's a matter of degree: Saxon's implementation is definitely more complete.

It might be nice you added a mention that Qexo compiles XQuery programs to Java bytecodes. This does not guarantee that it performs better of course, and in any case most active implementations will see performance improvements.

> java kawa.repl --output-format xml -xquery

The '--output-format xml' isn't really required, as the default is also valid XML. More importantly, you need an extra hyphen: --xquery.

In the "Nodes and Node Types" sectiuon you might note that the prompt changes to indivate the current expression nesting.

> For example, you can use regular expressions in place of element and attribute names.

That's not really true.

> Notice that the use of return in XQuery is quite different from Java.

Perhaps you should be more specific: "it specifies the result of a sub-expression and does not imply returning from a function."

> Saxon puts an XML declaration in front of every element in the sequence when they are printed.

Probably not - I assume just every document node or top-level element.

> Modules

Qexo 1.7.90 also supports modules, but they are new and I haven't documented them yet. Also, as an implementation restriction (for now) modules have to be compiled, and cannot have circular dependencies:

$ java kawa.repl --xquery -C /tmp/lib-fib.xq
$ java kawa.repl --xquery --main -C /tmp/main-fib.xq
$ java 'main$Mnfib'
13

'main$Mnfib' is the "mangled" Java class name of 'main-fib'.
(The library module becomes com/ociweb/jnb.class.)
--
        --Per Bothner
address@hidden   http://per.bothner.com/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]