June 2008
Intermediate to advanced
986 pages
27h 8m
English
false()
Always returns the boolean value false. Remember that the strings “true”
and “false” don’t have any special significance in XSLT; any
string with a length greater than zero is true. This function (and
the true() function) allow
you to generate boolean values when you need them.
[1.0] booleanfalse()[2.0] xs:booleanfalse()
None.
The boolean value false.
XPath section 4.3, “Boolean Functions.”
[2.0] XQuery 1.0 and XPath 2.0 Functions and Operators Section 9.1, “Additional Boolean Constructor Functions.”
Here’s a brief example that uses the false() function:
<?xml version="1.0"?> <!-- false.xsl --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text>
A test of the false() function:

</xsl:text> <xsl:text> false() returned </xsl:text> <xsl:value-of select="false()"/> <xsl:text>!</xsl:text> </xsl:template> </xsl:stylesheet>
When using this stylesheet against any XML document, it generates this less-than exciting result:
A test of the false() function: false() returned false!
Read now
Unlock full access