In XPath 2.0 We Have
Sequences of Items
- XPath 2.0 does not center on a single document tree, but on
arbitrary data sets
- These can be arranged in sequences of items
- sequences are lists, ordered sets of
- pointers to nodes (which still have identity) and
- simple-typed values
- may contain duplicates
- count($node-set) =
count($node-set | $node-set) is still true
(due to semantics of “|”, the union operator)
- But now we can also say ($node-set , $node-set)
- A sequence of all the nodes in $node-set (in document order), then all the same nodes again