gpt4 book ai didi

google-chrome - 为什么我不能让XSLT在chrome中工作?

转载 作者:行者123 更新时间:2023-12-04 03:41:16 25 4
gpt4 key购买 nike

我有一个直接从http://www.w3schools.com/xsl/xsl_transformation.asp复制的XSLT示例,我似乎无法在Google Chrome中查看它。但是,它似乎在IE中工作正常。
有谁知道为什么会这样吗?
编辑:
联机版本工作正常,但本地副本无效。

最佳答案

我对Google Chrome(在13.0.782.215上测试)和(非JavaScript XSL转换)有相同的问题:

<?xml-stylesheet type="text/xsl" href="simple.xsl"?>
  • 在线转换效果很好,例如http://www.w3schools.com/xml/simplexsl.xml
  • 本地转换(没有像Apache这样的服务器)仅显示空白页

  • 我发现最适合我的解决方案是使用 --allow-file-access-from-files 开关运行Chrome浏览器:

    // By default, file:// URIs cannot read other file:// URIs. This is an
    // override for developers who need the old behavior for testing.
    const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";

    关于google-chrome - 为什么我不能让XSLT在chrome中工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2904973/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com