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 ( ) ; } } }
Add an association between a ref and a node in the m_refsTable . Requires that m_refsTable ! = null