p = new NodeProxy(child.ownerDocument, child.gid, child.getNodeType(), child.internalAddress); p.matches = proxy.matches; if (axis == Constants.CHILD_AXIS && recursions == 0 && test.isOfType(child.getNodeType())) {
p = new NodeProxy( child.ownerDocument, child.gid, child.getNodeType(), child.internalAddress); p.matches = contextNode.matches; if (axis == Constants.CHILD_AXIS && recursions == 0 && test.isOfType(child.getNodeType())) {
	private final void addChildren(		NodeSet result,		NodeImpl node,		NodeProxy proxy,		Iterator iter,		int recursions) {		if (node.hasChildNodes()) {			NodeImpl child;			Value value;			NodeProxy p;			for (int i = 0; i < node.getChildCount(); i++) {				child = (NodeImpl)iter.next();				child.setOwnerDocument(node.getOwnerDocument());				child.setGID(node.firstChildID() + i);				p = new NodeProxy(child.ownerDocument, child.gid, 					child.getNodeType(), child.internalAddress);				p.matches = proxy.matches;				if (axis == Constants.CHILD_AXIS && recursions == 0 &&					test.isOfType(child.getNodeType())) {					result.add(p);				} else if ((axis == Constants.DESCENDANT_AXIS ||					axis == Constants.DESCENDANT_SELF_AXIS) &&					test.isOfType(child.getNodeType())) {					result.add(p);				} else if (axis == Constants.ATTRIBUTE_AXIS)					return;				addChildren(result, child, p, iter, recursions + 1);			}		}	}