Skip to main content

Module atomize

Module atomize 

Source
Expand description

Atomization operations for XPath evaluation.

This module implements XPath 2.0 atomization rules for converting values to their atomic representations.

§Atomization Rules

Atomization extracts atomic values from items:

  • For atomic values, returns the value itself
  • For nodes, returns the typed value of the node
  • For empty sequences, returns None
  • For sequences with more than one item, raises XPDY0050

Functions§

atomize
Atomize an XmlValue, returning its atomic representation.
atomize_node
Atomize a navigator node to its XDM atomic value.
atomize_opt
Atomize an optional value.
atomize_required
Atomize a value, requiring a non-empty result.
effective_type_code
Get the type code of the underlying atomic value.
is_empty_list
Check if a value is empty (represents an empty sequence).
is_node
Check if a value represents a node.
is_node_type
Check if a value is a node (in XPath terms).
string_value
Get the string value of an XmlValue.
string_value_opt
Get the string value of an optional value.
to_number
Convert a value to a double (numeric).
to_number_opt
Convert an optional value to a double.
unwrap_union
Unwrap a union value to its member value.