Package org.apache.xpath.objects

Examples of org.apache.xpath.objects.XObject.nodeset()


          //       which may not match the javaClass, causing a RuntimeException.
          // if((NodeIterator.class.isAssignableFrom(javaClass)) ||
          if ( (javaClass == NodeIterator.class) ||
               (javaClass == java.lang.Object.class) )
          {
            return xobj.nodeset();
          }
          // Same comment as above
          // else if(NodeList.class.isAssignableFrom(javaClass))
          else if(javaClass == NodeList.class)
          {
View Full Code Here


          // else if(Node.class.isAssignableFrom(javaClass))
          else if(javaClass == Node.class)
          {
            // Xalan ensures that nodeset() always returns an
            // iterator positioned at the beginning.
            NodeIterator ni = xobj.nodeset();
            return ni.nextNode(); // may be null.
          }
          else if(javaClass == java.lang.String.class)
          {
            return xobj.str();
View Full Code Here

          {
            return convertDoubleToNumber(xobj.num(), javaClass);
          }
          else
          {
            Node child = xobj.nodeset().nextNode();
            if(javaClass.isAssignableFrom(child.getClass()))
              return child;
            else
              return null;
          }
View Full Code Here

          handler.characters(s.toCharArray(), 0, s.length());
          break;
        case XObject.CLASS_NODESET :

          // System.out.println(value);
          NodeIterator nl = value.nodeset();

          // Copy the tree.
          org.apache.xml.utils.TreeWalker tw =
                                                new TreeWalker2Result(transformer, handler);
          Node pos;
View Full Code Here

        s = value.str();

        rtreeHandler.characters(s.toCharArray(), 0, s.length());
        break;
      case XObject.CLASS_NODESET :  // System.out.println(value);
        NodeIterator nl = value.nodeset();
        Node pos;

        while (null != (pos = nl.nextNode()))
        {
          Node top = pos;
View Full Code Here

      }
      else
        obj = m_expr.execute(m_lpi.getXPathContext());
     
      // System.out.println("Back from m_expr.execute(m_lpi.getXPathContext()): "+obj);
      m_nodeSet = (null != obj) ? obj.nodeset() : null;
     
      m_peek = null;
    }
    catch (javax.xml.transform.TransformerException se)
    {
View Full Code Here

          if (lookupKey.equals(exprResult))
            return this.FILTER_ACCEPT;
        }
        else
        {
          NodeIterator nl = xuse.nodeset();
          Node useNode;
          short result = -1;
          /*
          We are walking through all the nodes in this nodeset
          rather than stopping when we find the one we're looking
View Full Code Here

      // relative URI into an absolute URI.
      XObject arg2 = arg1Expr.execute(xctxt);

      if (XObject.CLASS_NODESET == arg2.getType())
      {
        Node baseNode = arg2.nodeset().nextNode();

        if (baseNode == null)
          warn(xctxt, XSLTErrorResources.WG_EMPTY_SECOND_ARG, null);

        Document baseDoc = (baseNode == null
View Full Code Here

    // Execute the XPath, and have it return the result
    XObject list = eval(contextNode, str, namespaceNode);

    // Have the XObject return its result as a NodeSet.
    return list.nodeset();
  }

  /**
   *  Use an XPath string to select a nodelist.
   *  XPath namespace prefixes are resolved from the contextNode.
View Full Code Here

    // Execute the XPath, and have it return the result
    XObject list = eval(contextNode, str, namespaceNode);

    // Have the XObject return its result as a NodeSet.
    return (NodeList) list.nodeset();
  }

  /**
   *  Evaluate XPath string to an XObject.  Using this method,
   *  XPath namespace prefixes will be resolved from the namespaceNode.
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.