Let's say there is a variable reference like following, in a XSLT 1.0 code:
<xsl:variable name="temp">According to the XSLT 1.0 specification, the contents of the variable temp is called a RTF (Result Tree Fragment). Now what will be the result of the following function call, boolean($temp)
<!-- anything could be here -->
This will always return boolean value true.
Because, as defined in XSLT 1.0 specification,
The boolean value of a node set, with at least one node, is true. The RTF always has a root node.
It seems to me, that the function call, boolean($rtfVariable) is not very useful to applications, as it's always true.
This post applies to XSLT 1.0. I haven't cross checked what are the rules for this in XSLT 2.0.