gpt4 book ai didi

jquery - xsl :include and xsl:param at Google Chrome, 与 jQuery 转换插件

转载 作者:行者123 更新时间:2023-12-03 22:33:56 26 4
gpt4 key购买 nike

我一直尝试在 Google Chrome 中使用 XSL,但没有成功。
我读到 Chrome 在 XSLT 方面存在一些错误,其中之一是它不支持 xsl:include。可以在这里检查错误:http://code.google.com/p/chromium/issues/detail?id=8441 .
经过一番研究,我发现了 Daer System 的新版本转换插件,它使 xsl:include 在 Chrome 上工作。

jQuery Transform 插件可以从 http://plugins.jquery.com/project/Transform 找到

现在我的问题是:
我在某些 xsl 模板中使用默认包含,并且此包含使用传递到顶层模板的参数。

所以就像我有一个声明 [xsl:param name="param"/] 的 top.xsl 模板,并且我将此参数与 included.xsl 一起使用strong>,由第一个使用 [xsl:include href="included.xsl"] 调用。这适用于 Firefox 和 Internet Explorer,但不适用于 Chrome。我在 stackoverflow 上看到一个问题,其中有人从插件重写了 webkit 修复函数,但它不适用于 xsl:param 这种方式。

有人知道在 Google Chrome 中使用 [xsl:param] 的方法吗?

最佳答案

您的问题是 Google Chrome (=Chromium) 不支持 xsl:include

正如 "Issue 8441: XSLTProcessor in JS does not permit xsl:include for http" 中提出的那样,Chromium 项目中明显缺乏此功能。 。看来该问题是由 WebKit(Chrome 中使用的渲染引擎)中的某些架构问题引起的。由于此问题源自 WebKit,因此该错误被标记为 WontFix——随着 WebKit 中的原始问题得到解决,将来(希望)会提供修复程序。

我看到了三种可能的替代方案来为您解决此问题:

  1. 等到 WebKit/Chrome 获得修复此问题的补丁(可能需要很长时间...)
  2. 创建/找到解决此问题的 hack,例如通过以某种方式模拟 Chrome/Webkit 的 xsl:include(可能需要大量工作/开发 hack)
  3. 尝试找到一种不需要此特定 XSL 功能的软件编写方式(或者在服务器端运行 XSL 转换)

我的建议:避免在客户端将 xsl:include 与 xsl:param 一起使用,除非您愿意放弃跨浏览器兼容性

关于jquery - xsl :include and xsl:param at Google Chrome, 与 jQuery 转换插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3653682/

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