的XslTransform VS XslCompiledTransform [英] XslTransform vs XslCompiledTransform

查看:182
本文介绍了的XslTransform VS XslCompiledTransform的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的XslTransform似乎是去微软赞成XslCompiledTransform的pcated $ P $。从理论上讲,如果我这样做只是我的应用程序的执行过程中一个转换,不应该跨preting的XSLT(通过的XslTransform)比编译更快?如果是这样,是的XslTransform书面如此糟糕,做了改进XslCompiledTransform不仅仅弥补了它?

XslTransform appears to have been deprecated by Microsoft in favor of XslCompiledTransform. Theoretically, if I was doing just one transform during the execution of my application, shouldn't interpreting the XSLT (through XslTransform) be faster than compiling it? If so, is XslTransform written so badly that the improvements made to XslCompiledTransform more than compensate for it?

推荐答案

您可能希望看到的记载差异的XslTransform XslCompiledTransform 这里和<一href="http://blogs.msdn.com/antosha/archive/2006/07/16/xslcompiledtransform-slower-than-xsltransform.aspx"相对=nofollow>此处,并决定自己

You might want to see the documented differences between XslTransform and XslCompiledTransform here and here, and make the decision yourself.

在此外,有一些情况,其中的XslTransform是更不遵医嘱。更多的工作是在XslCompiledTransform进行安全性。

In addition, there are some cases in which XslTransform is more incompliant. More work was done on security in XslCompiledTransform.

所以,很多的原因之一,应考虑使用新的 XslCompiledTransform 而不是旧的XslTransform 下,即使在变换将只运行一次,并可能与旧的XslTransform略快的情况。

So, a lot of reasons one should consider using the new XslCompiledTransform instead of the old XslTransform, even in cases where the transformation will be run only once and could be slightly faster with the old XslTransform.

这篇关于的XslTransform VS XslCompiledTransform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆