docElemProxy.copyContext(docElemProxy); if (useSelfAsContext && inPredicate) { docElemProxy.addContextNode(docElemProxy); } }
	private final NodeSet getNodes() {		ExtArrayNodeSet result = new ExtArrayNodeSet();		NodeProxy proxy;		Iterator domIter;		for (Iterator i = context.iterator(); i.hasNext();) {			proxy = (NodeProxy) i.next();            			if (proxy.getGID() == NodeProxy.DOCUMENT_NODE_GID) {				if(proxy.getDocument().getResourceType() == DocumentImpl.BINARY_FILE)					// skip binary resources					continue;				NodeList cl = proxy.getDocument().getChildNodes();                for (int j = 0; j < cl.getLength(); j++) {                    StoredNode node = (StoredNode) cl.item(j);    				NodeProxy docElemProxy =    					new NodeProxy(proxy.getDocument(), node.getGID(), node.getNodeType());    				docElemProxy.setInternalAddress(node.getInternalAddress());    				if (test.matches(docElemProxy))    					result.add(docElemProxy);    				if (node.getNodeType() == Node.ELEMENT_NODE &&                        (axis == Constants.DESCENDANT_AXIS    					|| axis == Constants.DESCENDANT_SELF_AXIS    					|| axis == Constants.DESCENDANT_ATTRIBUTE_AXIS)) {    					domIter = docElemProxy.getDocument().getBroker().getNodeIterator(docElemProxy);                        domIter.next();    					docElemProxy.setMatches(proxy.getMatches());    					addChildren(docElemProxy, result, node, domIter, 0);    				}                }				continue;			} else {				if(test.matches(proxy)) {					if (axis == Constants.SELF_AXIS || axis == Constants.ANCESTOR_SELF_AXIS || 							axis == Constants.DESCENDANT_SELF_AXIS) {										if(inPredicate)							proxy.addContextNode(proxy);						result.add(proxy);					}				} 				if (axis != Constants.SELF_AXIS) {					domIter = proxy.getDocument().getBroker().getNodeIterator(proxy);					StoredNode node = (StoredNode) domIter.next();					node.setOwnerDocument(proxy.getDocument());					node.setGID(proxy.getGID());										addChildren(proxy, result, node, domIter, 0);				}			}		}		return result;	}