我正在尝试从 Web 服务器提供动态生成的 xml 页面,并从同一 Web 服务器提供自定义、静态、xslt,它将处理卸载到客户端 Web 浏览器中。
直到最近,我在 Firefox 2、3、IE5、6 和 Chrome 中都能正常工作。不过,最近发生了一些变化,Firefox 3 现在只显示源代码中的文本元素。
页面源代码是这样开始的:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Firefox 2.0 and Internet Explorer 7 use simplistic feed sniffing to override desired presentation behavior for this feed, and thus we are obliged to insert this comment, a bit of a waste of bandwidth, unfortunately. This should ensure that the following stylesheet processing instruction is honored by these new browser versions. For some more background you might want to visit the following bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=338621 -->
<?xml-stylesheet type="text/xsl" href="/WebObjects/SantaPreview.woa/Contents/WebServerResources/Root.xsl"?>
<wrapper xmlns="http://www.bbc.co.uk/ContentInterface/Content" xmlns:cont="http://www.bbc.co.uk/ContentInterface/Content" sceneId="T2a_INDEX" serviceName="DSat_T2">
....
Firebug 显示正在加载 Root.xsl 文件,并且它的响应标头包括该行
Content-Type text/xml
我也尝试过使用 application/xml 作为内容类型,但没有区别:-(
Web Developer Extension 也显示了正确的生成源,如果你保存它并在 Firefox 中加载页面,它会正确显示。
显示问题的 Firefox 版本是 3.0.3
有什么想法我可能做错了吗?