p = al.parentWithChild(n.doc, n.gid, false, includeSelf, -1); if (p != null) { if ((temp = result.get(p)) == null) { if (rememberContext) p.addContextNode(n); else p.copyContext(n); result.add(p); } else if (rememberContext) temp.addContextNode(n);
ancestors = al.ancestorsForChild(n.doc, n.gid, false, includeSelf, -1); for(Iterator j = ancestors.iterator(); j.hasNext(); ) { p = (NodeProxy) j.next(); if (p != null) { if ((temp = result.get(p)) == null) { if (rememberContext) p.addContextNode(n); else p.copyContext(n); result.add(p); } else if (rememberContext) temp.addContextNode(n); }
	public NodeSet selectAncestors(		NodeSet al,		boolean includeSelf,		boolean rememberContext) {		NodeProxy n, p, temp;		NodeSet result = new ExtArrayNodeSet();		for (Iterator i = iterator(); i.hasNext();) {			n = (NodeProxy) i.next();			p = al.parentWithChild(n.doc, n.gid, false, includeSelf, -1);			if (p != null) {				if ((temp = result.get(p)) == null) {					if (rememberContext)						p.addContextNode(n);					else						p.copyContext(n);					result.add(p);				} else if (rememberContext)					temp.addContextNode(n);			}		}		return result;	}