ilene 2002/12/11 07:27:41
Modified: java/src/org/apache/xpath Tag: xslt20 NodeSetDTM.java
java/src/org/apache/xml/dtm Tag: xslt20 DTMIterator.java
java/src/org/apache/xml/dtm/ref Tag: xslt20
DTMNodeIterator.java
Log:
Just tidying up the javadoc in the previousNode and nextNode methods
and making sure we're testing against DTM.NULL instead of -1.
Revision Changes Path
No revision
No revision
1.10.2.1.2.3 +2 -2 xml-xalan/java/src/org/apache/xpath/NodeSetDTM.java
Index: NodeSetDTM.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/NodeSetDTM.java,v
retrieving revision 1.10.2.1.2.2
retrieving revision 1.10.2.1.2.3
diff -u -r1.10.2.1.2.2 -r1.10.2.1.2.3
--- NodeSetDTM.java 6 Dec 2002 19:52:29 -0000 1.10.2.1.2.2
+++ NodeSetDTM.java 11 Dec 2002 15:27:40 -0000 1.10.2.1.2.3
@@ -419,7 +419,7 @@
* iterator in the set. After a DTMIterator is created, the first call
* to nextNode() returns the first node in the set.
* @return The next <code>Node</code> in the set being iterated over, or
- * <code>null</code> if there are no more members in that set.
+ * <code>DTM.NULL</code> if there are no more members in that set.
* @throws DOMException
* INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
@@ -443,7 +443,7 @@
* Returns the previous node in the set and moves the position of the
* iterator backwards in the set.
* @return The previous <code>Node</code> in the set being iterated over,
- * or<code>null</code> if there are no more members in that set.
+ * or<code>DTM.NULL</code> if there are no more members in that set.
* @throws DOMException
* INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
No revision
No revision
1.4.14.1.2.2 +2 -2 xml-xalan/java/src/org/apache/xml/dtm/DTMIterator.java
Index: DTMIterator.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/dtm/DTMIterator.java,v
retrieving revision 1.4.14.1.2.1
retrieving revision 1.4.14.1.2.2
diff -u -r1.4.14.1.2.1 -r1.4.14.1.2.2
--- DTMIterator.java 11 Nov 2002 19:51:16 -0000 1.4.14.1.2.1
+++ DTMIterator.java 11 Dec 2002 15:27:41 -0000 1.4.14.1.2.2
@@ -206,7 +206,7 @@
* is rejected by the filters) the first node within its subtree which is
* not filtered out.
* @return The next node handle in the set being iterated over, or
- * -1 if there are no more members in that set.
+ * <code>DTM.NULL</code> if there are no more members in that set.
*/
public int nextNode();
@@ -214,7 +214,7 @@
* Returns the previous node in the set and moves the position of the
* <code>DTMIterator</code> backwards in the set.
* @return The previous node handle in the set being iterated over,
- * or <code>null</code> if there are no more members in that set.
+ * or <code>DTM.NULL</code> if there are no more members in that set.
*/
public int previousNode();
No revision
No revision
1.4.18.1 +3 -1
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMNodeIterator.java
Index: DTMNodeIterator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMNodeIterator.java,v
retrieving revision 1.4
retrieving revision 1.4.18.1
diff -u -r1.4 -r1.4.18.1
--- DTMNodeIterator.java 15 Jun 2001 17:54:12 -0000 1.4
+++ DTMNodeIterator.java 11 Dec 2002 15:27:41 -0000 1.4.18.1
@@ -193,7 +193,7 @@
throw new DTMDOMException(DOMException.INVALID_STATE_ERR);
int handle=dtm_iter.nextNode();
- if (handle==-1)
+ if (handle==DTM.NULL)
return null;
return dtm_iter.getDTM(handle).getNode(handle);
}
@@ -211,6 +211,8 @@
throw new DTMDOMException(DOMException.INVALID_STATE_ERR);
int handle=dtm_iter.previousNode();
+ if (handle==DTM.NULL)
+ return null;
return dtm_iter.getDTM(handle).getNode(handle);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]