Converts a $string-var (a string) to a boolean value.
xs:boolean(xs:string $string-var) —> xs:boolean
Returns the boolean value of the passed in string.
Invoking xs:boolean("false") returns the boolean value false, as shown in the following example query:
<result>{xs:boolean("false")}</result>
The preceding query generates the following result:
<result>false</result>
Invoking xs:boolean("1") returns the boolean value true, as shown in the following example query:
<result>{xs:boolean("1")}</result>
The preceding query generates the following result:
<result>true</result>
W3C boolean function description