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


Help: OASIS Mailing Lists Help | MarkMail Help

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

XQuery - The truth comes out!

Take the following observations, each of which either has been
demonstrated by Joe English or me on this list, or has been proclaimed as
the official position of the W3C XML Query and XSL WGs:

1. Template rules are a sophisticated form of syntax sugar and can be
expressed as an XQuery function -

2. The non-abbreviated XPath axes are a sophisticated form of syntax sugar
and can be expressed as XQuery functions using the parent axis -

3. XSLT 1.1 introduces composability by making arbitrarily constructed
trees first-class citizens -

4. XPath 2.0 introduces W3C XML Schema datatyping, and will be used by
both XSLT 2.0 and XQuery - http://www.w3.org/TR/xpath20req

I'm sorry, but there is little else that's left. Even if we grant that the 
parent axis may be taken away from XQuery (so that the theoretical 
argument that XSLT is inherently harder to optimize might hold *some* 
water), these languages should be defined in terms of each other 

Regarding #1 and #2, the question's about what is *convenient* to specify,
not what is *possible* to specify--in other words, whether we should
give the user a rope to hang themselves with, even though they could go
get one on their own. Another way of looking at this is whether we should
force the user to get their own rope, even though they already had one
they liked using. (Maybe that's where the metaphor starts to break down.)
In any case, what's decided here should not preclude, at least, one
language being defined in terms of the other.

All of the work done by the Query WG on algebra and query optimization can
be leveraged and applied to XSLT as well as XQuery. There was worry about
whether it would be possible to retrofit XSLT for formal semantics. The
intermediate result of the WG shows that this should not be an impossible
task. In any case, why should XQuery be optimizable and not XSLT?

Ultimately, "XSLT" and "XQuery" should describe two different syntaxes for
the same thing and/or languages having a common semantic subset (not just

Evan Lenz
XYZFind Corp.