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

Eri*_*ric 9 xslt google-chrome

我直接从http://www.w3schools.com/xsl/xsl_transformation.asp复制了一个XSLT示例,我似乎无法在Google Chrome中查看.但是,它似乎在IE中运行良好.

有谁知道为什么会这样?

编辑:

在线版本工作正常,但本地副本没有.

Grz*_*ski 10

我在使用Google Chrome(在13.0.782.215测试)和(非JavaScript XSL转换)时遇到了同样的问题:

<?xml-stylesheet type="text/xsl" href="simple.xsl"?>
Run Code Online (Sandbox Code Playgroud)

我找到适用于我的解决方案是使用--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";
Run Code Online (Sandbox Code Playgroud)