sboag       01/03/11 15:22:59

  Modified:    java/src/org/apache/xpath XPathAPI.java
  Log:
  Applied patch submitted by [EMAIL PROTECTED] (Norris Boyd)
  at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=702.
  
  Revision  Changes    Path
  1.9       +9 -2      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XPathAPI.java     2001/01/07 06:24:40     1.8
  +++ XPathAPI.java     2001/03/11 23:22:59     1.9
  @@ -197,8 +197,15 @@
       // 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();
  +    // 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;
     }
   
     /**
  
  
  

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

Reply via email to