TOC PREV NEXT INDEX

Netscape and XSLT


boolean()

The boolean() function converts its argument to a boolean value. Any value can be converted to a boolean using the following rules:

Datatype
Conversion Rules
Number
Zero, negative zero, and NaN convert to false. Everything else converts to true.
String
Length greater than 0 converts to true. Otherwise false.
Boolean
Value is unchanged.
Node-set
Empty converts to false. Anything else is true.

Syntax:
boolean boolean(value) 
Arguments:
A value of any XSLT/XPath supported datatype.
Result:
A boolean.
Defined: XPath, section 4.3
NS support: Supported.

Comments? devdoc-feedback@netscape.com
TOC PREV NEXT INDEX