sboag 00/12/09 14:27:07
Modified: java/src/org/apache/xalan/transformer KeyRefIterator.java
Log:
Move the reassignment of member variables from clone to cloneWithReset.
This fixes test position56.
Revision Changes Path
1.3 +19 -0
xml-xalan/java/src/org/apache/xalan/transformer/KeyRefIterator.java
Index: KeyRefIterator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/KeyRefIterator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- KeyRefIterator.java 2000/11/30 18:28:20 1.2
+++ KeyRefIterator.java 2000/12/09 22:27:07 1.3
@@ -65,6 +65,7 @@
import org.w3c.dom.Node;
import org.w3c.dom.DOMException;
+import org.w3c.dom.traversal.NodeIterator;
/**
* <meta name="usage" content="internal"/>
@@ -183,10 +184,28 @@
public Object clone() throws CloneNotSupportedException
{
KeyRefIterator clone = (KeyRefIterator)super.clone();
+ // clone.m_ki = (KeyIterator)m_ki.clone();
+ return clone;
+ }
+
+ /**
+ * Get a cloned Iterator that is reset to the beginning
+ * of the query.
+ *
+ * @return A cloned NodeIterator set of the start of the query.
+ *
+ * @throws CloneNotSupportedException
+ */
+ public NodeIterator cloneWithReset() throws CloneNotSupportedException
+ {
+
+ KeyRefIterator clone = (KeyRefIterator)super.cloneWithReset();
+
clone.m_foundLast = false;
clone.m_lastFetched = null;
clone.m_next = 0;
clone.setCurrentPos(0);
+
return clone;
}