[xquery-talk] Screen-scraping with XQuery

R. Mark Volkmann mark at ociweb.com
Thu Mar 31 13:57:37 PST 2005

Quoting Michael Kay <mhk at mhk.me.uk>:

> > I don't like calling named templates as well, but I believe XQuery 1.0
> > should be compared with XSLT 2.0 in all fairness. XSLT 2.0 introduces
> > functions, and while the syntax to declare such functions is a little
> > heavier in XSLT (especially for parameters), calling them from XPath
> > expressions is much lighter than using XSLT 1.0's named templates.
> >
> Getting the syntax more concise was certainly one of the things that was on
> my personal agenda for XSLT 2.0, though there was a surprising amount of
> resistance from people who liked it the way it was. A little comparison is
> interesting: my "knight's tour" program (which computes a knight's tour of
> the chessboard) was 276 non-comment lines in XSLT 1.0, 159 non-comment lines
> in XSLT 2.0, and 155 non-comment lines in XQuery. I think most people would
> find the XSLT and XQuery versions equally mind-blowing, unless they have
> spent six months learning functional programming.

Is there a place on the web where we can look at the three versions of that
code?  I admit I'm surprised that the XSLT 2.0 code is so close in number of
lines to the XQuery code.  I'd like to see that.

R. Mark Volkmann
Partner, Object Computing, Inc.

More information about the talk mailing list