/** * Evaluate a node-set object, returning an ArrayList of the node set. * * @param node the current node * @param env the variable environment * @return an array list of the nodes */ public Object evalObject(Node node, ExprEnvironment env) throws XPathException { NodeListImpl list = new NodeListImpl(); NodeIterator iter = _pattern.select(node, env); Node value = null; while ((value = iter.nextNode()) != null) list.add(value); return list; }
/** * Evaluate a node-set object, returning an iterator of the node set. * * @param node the current node * @param env the variable environment * @return an iterator of the nodes */ public NodeIterator evalNodeSet(Node node, ExprEnvironment env) throws XPathException { return _pattern.select(node, env); }