July 2002
Intermediate to advanced
864 pages
22h 32m
English
A boolean is a datatype that is used to represent the mathematical concept of binary-valued logic. Practically speaking, that translates to true and false.
The boolean type has a predefined value set of “true, false, 1, 0” where 1 is the same as true, and 0 is the same as false.
A boolean can be used when you need a datatype that represents a true condition or a false condition. For example, if you wanted to create an element called "attendance" for keeping track of meeting attendees:
<xs:element name="attendance" type="xs:boolean"/>
In the instance document, the element could be either
<attendance>true</attendance> or <attendance>false</attendance>
depending on whether the person in question had attended or not. Booleans are a very ...