Skip to main content

Module context

Module context 

Source
Expand description

Arena-tree counterpart to super::context::DocIndex.

Builds the same flat Vec<INode> shape with NodeId indices, but walks the arena tree (sup_xml_tree::dom::Document) via its linked-list children/attributes API instead of the legacy Vec<Node> fields. Both types implement super::index::DocIndexLike, so the XPath evaluator in super::eval works against either with no per-tree-type code.

Structs§

DocIndex
INode
Per-node entry in the flat index.

Enums§

INodeKind
Discriminant for INode::kind. The Element/Attribute/etc. variants carry the original arena reference for cheap accessor methods.

Constants§

SYNTHETIC_TEXT_BASE
Top-bit-set IDs are EXSLT-synthesised text nodes. The remaining bits index into DocIndex::synthetic. Using the top bit lets every DocIndexLike method dispatch in a single mask test, and guarantees synthetic IDs sort after every real index entry — so document order between real and synthetic node-sets is total.

Functions§

is_synthetic_id
True iff id’s top bit is set — i.e. it points into the EXSLT synthetic-text store rather than the main nodes table. Inlined at every DocIndexLike accessor to short-circuit before the real table lookup.