[xquery-talk] Screen-scraping with XQuery

Michael Kay mhk at mhk.me.uk
Thu Mar 31 20:34:00 PST 2005


> 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.

Michael Kay
http://www.saxonica.com/





More information about the talk mailing list