Dylan Walsh
writes:
A few comments ...
First, I would guess that the major use for
XQueryX will not be "hand written queries", but for queries written by programs
that use XML tools, especially the DOM API or XSLT. I don't have a
concrete example in mind, but can imagine that it would be convenient for many
to program a query as an XML document that can be validated against the
XQueryX schema. I can more easily imagine scenarios when one would want to
parse the XQueryX syntax using an XML tool to, for example, route it to the
appropriate query engine, or to add/delete/modify the query before processing
it. Of course all this *could* be done with string processing and the BNF
grammar of XQuery itself ... but this can be said for almost any XML application
-- much of XML's value comes simply from the fact that it is standardized, so
you don't have to define your own grammar, parser, API, validator,
transformation engine, etc.
If this particular XML syntax is annoyingly
verbose and can be readily improved, please make concrete suggestions to the
XQuery working group. That is, after all, the whole point of these early
public working drafts. I share the sense that as much as I like the idea of an
XML syntax for XQuery in principle, seeing the Q13 example makes me wonder if
this is really practical.
Finally, on the question of whether XQuery
should be more SQL-like than XSLT-like, I think that question is moot:
XSLT *is* a fairly reasonable query language, and those who are happy with it
will probably be able to get along without XQuery. The whole point of XQuery (as
I see it) is to provide those who need it with a more SQL-like XML query
language.
|