Expand description
EXSLT set family — https://exslt.org/set/
All functions live in the http://exslt.org/sets namespace.
Coverage:
| Function | Returns | Semantics |
|---|---|---|
difference | nodeset | nodes in A not in B (by node identity) |
intersection | nodeset | nodes in both A and B (by node identity) |
distinct | nodeset | one representative per distinct string-val |
has-same-node | boolean | non-empty intersection? |
leading | nodeset | nodes from A before first node also in B |
trailing | nodeset | nodes 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.