Expand description
Boolean operations for XPath evaluation.
This module implements the XPath 2.0 effective boolean value (EBV) rules as defined in the XPath 2.0 specification section 2.4.3.
§Effective Boolean Value Rules
The effective boolean value of a value is determined as follows:
- If the value is an empty sequence, EBV is
false - If the value is a single node, EBV is
true - If the value is a singleton xs:boolean, EBV is the value
- If the value is a singleton xs:string/xs:untypedAtomic/xs:anyURI, EBV is
!value.is_empty() - If the value is a singleton numeric type, EBV is
value != 0 && !value.is_nan() - For other atomic types or sequences of length > 1, a type error is raised
Functions§
- effective_
boolean_ value - Compute the effective boolean value of an atomic XmlValue.
- effective_
boolean_ value_ opt - Compute the effective boolean value with support for optional values.
- is_
numeric_ type - Check if a type code represents a numeric type.
- is_
string_ like_ type - Check if a type code represents a string-like type.
- not
- Logical NOT operation on an XPath value.
- not_opt
- Logical NOT with optional value support.
- supports_
ebv - Check if a type code supports effective boolean value.