Previous Next

Tests whether an XPath expression or comparison evaluates to true() or to false(), following USoft Blend rules for interpreting expressions as booleans. These rules are the same as the XPath rules except for converting strings to booleans.

Returns a boolean. Because of a Microsoft/C# convention, if USoft Blend outputs (serialises) a boolean value, it is printed capitalised, ie., as True or False, as opposed to XPath true or false.


xslutil:test( { xpath-expression | comparison } )

The required argument is either an XPath expression or a comparison. It is a comparison if it contains one of the comparison operators =, !=, <=, <, >, >=, <>. In a comparison, both the left-hand operand and the right-hand operand are XPath expressions.

xslutil:test() applies different rules from XPath/XSLT when converting XPath expressions to booleans. Applying xslutil:test() to an expression is not the same as applying XPath boolean() to that expression.

The rules applied by xslutil:text() are described in the "Booleans" help topic.