if(p.gid == node.gid && node.doc.getDocId() == node.doc.getDocId())
if(p.gid == contextNode.gid && contextNode.doc.getDocId() == contextNode.doc.getDocId())
    public Value eval(DocumentSet docs, NodeSet context, NodeProxy node) {        DocumentImpl doc = node.getDoc();        NodeSet set = ((ArraySet)context).getChildren(doc, node.getGID());        // determine position of current node in the set        NodeProxy p;        double count = 1.0;        for(Iterator i = set.iterator(); i.hasNext(); count++) {            p = (NodeProxy)i.next();            if(p.gid == node.gid && node.doc.getDocId() == node.doc.getDocId())                return new ValueNumber(count);        }        return new ValueNumber(-1);    }