Boolean function has other uses
String function is used to return the string value of a node.
XML
<Deborah>
<address>Dark world</address>
<master>Babadi</master>
<ID>#0</ID>
<colour>red</colour>
<side>evil</side>
</Deborah>
XPATH
boolean(/Deborah/master/text())
OR
string(/Deborah/master) != ''
OUTPUT
true
XML
<Dobby>
<address>Hogwartz</address>
<master></master>
<colour>wheatish</colour>
<side>all good</side>
</Dobby>
XPATH
boolean(/Dobby/master/text())
OR
string(/Dobby/master) != ''
OUTPUT
false