Skip to main content

Module sets

Module sets 

Source
Expand description

EXSLT set family — https://exslt.org/set/

All functions live in the http://exslt.org/sets namespace.

Coverage:

FunctionReturnsSemantics
differencenodesetnodes in A not in B (by node identity)
intersectionnodesetnodes in both A and B (by node identity)
distinctnodesetone representative per distinct string-val
has-same-nodebooleannon-empty intersection?
leadingnodesetnodes from A before first node also in B
trailingnodesetnodes from A after last node also in B

Identity comparisons use NodeId equality, which is canonical in our index — two NodeIds refer to the same node iff they’re equal. This lets difference / intersection / has-same-node / leading / trailing be O(n+m) via HashSet<NodeId> instead of O(n*m) string-value comparison. distinct is the one exception — per spec it dedups by string-value, not identity.

Functions§

dispatch