views:

16

answers:

2

Hi,

I'm converting an old website which uses clientside XSLT based on an old working draft:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"&gt;

It looks like IE is the only browser who can manage to transform the HTML client side.

When transforming is done serverside with .net code, it will throw an error:

System.Xml.Xsl.XslLoadException occurred
Message="The 'http://www.w3.org/TR/WD-xsl' namespace is no longer supported."

Is there an easy way to convert the stylesheets (a lot of them) automatically?

Regards,

Michel

+1  A: 

Sadly not.

Microsoft do have a tool that claims to do it, but it only does the trivial bits, rather than the context(-3) stuff which will trip you up. The only way to do it is by hand.

If you download msxsl.exe (the command line utility) from microsoft you can transform on the desktop as long as you force msxsl 3.0 so:

msxsl -u 3.0 <data file> <xsl file>

Maybe you can call that from your net app if it is something simple, otherwise you will have to covert manually.

Woody
Obviously you can also load the MSXSL com component in your .net code, we do for old stylesheets that weren't worth rewriting
Woody
A: 

No, there is't a "royal way" into XSLT :)

This is not possible to do automatically, and I doubt there are even a few people that remember the wd-XSL dialect from 10 years ago.

Dimitre Novatchev
I remember it very well. I spent several months coverting a lot of stylesheets from WD to xslt! To be fair, towards the end, I just reversed engineered them, it was easier.
Woody