* @param node the current node in the xpath syntax tree.
* @param parent the parent <code>PathQueryNode</code>.
* @return the created <code>LocationStepQueryNode</code>.
*/
private LocationStepQueryNode createLocationStep(SimpleNode node, NAryQueryNode parent) {
LocationStepQueryNode queryNode = null;
boolean descendant = false;
Node p = node.jjtGetParent();
for (int i = 0; i < p.jjtGetNumChildren(); i++) {
SimpleNode c = (SimpleNode) p.jjtGetChild(i);
if (c == node) { // NOSONAR
queryNode = factory.createLocationStepQueryNode(parent);
queryNode.setNameTest(null);
queryNode.setIncludeDescendants(descendant);
parent.addOperand(queryNode);
break;
}
descendant = (c.getId() == JJTSLASHSLASH
|| c.getId() == JJTROOTDESCENDANTS);