sboag       00/11/07 09:28:15

  Modified:    java/src/org/apache/xpath NodeSet.java
  Log:
  Make sure current node remains in the same place when getCurrent is called.
  This needs more work, I think, and the fix should really be made
  lower down.
  
  Revision  Changes    Path
  1.4       +4 -1      xml-xalan/java/src/org/apache/xpath/NodeSet.java
  
  Index: NodeSet.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/NodeSet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NodeSet.java      2000/10/30 18:58:23     1.3
  +++ NodeSet.java      2000/11/07 17:28:12     1.4
  @@ -924,7 +924,10 @@
         throw new RuntimeException(
           "This NodeSet can not do indexing or counting functions!");
   
  -    return elementAt(m_next);
  +    int saved = m_next;
  +    Node n = elementAt(m_next-1);
  +    m_next = saved; // HACK: I think this is a bit of a hack.  -sb
  +    return n;
     }
   
     /** NEEDSDOC Field m_mutable          */
  
  
  

Reply via email to