Re: [xsl] The Perils of Sudden Type-Safety in XPath 2.0

Subject: Re: [xsl] The Perils of Sudden Type-Safety in XPath 2.0
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 18 Feb 2003 18:21:31 +0000
Hi Gunther,

> Hi, I am upgrading my stuff to Saxon 7.4 and I am biting my behind
> now that I even started this (one day before a demo!!!).

If you want a quick fix, set the version of your stylesheets to 1.0.
You should still be able to use all the XPath/XSLT 2.0 stuff, but the
backwards compatibility mode will be turned on, which means that the
implicit conversions should work mostly as they used to.

> Please, please, can't this decision for XPath not turned around?
> Could strong typing not be made optional? Why should one go through
> the hassle of adding explicit type conversions if they do nothing
> else than making the hitherto conveniently implicit conversions
> explicit. What's the point of this?

You're not alone in feeling like this, but unfortunately I doubt that
it will get turned around. It would be really useful to see some of
the XSLT code that's breaking because of the strong typing, and to see
what it has to look like now. At the least, it's good to raise
awareness of the problems that it causes, and the hoops we're going to
have to jump through when we start using XSLT 2.0.

> Also what I don't like is that this now makes me drag reference to
> W3C XML-Schema into my transforms everywhere just so I can use the
> xs:integer() conversion, when I have no business with W3C schema
> otherwise?

Can you show us the place where you need to use xs:integer? It might
be that you can use number() instead?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread