((LocationStepQueryNode) matchedNode.operands.get(matchedNode.operands.size() - 1)).setIncludeDescendants(false); return nodes;
((LocationStepQueryNode) matchedNode.operands.get(matchedNode.operands.size() - 1)).setIncludeDescendants(false); return nodes;
next.setIncludeDescendants(true); compacted.addPathStep(next); } else {
next.setIncludeDescendants(true); compacted.addPathStep(next); } else {
LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode); step.setNameTest(qName); step.setIncludeDescendants(descendant); if (index > 0) { step.setIndex(index);
LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode); step.setNameTest(qName); step.setIncludeDescendants(descendant); if (index > 0) { step.setIndex(index);
LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode); step.setNameTest(null); step.setIncludeDescendants(true); pathNode.addPathStep(step); } else { LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode); step.setNameTest(steps[i].getNameTest()); step.setIncludeDescendants(steps[i].getIncludeDescendants()); step.setIndex(steps[i].getIndex()); pathNode.addPathStep(step);
LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode); step.setNameTest(null); step.setIncludeDescendants(true); pathNode.addPathStep(step); } else { LocationStepQueryNode step = factory.createLocationStepQueryNode(pathNode); step.setNameTest(steps[i].getNameTest()); step.setIncludeDescendants(steps[i].getIncludeDescendants()); step.setIndex(steps[i].getIndex()); pathNode.addPathStep(step);
/** * Creates a <code>LocationStepQueryNode</code> at the current position * in parent. * * @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) { queryNode = factory.createLocationStepQueryNode(parent); queryNode.setNameTest(null); queryNode.setIncludeDescendants(descendant); parent.addOperand(queryNode); break; } descendant = (c.getId() == JJTSLASHSLASH || c.getId() == JJTROOTDESCENDANTS); } node.childrenAccept(this, queryNode); return queryNode; }
/** * Creates a <code>LocationStepQueryNode</code> at the current position * in parent. * * @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) { queryNode = factory.createLocationStepQueryNode(parent); queryNode.setNameTest(null); queryNode.setIncludeDescendants(descendant); parent.addOperand(queryNode); break; } descendant = (c.getId() == JJTSLASHSLASH || c.getId() == JJTROOTDESCENDANTS); } node.childrenAccept(this, queryNode); return queryNode; }