You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mo...@apache.org on 2001/09/24 10:59:21 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/dom NthIterator.java

morten      01/09/24 01:59:21

  Modified:    java/src/org/apache/xalan/xsltc/dom NthIterator.java
  Log:
  A revised fix for bug 2954, that does not cause the regressions previously
  sown by some tests.
  PR:		bugzilla 2954 (revised fix)
  Obtained from:	n/a
  Submitted by:	morten@xml.apache.org
  Reviewed by:	morten@xml.apache.org
  
  Revision  Changes    Path
  1.4       +2 -5      xml-xalan/java/src/org/apache/xalan/xsltc/dom/NthIterator.java
  
  Index: NthIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/NthIterator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NthIterator.java	2001/09/24 08:46:23	1.3
  +++ NthIterator.java	2001/09/24 08:59:21	1.4
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: NthIterator.java,v 1.3 2001/09/24 08:46:23 morten Exp $
  + * @(#)$Id: NthIterator.java,v 1.4 2001/09/24 08:59:21 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -94,9 +94,8 @@
   	
       public NodeIterator setStartNode(final int node) {
   	_source.setStartNode(node);
  -	/*
   	// Make sure we count backwards if the iterator is reverse
  -	if (_source.isReverse()) {
  +	if ((_source instanceof FilterIterator) && (_source.isReverse())) {
   	    int last = _source.getLast();
   	    _position = (last - _n) + 1;
   	    if (_position < 1) _position = 1;
  @@ -104,8 +103,6 @@
   	else {
   	    _position = _n;
   	}
  -	*/
  -	_position = _n;
   	_ready = true;
   	return this;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org