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支持
支持的。
XPath 函数 | XPath Functions相关
XSLT 是扩展样式表转换语言 的外语缩写,这是一种对 XML(标准通用标记语言的子集)文档进行转化的语言,XSLT 中的 T 代表英语中的“转换”(Transformation)。它是 XSL(eXtensible Stylesheet Language)规范的一部分