Re: [xsl] 1.0 and 2.0 and suitability for tasks

Subject: Re: [xsl] 1.0 and 2.0 and suitability for tasks
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 24 Aug 2005 22:40:27 +0100
Wendell

> while on the  other hand, there will be a *few* problems even on the
> document-processing  side (date handling?) for which we'll be grateful
> to have 2.0. 

Actually I think that most document-processing down translations will
benefit from xslt2 as well. Grouping for example is often required, and
while readers of this list can convince themselves that using keys and
generate-id() to do this is perfectly natural, it isn't really natural
at all and xslt had been used a year or wo before Steve M came up with
this. xsl:for-each-group may not be a lot more powerful (I've not really
analysed all the cases) but it's certainly a lot more usable: something
that you could show to a beginner without embarrassment. Similarly  not
having to use xx:node-set isn't really any extra power at all, but it
helps portability (if there were more xslt2 engines) and more
importantly you don't have to tell people what the heck xx:node-set() is
all about.

Most of the new features in XSLT2 (as opposed to XPath 2) can be fairly
directly linked to FAQs on this list. Most of the new features of XPath
2 are more or less dead weight of XSD Schema alignment, but it's to
the WG's credit that recent working drafts have made this XSD schema
alignment more or less transparent to the user who doesn't need it.
Many of us worried at the start that the schema alignment would make
things unusable but in recent drafts it is hardly noticable (unless you
want to use it) There are still a few cases where you have to declare
the xsd namespace in your stylesheet and do an explicit cast when you
might hope the system would just do "the right thing" on its own, but
these are now rare enough to be at the level of a minor quirk rather
than a real usability issue.

I think XSLT 1 will hang around for a long time, because I don't expect
to see xslt2 in the browsers any time soon, and because many of us have
a lot of xslt1 code, but for my own projects (which are almost aways
document-oriented) I'd always use xslt2 for new projects.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread