In short: self::node() filters out atomic elements, as well . - no. Atomic elements (numbers, strings, and many other types of XML schemas) are not nodes (unlike elements, attributes, comments, etc.).
Consider the example from spec: (1 to 100)[. mod 5 eq 0] (1 to 100)[. mod 5 eq 0] . If . replaced with self::node() , the expression is not valid XPath, because mod requires both arguments to be numeric, and atomization did not help in this case.
For those who scan the specification: XPath 2.0 defines item() type construction, but this has nothing to do with node tests , since atoms are not nodes, and axis steps always return only nodes. Therefore, a point cannot be defined as self::item() . It really should be a special language construct.
source share