OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Recently published W3C Working Drafts (long)

[ Lists Home | Date Index | Thread Index ]

> I'm sure some XQuery expert would be glad to
> exlain us why XQuery is very much different from
> XPath ...

To sum it up rather briefly, I think XQuery 1.0 is essentially XPath 2.0

1) element and attribute constructors
2) function definitions
3) strong typing

Of course (1) is available in a different form in XSLT 1.0, and (2) is
available in XSLT 2.0, so you could say that apart from syntax, XQuery is
XSLT plus strong typing minus template rules. Those might seem small
differences, but I happen to agree with those who believe that the addition
of strong typing and the absence of template rules are both very important
when it comes to optimizing a query to execute against a large XML database
with pre-defined indexes. So I think we're getting closer to the point where
the differences between XSLT and XQuery are the minimum differences required
by their different areas of application.

The syntax could of course be further converged, and I personally would like
to see this happen, but people have very strong feelings about syntax. One
thing that I've learnt over the last year or two, to my considerable
surprise, is that it's far easier to persuade people to change the semantics
of a proposed construct than to change its syntax. Of course, the XSLT
approach of using an XML-based syntax and the XQuery approach of a
text-based syntax both have their advantages and disadvantages, and there's
no middle ground between them, which makes convergence difficult.

Mike Kay

P.S. I didn't announce it on this list, but Saxon 7.0 is available at
http://saxon.sf.net/ as an experimental (and partial) implementation of the
XSLT 2.0 and XPath 2.0 working drafts.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS