开发者

Convert XSL working draft to current version

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">

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 lo开发者_StackOverflow中文版t of them) automatically?

Regards,

Michel


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜