XPath 2.0 is not XPath 2.0

(This mail was originally posted at the xsl-dev list)

Hi!

Just skimmed the new drafts. Both contain
(much needed) new stuff which looks well designed
at a first glance. But, when I reach the sections
about incompatibility I get so disappointed!
While XSLT 2.0 is OK (apart from its dependancy
on XPath 2.0), XPath 2.0 looks so very wrong.
There might be a million reasons for the incompatible
changes, but then you should call it something else,
XFooPath 1.0 or whatever. It simply doesn't feel
like a worthy (and still much needed) successor to 
XPath 1.0.

Incompatible changes in syntax is OK, you can fix them
automatically, and they are catched at compile/load-time.
Changes in semantics is a no no. If for example Java had
taken the same path I think there would be no Java today.

And I don't think the stylesheet version attribute is the
solution. Of course a processor could trigger on the
attribute and run in version 1.0 or 2.0 mode accordingly.
But imagine how wonderful it would be if I, as a developer,
could just change the version attribute to 2.0 and
start using the new stuff with no worries. I can't just see
what was gained by sacrificing this.

(So much for forward compatibility :-)

Here's an idea:

Decouple XSLT and XPath! Make the expression language
a choice of the developer. Then you could use XSLT to
do schema/type dense processing if you specify XFooPath 1.0
as the expression language or you could just enhance your
1.0 stylsheets with some new cool stuff if you specify XPath 2.0
(the real successor :-)

If this idea is too wild, please at least change the name and
let there be a real, backwards compatible, XSLT / XPath 2.0
combination.

Cheers

</David>

David Rosenborg
Pantor Engineering AB

Received on Wednesday, 26 December 2001 12:51:41 UTC