sboag 01/08/04 13:54:20
Modified: java/src/org/apache/xml/dtm DTMAxisIterator.java
java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java
DTMDefaultBaseIterators.java
Log:
Provide method for DTMAxisIterator to get the current root node
of the iteration.
Revision Changes Path
1.4 +8 -0
xml-xalan/java/src/org/apache/xml/dtm/DTMAxisIterator.java
Index: DTMAxisIterator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/DTMAxisIterator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DTMAxisIterator.java 2001/08/02 02:04:17 1.3
+++ DTMAxisIterator.java 2001/08/04 20:54:20 1.4
@@ -112,6 +112,14 @@
public DTMAxisIterator setStartNode(int node);
/**
+ * Get start to END should 'close' the iterator,
+ * i.e. subsequent call to next() should return END.
+ *
+ * @return The root node of the iteration.
+ */
+ public int getStartNode();
+
+ /**
* @return true if this iterator has a reversed axis, else false.
*/
public boolean isReverse();
1.4 +11 -0
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java
Index: DTMAxisIteratorBase.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DTMAxisIteratorBase.java 2001/08/02 02:04:17 1.3
+++ DTMAxisIteratorBase.java 2001/08/04 20:54:20 1.4
@@ -96,6 +96,17 @@
* the iterator was produced by cloning another iterator.)
*/
protected boolean _isRestartable = true;
+
+ /**
+ * Get start to END should 'close' the iterator,
+ * i.e. subsequent call to next() should return END.
+ *
+ * @return The root node of the iteration.
+ */
+ public int getStartNode()
+ {
+ return _startNode;
+ }
/**
* @return A DTMAxisIterator which has been reset to the start node,
1.5 +15 -0
xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java
Index: DTMDefaultBaseIterators.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DTMDefaultBaseIterators.java 2001/08/02 02:04:17 1.4
+++ DTMDefaultBaseIterators.java 2001/08/04 20:54:20 1.5
@@ -1402,6 +1402,20 @@
new org.apache.xml.utils.NodeVector();
int m_ancestorsPos;
+
+ /** The real start node for this axes, since _startNode will be
adjusted. */
+ int m_realStartNode;
+
+ /**
+ * Get start to END should 'close' the iterator,
+ * i.e. subsequent call to next() should return END.
+ *
+ * @return The root node of the iteration.
+ */
+ public int getStartNode()
+ {
+ return m_realStartNode;
+ }
/**
* True if this iterator has a reversed axis.
@@ -1462,6 +1476,7 @@
*/
public DTMAxisIterator setStartNode(int node)
{
+ m_realStartNode = node;
if (_isRestartable)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]