not
not 函式評估布林表示式並返回相反的值。
語法
not( expression )
引數
返回值
對於評估結果為假的表示式,返回真;對於評估結果為真的表示式,返回假。
描述
- 此函式的行為應類似於 boolean() 函式,只是它返回相反的值。
- 您可以測試元素是否不具有某些屬性。xml
<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>
規範
Gecko 支援
支援。