code: private void addValueInRefsTable(XPathContext xctxt, XMLString ref, int node) {
      
      XNodeSet nodes = (XNodeSet) m_refsTable.get(ref);
      if (nodes == null)
      {
        nodes = new XNodeSet(node, xctxt.getDTMManager());
        nodes.nextNode();
        m_refsTable.put(ref, nodes);
      }
      else
      {
        // Nodes are passed to this method in document order.  Since we need to
        // suppress duplicates, we only need to check against the last entry
        // in each nodeset.  We use nodes.nextNode after each entry so we can
        // easily compare node against the current node.
        if (nodes.getCurrentNode() != node) {
            nodes.mutableNodeset().addNode(node);
            nodes.nextNode();
        }    
      }
    }
docs: Add an association between a ref and a node in the m_refsTable.
  Requires that m_refsTable != null
  @param xctxt XPath context
  @param ref the value of the use clause of the current key for the given node
  @param node the node to reference