非常教程

Xslt & Xpath参考手册

XPath 函数 | XPath Functions

not()

XSLT / XPath参考:XSLT元素, EXSLT函数,XPath函数,XPath轴

not函数计算布尔表达式并返回相反的值。

句法

not(expression )

参数

_ expression表达式的计算方式与将其作为参数传递给boolean()函数时一样。

返回

对于评估为false的表达式为真; 对于计算结果为true的表达式为false。

注意

  • 除了它返回相反的值之外,该函数的行为与boolean()函数类似。
  • 您可以测试某个元素是否没有某个属性。
<xsl:for-each match="//a[not(@name and @name = 'badname')]">
  <!-- iterates over any <a> element in the document, that
       either has no 'name' attribute at all, or it has one,
       but its value is not "badname". -->
</xsl:template>

定义

XPath 1.0 4.3

gecko支持

支持的。

Xslt & Xpath

XSLT 是扩展样式表转换语言 的外语缩写,这是一种对 XML(标准通用标记语言的子集)文档进行转化的语言,XSLT 中的 T 代表英语中的“转换”(Transformation)。它是 XSL(eXtensible Stylesheet Language)规范的一部分

Xslt & Xpath目录

1.其他杂项 | Miscellaneous
2.XPath 轴 | XPath Axes
3.XSLT元素 | XSLT Elements
4.XPath 函数 | XPath Functions
5.XPath 教程
6.XPath 实例
7.XPath 运算符
8.XPath 轴(Axes)
9.XPath 语法
10.XPath 节点
11.XPath 简介
12.XPath、XQuery 以及 XSLT 函数
13.XPath 总结