public int getTargetNode(XPathContext xctxt, int sourceNode)
          throws TransformerException
  {

    int target = DTM.NULL;
    XPath countMatchPattern = getCountMatchPattern(xctxt, sourceNode);

    if (Constants.NUMBERLEVEL_ANY == m_level)
    {
      target = findPrecedingOrAncestorOrSelf(xctxt, m_fromMatchPattern,
                                             countMatchPattern, sourceNode,
                                             this);
    }
    else
    {
      target = findAncestor(xctxt, m_fromMatchPattern, countMatchPattern,
                            sourceNode, this);
    }

    return target;
  }
public int getTargetNode ( XPathContext xctxt , int sourceNode ) throws TransformerException { int target = DTM . NULL ; XPath countMatchPattern = getCountMatchPattern ( xctxt , sourceNode ) ; if ( Constants . NUMBERLEVEL_ANY == m_level ) { target = findPrecedingOrAncestorOrSelf ( xctxt , m_fromMatchPattern , countMatchPattern , sourceNode , this ) ; } else { target = findAncestor ( xctxt , m_fromMatchPattern , countMatchPattern , sourceNode , this ) ; } return target ; }
Get the target node that will be counted..

@param xctxt The XPath runtime state for this.
@param sourceNode non-null reference to the <a href="http://www.w3.org/TR/xslt#dt-current-node">current source node</a>.

@return the target node that will be counted

@throws TransformerException