[xquery-talk] Comparing XQuery to XSLT

rick schochler schochler3 at yahoo.com
Tue Aug 19 10:55:32 PDT 2003


I had the same question when I first started delving
in to XQuery, so I took the use cases presented on the
W3C ( http://www.w3.org/TR/xquery-use-cases/ )and
attempted to perform the same operation using xslt. I
didn't get through all of the use cases, but I got
through the first 9 or 10 and was able to replicate
the end results using xslt.

Here's what I see (so far):

xquery syntax is less verbose (we all know that).
xquery syntax *seems* to have an easier learning curve
for persons with a programming background.

As far as transformations, I too see quite a bit of
overlap. I suppose this will take some time to get
sorted out. One thing I'll point out (with the full
knowledge that someone will most likely show me that
it can, in fact, be done) is that I don't see an
obvious way to do 1 to n transformations using xquery.

In other words, using xslt, I can use xsl:document or
xsl:result-document to produce multiple xml, xhtml,
etc. docs from a single xml source...I don't see an
obvious way to do this via XQuery.

If this holds up, it would cause me to choose xslt for
transformations almost every time, as I'm usually
doing more than just a 1 to 1 transformation.

Rick


--- Mike Clark <mike at clarkware.com> wrote:
> 
> So for those with XSLT experience, I'd be interested
> to hear your 
> opinions on what XQuery brings to the table.  As the
> spec matures it's 
> likely to be a reoccurring and important
> conversation, as Michael 
> pointed out.  And since I've already shown how
> little I know about their 
> differences (thanks, Jeni!), I thought I'd go ahead
> and start tugging on 
> the thread.
> 
> It's not my intent to provoke a flame war.  I'm here
> to learn from the 
> collective wisdom of the group.
> 
> Mike
> 
> _______________________________________________
> talk at x-query.com
> http://www.x-query.com/mailman/listinfo/talk



More information about the talk mailing list