mmidy       01/06/05 13:35:00

  Modified:    java/src/org/apache/xpath Tag: DTM_EXP XPathAPI.java
  Log:
  Use DTM interface
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.3   +2 -8      xml-xalan/java/src/org/apache/xpath/XPathAPI.java
  
  Index: XPathAPI.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathAPI.java,v
  retrieving revision 1.9.2.2
  retrieving revision 1.9.2.3
  diff -u -r1.9.2.2 -r1.9.2.3
  --- XPathAPI.java     2001/05/27 03:05:15     1.9.2.2
  +++ XPathAPI.java     2001/06/05 20:35:00     1.9.2.3
  @@ -73,6 +73,7 @@
   
   import org.apache.xml.dtm.DTM;
   import org.apache.xml.dtm.ref.DTMNodeIterator;
  +import org.apache.xml.dtm.ref.DTMNodeList;
   import org.apache.xml.dtm.ref.DTMManagerDefault;
   
   
  @@ -205,15 +206,8 @@
       // Execute the XPath, and have it return the result
       XObject list = eval(contextNode, str, namespaceNode);
   
  -    // Patch attributed to [EMAIL PROTECTED] (Norris Boyd)
  -    NodeSet nodeset = list.mutableNodeset();
  -
  -    // setShouldCacheNodes(true) be called before the first nextNode() is
  -    //   called, in order that nodes can be added as they are fetched.
  -    nodeset.setShouldCacheNodes(true);
  -
       // Return a NodeList.
  -    return (NodeList) nodeset;
  +    return new DTMNodeList(list.nodeset());
     }
   
     /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to