Skip to main content

following

Function following 

Source
pub fn following<'a, N: Node<'a>>(n: N) -> impl Iterator<Item = N> + 'a
Expand description

following axis: “contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes”.

Attribute/namespace nodes are never children, so they never appear in the underlying preorder listing at all — but per document order they still sit before their owner element’s children, so a context node that is itself an attribute/namespace node is handled by reducing to its owner element: following(attr) == descendant(owner) ++ following(owner).