internet-explorer - 让 xpath 2.0 函数在任何浏览器中工作

标签 internet-explorer firefox xpath xslt

我想使用 XPath 2.0 函数,如下所示:

http://www.w3schools.com/xpath/xpath_functions.asp

在浏览器中进行 XSL 转换。我可以在样式表标记中将 XSL 版本指定为 2.0,但这似乎并没有激活 2.0 XPath 函数(至少在 Firefox 中)。

例如:

<xsl:value-of select="node-name(//testnode)"/>

给我:

'node-name' is not a valid XSLT or XPath function. -->node-name(//testnode)<--

在 IE 8 中。XPath 1.0 函数:

http://www.edankert.com/xpathfunctions.html

似乎工作正常。根据我的阅读,Chrome 似乎不支持 XSL 2.0。

最佳答案

今天,没有浏览器支持 XPath 2.0

改用name()

关于internet-explorer - 让 xpath 2.0 函数在任何浏览器中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3293763/

相关文章:

java - Selenium 化物-无效选择器 : Unable to locate an element with the xpath expression

c# - XPathExpression AddSort 失败

css - 页面在 ie8 中不呈现。仅在兼容 View 模式下呈现

css - IE中的背景渐变和滤镜

jquery - 使用 Jquery 在 Firefox 中动画背景位置 y

html - Firefox 32.0.1 中的透视跳跃旋转

xml - XPath:返回具有特定子节点但没有自己文本的节点

JQuery .click() 在 Firefox 中有效,但在 chrome 或 IE 中无效

Internet Explorer 的 CSS 文本效果 问题?

javascript - 找不到 JS 文件 (404)