XPathType () { final XPathStep step = getFirstStep(); if (step != null) { final XPathExpression expr = step.getStep(); if (expr != null) { return expr.getType(); } } return getXPathVersion() == XPathVersion.V1 ? XPathType.NODESET : XPath2Type.SEQUENCE; }