Asks whether the supplied node has one or more children.
has-children() ➔ xs:boolean
There are no arguments
has-children($seq as node()?) ➔ xs:boolean
The input node
Links to W3C specifications
XPath 3.1 Functions and Operators
Available in XPath 3.0, XSLT 3.0, XQuery 3.0, and later versions. From Saxon 9.6, available in all editions.
Notes on the Saxon implementation
Available from Saxon 9.5, provided XPath 3.0 is enabled. Streaming for the
has-children() function is implemented from Saxon 9.7; specifically, a call
has-children() is now motionless, so that the call does not consume the
content. This means, for example, that the call can appear as a predicate in a match
pattern. The implementation uses a tiny amount of look-ahead in the parsing pipeline.