You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/03/12 00:22:59 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath XPathAPI.java
sboag 01/03/11 15:22:59
Modified: java/src/org/apache/xpath XPathAPI.java
Log:
Applied patch submitted by nboyd@atg.com (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 nboyd@atg.com (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: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org