Examples of LocPathIterator


Examples of org.apache.xpath.axes.LocPathIterator

    // %TBD% Hack city...
    if (null != subContextList && subContextList instanceof PredicatedNodeTest)
    {
      // PredicatedNodeTest iter = (PredicatedNodeTest) xctxt.getSubContextList();
      // LocPathIterator lpi = iter.getLocPathIterator();
      LocPathIterator lpi = xctxt.getCurrentNodeList();

      currentNode = lpi.getCurrentContextNode()
       
    }
    else if(xctxt.getIteratorRoot() != DTM.NULL)
    {
      currentNode = xctxt.getIteratorRoot();
View Full Code Here

Examples of org.apache.xpath.axes.LocPathIterator

    SubContextList iter = xctxt.getSubContextList();
    Node currentNode;

    if (null != iter && iter instanceof PredicatedNodeTest)
    {
      LocPathIterator lpi = ((PredicatedNodeTest)iter).getLocPathIterator();

      currentNode = lpi.getCurrentContextNode();
    }
    else
    {
      ContextNodeList cnl = xctxt.getContextNodeList();
View Full Code Here

Examples of org.apache.xpath.axes.LocPathIterator

          // ISTRUE being used as a dummy value.
          usedrefs.put(ref, ISTRUE);
        }

        LocPathIterator nl =
          kmgr.getNodeSetByKey(xctxt, docContext, keyname, ref,
                               xctxt.getNamespaceContext());

        try
        {
          upi.addIterator((LocPathIterator)nl.clone());
        }
        catch(CloneNotSupportedException cnse)
        {
          // will never happen.
        }
        //mnodeset.addNodesInDocOrder(nl, xctxt); needed??
      }

      upi.initContext(xctxt);

      nodes = new XNodeSet(upi);
    }
    else
    {
      String ref = arg.str();
      LocPathIterator nl = kmgr.getNodeSetByKey(xctxt, docContext, keyname,
                                                ref,
                                                xctxt.getNamespaceContext());

      try
      {
        nodes = new XNodeSet((LocPathIterator)nl.cloneWithReset());
      }
      catch(CloneNotSupportedException cnse)
      {
        // will never happen.
      }
View Full Code Here

Examples of org.apache.xpath.axes.LocPathIterator

    PredicatedNodeTest iter = (PredicatedNodeTest) xctxt.getSubContextList();
    Node currentNode;

    if (null != iter)
    {
      LocPathIterator lpi = iter.getLocPathIterator();

      currentNode = lpi.getCurrentContextNode();
    }
    else
    {
      ContextNodeList cnl = xctxt.getContextNodeList();
View Full Code Here

Examples of org.apache.xpath.axes.LocPathIterator

    walker.setPredicateCount(walker.getPredicateCount() - 1);
    walker.setNextWalker(null);
    walker.setPrevWalker(null);

    LocPathIterator lpi = walker.getLocPathIterator();
    AxesWalker savedWalker = lpi.getLastUsedWalker();

    try
    {
      lpi.setLastUsedWalker(walker);

      Node next;

      while (null != (next = walker.nextNode()))
      {
        pos++;
      }

      // TODO: Should probably save this in the iterator.
    }
    finally
    {
      lpi.setLastUsedWalker(savedWalker);
    }

    // System.out.println("pos: "+pos);
    return pos;
  }
View Full Code Here

Examples of org.apache.xpath.axes.LocPathIterator

  public LocPathIterator getNodeSetByKey(
          XPathContext xctxt, Node doc, QName name, String ref, PrefixResolver nscontext)
            throws javax.xml.transform.TransformerException
  {

    LocPathIterator nl = null;
    ElemTemplateElement template = (ElemTemplateElement) nscontext;  // yuck -sb

    if ((null != template)
            && null != template.getStylesheetRoot().getKeysComposed())
    {
View Full Code Here

Examples of org.apache.xpath.axes.LocPathIterator

          // ISTRUE being used as a dummy value.
          usedrefs.put(ref, ISTRUE);
        }

        LocPathIterator nl =
          kmgr.getNodeSetDTMByKey(xctxt, docContext, keyname, ref,
                               xctxt.getNamespaceContext());

//        try
//        {
          upi.addIterator((LocPathIterator)nl.asIterator(xctxt, docContext));
//        }
//        catch(CloneNotSupportedException cnse)
//        {
//          // will never happen.
//        }
        //mnodeset.addNodesInDocOrder(nl, xctxt); needed??
      }

      int current = xctxt.getCurrentNode();
      upi.setRoot(current, xctxt);

      nodes = new XNodeSet(upi);
    }
    else
    {
      XMLString ref = arg.xstr();
      LocPathIterator nl = kmgr.getNodeSetDTMByKey(xctxt, docContext, keyname,
                                                ref,
                                                xctxt.getNamespaceContext());

      try
      {
        nodes = new XNodeSet((LocPathIterator)nl.cloneWithReset());
      }
      catch(CloneNotSupportedException cnse)
      {
        // will never happen.
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.