Expand description
Sequence operations for XPath evaluation.
This module implements XPath 2.0 sequence operations:
- Union (|) - node-only, returns nodes in document order
- Intersect - node-only, returns nodes in document order
- Except - node-only, returns nodes in document order
Note: Union, intersect, and except are NODE-ONLY operations in XPath 2.0. Applying them to atomic values results in XPTY0004.
Functionsยง
- contains_
value - Check if a sequence contains a specific value (by value equality).
- count
- Get the count of items in a sequence.
- deep_
equal - Deep equality check between two atomic value sequences.
- distinct_
values - Get distinct values from a sequence (removes duplicates by value equality).
- except_
atomic_ values - Compute the difference of two atomic value sequences.
- except_
nodes - Compute the difference of two node sequences (left except right).
- except_
values Deprecated - Deprecated: Use
except_atomic_valuesfor atomic sequences orexcept_nodesfor nodes. - head
- Get the first item from a sequence, if any.
- index_
of - Find the index of a value in a sequence (1-based, XPath style).
- insert_
before - Insert an item at a specific position.
- intersect_
atomic_ values - Compute the intersection of two atomic value sequences.
- intersect_
nodes - Compute the intersection of two node sequences.
- intersect_
values Deprecated - Deprecated: Use
intersect_atomic_valuesfor atomic sequences orintersect_nodesfor nodes. - is_
empty - Check if a sequence is empty.
- is_
singleton - Check if a sequence contains exactly one item.
- remove_
at - Remove an item at a specific position.
- reverse
- Reverse a sequence.
- subsequence
- Subsequence (slice) of a sequence.
- tail
- Get all items except the first from a sequence.
- union_
atomic_ values - Compute the union of two atomic value sequences (deduplicates by value equality).
- union_
nodes - Compute the union of two node sequences.
- union_
values Deprecated - Deprecated: Use
union_atomic_valuesfor atomic sequences orunion_nodesfor nodes.