XSLT 2, XPath 2, XQuery 1 ... Yeeaahhhhhh!

by Kurt Cagle

The news is something I'd rather despaired of ever hearing - XSLT 2.0 is now a Recommendation - big, capital R, with XPath right there beside and XQuery making its formal debut. It's been a long time coming, but I suspect in many ways that the timing couldn't be more perfect.

XSLT 2 started out as XSLT 1.1, an effort to try to solve some of the nastier, thornier issues of XSLT 1.0. Getting rid of the damned ext:node-set function that was a non-standard hack that became practically de rigour in XSLT processors, because there are many times where you want XML fragments to just act like XML. The introduction of a <xsl:function> tag so that you could call templates from with XPath. Multiple output serialization, support for tokenization and regular expressions. Take a look at EXSLT (http://www.exslt.org) sometimes, and you can see where many of us playing with XSLT 1.0 were seriously hoping XSLT 1.1 would become back in 2002-3.


3 Comments

piers
2007-01-25 08:24:53
Agreed... a big ** Thank You ** to all involved, including yourself and David. I am amazed at the ease with which you can create active pages and new feeds from old using just eXist, a pinch of XQuery, and XSLT2; and though it wasn't difficult to configure eXist from Xalan to Saxon, I don't see why you wouldn't want to do this.


I would guess that these official recommendations will curb the "kudzu effect", too (for better or worse).


Cheers, and thanks to all!

Jim
2007-01-30 08:17:52
I've been using xslt for nearly 1 year now ... I just switched to python's pyxml and used xpath tools from that library. I really think xslt is useless ... 1/2 my dev team could not understand it ... and the tools were absolutely horrible. Python is the way to go for all xml processing.
Kurt Cagle
2007-01-30 08:33:23
Tools are important. I've used Oxygen for years (www.oxygenxml.com) for doing most of my XSLT processing - works with XSLT1 and 2, contains an integrated debugger, and overall is probably one of the best XML editors I've worked for a long time.


Concerning talent - this is, and has been, the Achilles heel of XSLT for a long time, though that's changing. XSLT can be difficult to work with (although 2.0 is much simpler, because it makes it possible to use call templates as functions from within XPath among a number of very critical improvements) and finding good XSLT people is still tough.


I like the Pyxml toolset - it's sophisticated and useful, and if it accomplishes what you need, then use it. I think of XSLT as a convenient way of dealing with complex XPath compositions, and if you can do it in other ways, then more power to you.