As you already understood from your research, XML :: LibXML supports XPath 1.0 (not 2.0).
Generally speaking, in XPath itself there is no way to determine the version, except using such probes. XSLT, on the other hand, provides a system-property('xsl:version') to identify version information.
Going to the original inheritance route: XML :: LibXML is based on libxml2, which implements XPath 1.0, as indicated directly on the Libxml2 home page:
Libxml2 implements a number of existing standards related to markup languages:
XML Path Language (XPath) 1.0: http:
You may ask why libxml2 does not support XPath 2.0? or read an old post from a companion, Daniel Weilard, that says the XPath 2.0 specification is "too big and intrusive," but the bottom line is: XML :: LibXML supports XPath 1.0, not 2.0.
source share