Re: XQuery (and XML) vs LISP
Date: 4 Feb 2006 10:20:31 -0800
Message-ID: <1139077231.689141.257420_at_o13g2000cwo.googlegroups.com>
Jan Hidders wrote:
> beelzebub wrote:
> > If XML is a syntactic representation of a typed tree structure and
> > XQuery is a language that can process and construct such structures,
> > how does the combination compare to LISP (with type information)? It
> > seems like
> > XML <=> S-Expressions (with types)
> > XQuery <=> LISP functions
> > Am I missing something here?
>
> Not much, except that XQuery is more designed as an ad-hoc query
> language than a general programming language. That means that queries
> that are thought to be typical XML queries can be more succinctly
> formulated in a more readable way, and the language is designed such
> that typical database-style query optimization becomes easier than it
> would be for LISP.
What would be interesting to me would be to understand more about the
various techniques for tree traversal. The one I find most
aesthetically
appealing is ML-style pattern matching, but this has the disadvantage
vs. XQuery of requiring the full tree structure to be specified (via
patterns)
even when you only want to query subtrees or particular kinds of nodes
or what have you.
I have no candidate in mind for a framework for comparing the
expressive
power of tree querying or tree rewriting languages. Sigh. The situation
is so much clearer and cleaner with relations.
I vaguely wonder whether it would be possible to use, or adapt,
relational
techniques for querying nested relations as an alternative to either
XQuery
or pattern matching.
Marshall Received on Sat Feb 04 2006 - 19:20:31 CET