为什么在Firefox中未实现XSLT禁用输出转义? [英] Why is the XSLT disable-output-escaping not implemented in Firefox?

查看:136
本文介绍了为什么在Firefox中未实现XSLT禁用输出转义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近为我写了一个新的XSLT,这个问题是由一个使用CDATA嵌入XTHML的应用程序生成的。通常情况下,我可以使用禁用输出转义然而,在Firefox中,所有的东西都显示为逃逸(ie),而不是像预期的那样渲染,因为Firefox往往是我的主要浏览器,当开发这导致我失去了一些时间试图找出我做错了之前找到 Firefox Bug 98168 描述了这个问题。

现在看起来这个问题不会在Firefox中实现,我一直在阅读该错误的评论,看来这个决定是在2001年作出的。因此,我希望有人能够解释这个问题是什么,如果它现在仍然适用于2009年?另外,如果在Firefox中永远不会解决这个问题,那么除了使用其他浏览器之外,是否还有其他的解决方法? 解决方案

a href =https://bugzilla.mozilla.org/show_bug.cgi?id=98168#c99 =nofollow noreferrer> https://bugzilla.mozilla.org/show_bug.cgi?id=98168#c99 和随后的注释描述了bug的当前状态:disable-output-escaping可以在Firefox中实现,但是在处理样式表时需要一个不同的方法,而不是Firefox的XSLT处理器所使用的方法(serialize + parse而不是在处理样式表时创建DOM树)。修补程序是可以接受的,但似乎没有人打算花时间来解决这个问题。

即使实现了,这样的样式表也需要更多的CPU资源来处理Mozilla的开发人员说,通常比使用doe有更好的解决方案。如果你需要帮助你的具体情况,你应该更详细地描述它(虽然我可能无法帮助)。

This is an issue that recently came up for me while writing a new XSLT for some XML generated by an application with XTHML embedded using CDATA. Normally I've been able to use disable-output-escaping to render the results correctly.

However, in Firefox, everything was being displayed as escaped (i.e. &) as opposed to rendering as expected, since Firefox tends to be my primary browser when developing this resulted me losing some time trying to figure out what I was doing wrong before finding Firefox Bug 98168 describing the issue.

Right now it looks like this issue is not slated to be implemented in Firefox and I've been reading through the bug's comments and it looks like the decision was made back in 2001. As such, I was hoping someone might be able to explain what the issue is and if it still applies now in 2009? Also, if this is never going to be fixed in Firefox, is there a workaround for it besides using another browser?

解决方案

https://bugzilla.mozilla.org/show_bug.cgi?id=98168#c99 and subsequent comments describe the current status of the bug: "disable-output-escaping" can be implemented in Firefox, but it requires a different approach when processing the stylesheet than the one used by Firefox's XSLT processor (serialize+parse instead of creating a DOM tree while processing the stylesheet). Patches are accepted, but it seems that no-one plans to spend time on fixing the issue.

Even if it's implemented, such stylesheets will require more CPU resources to be processed, and Mozilla developers say that usually there's a better solution than using d-o-e. If you want help in your specific case, you should describe it in more detail (although I probably won't be able to help).

这篇关于为什么在Firefox中未实现XSLT禁用输出转义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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