Package com.sun.org.apache.xml.internal.dtm

Examples of com.sun.org.apache.xml.internal.dtm.DTMAxisIterator


                            int node,
                            DOM dom) {
        try {
            if (obj instanceof DTMAxisIterator)
      {
                DTMAxisIterator iter = (DTMAxisIterator) obj;
                dom.copy(iter.reset(), handler);
            }
            else if (obj instanceof Node) {
                dom.copy(((Node) obj).node, handler);
            }
            else if (obj instanceof DOM) {
View Full Code Here


    public DTMAxisIterator getChildren(final int node) {
        if (_enhancedDOM != null) {
            return _enhancedDOM.getChildren(node);
        }
        else {
            DTMAxisIterator iterator = _dom.getChildren(node);
            return iterator.setStartNode(node);
        }
    }
View Full Code Here

                if (_nodes == null) {
                    _nodes = EMPTY_NODES;
                }
            } else {
                DTMAxisIterator keyValues = _keyValueIterator.reset();
                int retrievedKeyValueIdx = 0;
                boolean foundNodes = false;

                _nodes = null;

                // For each node in the node set argument, get the string value
                // and look up the nodes returned by key or id for that string
                // value.  If at most one string value has nodes associated,
                // the nodes will be stored in _nodes; otherwise, the nodes
                // will be placed in a heap.
                for (int keyValueNode = keyValues.next();
                     keyValueNode != DTMAxisIterator.END;
                     keyValueNode = keyValues.next()) {

                    String keyValue = BasisLibrary.stringF(keyValueNode, _dom);

                    IntegerArray nodes = lookupNodes(rootHandle, keyValue);
View Full Code Here

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

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

    return result;
      }

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

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

      if (right instanceof DTMAxisIterator) {
    result = compare(iter, (DTMAxisIterator)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() != DTMAxisIterator.END) == temp;
      }
      else if (right instanceof DOM) {
    result = compare(iter, ((DOM)right).getStringValue(),
         op, dom);
      }
View Full Code Here

    /**
     * Utility function: used to convert reference to org.w3c.dom.NodeList.
     */
    public static NodeList referenceToNodeList(Object obj, DOM dom) {
        if (obj instanceof Node || obj instanceof DTMAxisIterator) {
            DTMAxisIterator iter = referenceToNodeSet(obj);
            return dom.makeNodeList(iter);
        }
        else if (obj instanceof DOM) {
          dom = (DOM)obj;
          return dom.makeNodeList(DTMDefaultBase.ROOTNODE);
View Full Code Here

    /**
     * Utility function: used to convert reference to org.w3c.dom.Node.
     */
    public static org.w3c.dom.Node referenceToNode(Object obj, DOM dom) {
        if (obj instanceof Node || obj instanceof DTMAxisIterator) {
            DTMAxisIterator iter = referenceToNodeSet(obj);
            return dom.makeNode(iter);
        }
        else if (obj instanceof DOM) {
          dom = (DOM)obj;
          DTMAxisIterator iter = dom.getChildren(DTMDefaultBase.ROOTNODE);
          return dom.makeNode(iter);
        }
  else {
      final String className = obj.getClass().getName();
      runTimeError(DATA_CONVERSION_ERR, className, "org.w3c.dom.Node");
View Full Code Here

                translet.getUrisArray(),
                translet.getTypesArray(),
    translet.getNamespaceArray());
            multiDOM.addDOMAdapter(domAdapter);

      DTMAxisIterator iter1 = idom.getAxisIterator(Axis.CHILD);
      DTMAxisIterator iter2 = idom.getAxisIterator(Axis.CHILD);
            DTMAxisIterator iter = new AbsoluteIterator(
                new StepIterator(iter1, iter2));

       iter.setStartNode(DTMDefaultBase.ROOTNODE);
      return iter;
  }
        else {
      runTimeError(RUN_TIME_INTERNAL_ERR, "nodeList2Iterator()");
      return null;
View Full Code Here

          int node,
          DOM dom) {
  try {
      if (obj instanceof DTMAxisIterator)
      {
    DTMAxisIterator iter = (DTMAxisIterator) obj;
    dom.copy(iter.reset(), handler);
      }
      else if (obj instanceof Node) {
    dom.copy(((Node) obj).node, handler);
      }
      else if (obj instanceof DOM) {
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xml.internal.dtm.DTMAxisIterator

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.