Examples of NodeIterator


Examples of org.apache.commons.jxpath.ri.model.NodeIterator

                }
            }

            while (!stack.isEmpty()) {
                if (!reverse) {
                    NodeIterator it = (NodeIterator) stack.peek();
                    if (it.setPosition(it.getPosition() + 1)) {
                        currentNodePointer = it.getNodePointer();
                        if (!currentNodePointer.isLeaf()) {
                            stack.push(
                                currentNodePointer.childIterator(
                                    null,
                                    reverse,
                                    null));
                        }
                        if (currentNodePointer.testNode(nodeTest)) {
                            super.setPosition(getCurrentPosition() + 1);
                            return true;
                        }
                    }
                    else {
                        // We get here only if the name test failed
                        // and the iterator ended
                        stack.pop();
                    }
                }
                else {
                    NodeIterator it = (NodeIterator) stack.peek();
                    if (it.setPosition(it.getPosition() + 1)) {
                        currentNodePointer = it.getNodePointer();
                        if (!currentNodePointer.isLeaf()) {
                            stack.push(
                                currentNodePointer.childIterator(
                                    null,
                                    reverse,
                                    null));
                        }
                        else if (currentNodePointer.testNode(nodeTest)) {
                            super.setPosition(getCurrentPosition() + 1);
                            return true;
                        }
                    }
                    else {
                        stack.pop();
                        if (!stack.isEmpty()) {
                            it = (PropertyIterator) stack.peek();
                            currentNodePointer = it.getNodePointer();
                            if (currentNodePointer.testNode(nodeTest)) {
                                super.setPosition(getCurrentPosition() + 1);
                                return true;
                            }
                        }
View Full Code Here

Examples of org.apache.commons.jxpath.ri.model.NodeIterator

                }
            }
        }

        while (!stack.isEmpty()) {
            NodeIterator it = (NodeIterator) stack.peek();
            if (it.setPosition(it.getPosition() + 1)) {
                currentNodePointer = it.getNodePointer();
                if (!currentNodePointer.isLeaf()) {
                    stack.push(
                        currentNodePointer.childIterator(
                            ELEMENT_NODE_TEST,
                            false,
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

               String value, boolean op) {
  return(new NodeValueIterator(iterator, type, value, op));
    }

    public NodeIterator getNamespaceAxisIterator(final int axis, final int ns) {
  NodeIterator iterator = _adapters[0].getNamespaceAxisIterator(axis,ns);
  return(iterator)
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

    public void setMultiDOMMask(int mask) {
  _multiDOMMask = mask;
    }

    public NodeIterator getChildren(final int node) {
  NodeIterator iterator = _domImpl.getChildren(node);
  if (_filter == null) {
      return iterator.setStartNode(node);
  }
  else {
      iterator = _domImpl.strippingIterator(iterator, getMapping(),
    _filter);
      return iterator.setStartNode(node);
  }
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

    }
   
    public NodeIterator getTypedChildren(final int type) {
  final short[] reverse = getReverse();

  NodeIterator iterator = _domImpl.getTypedChildren(reverse[type]);
  if (reverse[type] == DOM.TEXT && _filter != null) {
      return _domImpl.strippingIterator(iterator, getMapping(), _filter);
  }
  return iterator;
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

    public NodeIterator getNamespaceAxisIterator(final int axis, final int ns) {
  return _domImpl.getNamespaceAxisIterator(axis, getNSReverse()[ns]);
    }

    public NodeIterator getAxisIterator(final int axis) {
  NodeIterator iterator = _domImpl.getAxisIterator(axis);
  if (_filter != null) {
      return _domImpl.strippingIterator(iterator, getMapping(), _filter);
  }
  return iterator;
    }
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

  }
  return iterator;
    }
   
    public NodeIterator getTypedAxisIterator(final int axis, final int type) {
  NodeIterator iterator;
  final short[] reverse = getReverse();
  final short[] NSreverse = getNSReverse();

  if (axis == Axis.NAMESPACE) {
      iterator = (type == NO_TYPE || type > NSreverse.length) ?
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

  }
  else if (obj instanceof String) {
      return stringToReal((String) obj);
  }
  else if (obj instanceof NodeIterator) {
      NodeIterator iter = (NodeIterator) obj;
      return stringToReal(dom.getNodeValue(iter.reset().next()));
  }
  else if (obj instanceof Node) {
      return stringToReal(dom.getNodeValue(((Node) obj).node));
  }
  else if (obj instanceof DOM) {
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

  }
  else if (obj instanceof String) {
      return !((String) obj).equals(EMPTYSTRING);
  }
  else if (obj instanceof NodeIterator) {
      NodeIterator iter = (NodeIterator) obj;
      return iter.reset().next() != NodeIterator.END;
  }
  else if (obj instanceof Node) {
      return true;
  }
  else if (obj instanceof DOM) {
View Full Code Here

Examples of org.apache.xalan.xsltc.NodeIterator

    return result;
      }

      // Next, node-set/t for t in {real, string, node-set, result-tree}

      NodeIterator iter = ((NodeIterator)left).reset();

      if (right instanceof NodeIterator) {
    result = compare(iter, (NodeIterator)right, op, dom);
      }
      else if (right instanceof String) {
    result = compare(iter, (String)right, op, dom);
     
      else if (right instanceof Number) {
    final double temp = ((Number)right).doubleValue();
    result = compare(iter, temp, op, dom);
      }
      else if (right instanceof Boolean) {
    boolean temp = ((Boolean)right).booleanValue();
    result = (iter.reset().next() != NodeIterator.END) == temp;
      }
      else if (right instanceof DOM) {
    result = compare(iter, ((DOM)right).getStringValue(),
         op, dom);
      }
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.