Firefox和远程XSL样式表 [英] Firefox and remote XSL stylesheets

查看:72
本文介绍了Firefox和远程XSL样式表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用远程XSL样式表加载本地XML文件. IE似乎可以很好地处理此问题,但不能解决Firefox.有解决办法吗?

I’m trying to load local XML files with a remote XSL stylesheet. IE seems to handle this just fine but not firefox. Is there a fix for this?

推荐答案

要检查的几件事:

检查服务器端是否使用了正确的mime类型和字符编码. Firefox在加载本地文件时将自行计算编码,但在从服务器请求时将遵循服务器mime-type/encoding声明.

Check that you're using the right mime-type and character encoding on the server side. Firefox will work out the encoding for itself when loading a local file, but will honour the server mime-type/encoding declaration when requesting from the server.

我看过一些帖子(例如此处)声称Firefox根本不支持使用绝对路径加载远程XSL模板.我对此表示怀疑,并怀疑上面提到的哑剧问题更可能使他们相信这一点,但是可能值得直接向Mozilla询问.

I've seen a few posts (eg here) that claim that Firefox simply doesn't support loading remote XSL templates using absolute paths. I doubt this, and suspect it's more likely the mime issue as per above leading them to believe this, but it might be worth asking Mozilla about this directly.

最后,您是否测试了XSL样式表在本地提取时是否可以工作?您能确定它确实是XSLT,而不是Microsoft奇怪的仅IE的XSL变体之一,例如WD-XSL吗?

Finally, have you tested that the XSL stylesheet works when pulled locally? And can you confirm that it is really XSLT, and not one of Microsoft's bizarre IE-only XSL variants, such as WD-XSL?

这篇关于Firefox和远程XSL样式表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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