Package org.apache.xpath.axes

Examples of org.apache.xpath.axes.ContextNodeList


  public final NodeIterator getContextNodes()
  {

    try
    {
      ContextNodeList cnl = getContextNodeList();

      if (null != cnl)
        return cnl.cloneWithReset();
      else
        return null// for now... this might ought to be an empty iterator.
    }
    catch (CloneNotSupportedException cnse)
    {
View Full Code Here


  public NodeIterator getContextNodeList()
  {

    try
    {
      ContextNodeList cnl = getXPathContext().getContextNodeList();
      return (cnl == null)? null : cnl.cloneWithReset();
    }
    catch (CloneNotSupportedException cnse)
    {

      // should never happen.
View Full Code Here

      currentNode = lpi.getCurrentContextNode();
    }
    else
    {
      ContextNodeList cnl = xctxt.getContextNodeList();

      if (null != cnl)
      {
        currentNode = cnl.getCurrentNode();
      }
      else
        currentNode = null;
    }
View Full Code Here

    SubContextList iter = xctxt.getSubContextList();
    // System.out.println("iter: "+iter);
    if (null != iter)
      return iter.getLastPos(xctxt);

    ContextNodeList cnl = xctxt.getContextNodeList();

    if (cnl.size() == 0)
    {
      try
      {
        NodeIterator ni = (NodeIterator)cnl.clone();
        int count = cnl.getCurrentPos();
        while(null != ni.nextNode())
          count++;
        cnl.setLast(count);
        return count;
      }
      catch(CloneNotSupportedException cnse){}
    }
    return cnl.size();

    /*
    // The code below has massive problem if inside of a predicate.  -sb
    if (cnl.size() == 0)
    {
View Full Code Here

  public final NodeIterator getContextNodes()
  {

    try
    {
      ContextNodeList cnl = getContextNodeList();

      if (null != cnl)
        return cnl.cloneWithReset();
      else
        return null// for now... this might ought to be an empty iterator.
    }
    catch (CloneNotSupportedException cnse)
    {
View Full Code Here

  public final NodeIterator getContextNodes()
  {

    try
    {
      ContextNodeList cnl = getContextNodeList();

      if (null != cnl)
        return cnl.cloneWithReset();
      else
        return null// for now... this might ought to be an empty iterator.
    }
    catch (CloneNotSupportedException cnse)
    {
View Full Code Here

      currentNode = lpi.getCurrentContextNode();
    }
    else
    {
      ContextNodeList cnl = xctxt.getContextNodeList();

      if (null != cnl)
      {
        currentNode = cnl.getCurrentNode();
      }
      else
        currentNode = null;
    }
View Full Code Here

      // System.out.println("FuncPosition- prox: "+prox);
      return prox;
    }

    ContextNodeList cnl = (ContextNodeList) xctxt.getContextNodeList();

    if (null != cnl)
    {

      // System.out.println("FuncPosition- cnl.getCurrentPos(): "+cnl.getCurrentPos());
      return cnl.getCurrentPos();
    }

    // System.out.println("FuncPosition - out of guesses: -1");
    return -1;
  }
View Full Code Here

    SubContextList iter = xctxt.getSubContextList();

    if (null != iter)
      return iter.getLastPos(xctxt);

    ContextNodeList cnl = xctxt.getContextNodeList();

    if (cnl.size() == 0)
    {
      try
      {
        NodeIterator ni = (NodeIterator)cnl.clone();
        int count = cnl.getCurrentPos();
        while(null != ni.nextNode())
          count++;
        cnl.setLast(count);
        return count;
      }
      catch(CloneNotSupportedException cnse){}
    }
    return cnl.size();

    /*
    // The code below has massive problem if inside of a predicate.  -sb
    if (cnl.size() == 0)
    {
View Full Code Here

TOP

Related Classes of org.apache.xpath.axes.ContextNodeList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.