Name
boolean-from-string( ) — converts a string value into a boolean
Synopsis
Defined in: XForms 1.0 |
Parameters: string bool (required) |
Return type: boolean |
This function differs from
boolean( )
in that it takes into account XML
Schema rules: "true
" or "1
"
produces true
, and "false
" or
"0
" produce false
.
This example, as might be used when the value of the
b
element is of the type
xs:boolean
, returns an XPath boolean value that
matches the XML Schema value of the node:
boolean-from-string(a/b)
Get XForms Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.