Construct a boolean
value from an item value.
xs:boolean(item $value) => boolean
This is a constructor function that takes an item value as argument and
returns a value of type xs:boolean
. If the argument is a literal,
then the literal must be a valid lexical form of its type.
As specified in the respective section of the W3C recommendation
XML
Schema Part 2: Datatypes, a value of type xs:boolean
represents a value to denote binary-valued logic. The lexical representation
for "true" is the set of values
{"true", 1}; for false it is the set of values
{"false", 0}.
$value |
item value |
---|
Generate the boolean value "true":
xs:boolean("1")
xs:boolean("true")
This query generates an error since the argument is interpreted as a path expression:
xs:boolean(true)
The following construct(s) refer to this construct: