The strings 'true' and 'false' have no meaning for XPath functions. Please note that the following two lines are both true:
boolean('true')
boolean('false')
Moreover, the following is a node test for a node called "true":
boolean(true)
This function will return false when it cannot find an element called "true" in the current context.
The Boolean functions false() and true() produce the expected results for our first example. So this is true:
boolean(true())
and this is false:
boolean(false())