You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by am...@apache.org on 2002/03/11 23:31:33 UTC

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

amiro       02/03/11 14:31:33

  Modified:    java/src/org/apache/xalan/xsltc/dom
                        CurrentNodeListIterator.java
  Log:
  fix bug 5577 XSLTMark trend test
  
  Revision  Changes    Path
  1.6       +6 -13     xml-xalan/java/src/org/apache/xalan/xsltc/dom/CurrentNodeListIterator.java
  
  Index: CurrentNodeListIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/CurrentNodeListIterator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CurrentNodeListIterator.java	4 Dec 2001 10:30:07 -0000	1.5
  +++ CurrentNodeListIterator.java	11 Mar 2002 22:31:32 -0000	1.6
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: CurrentNodeListIterator.java,v 1.5 2001/12/04 10:30:07 morten Exp $
  + * @(#)$Id: CurrentNodeListIterator.java,v 1.6 2002/03/11 22:31:32 amiro Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -99,11 +99,6 @@
   	_currentNode = currentNode;
       }
   
  -    public NodeIterator forceNaturalOrder() {
  -	_docOrder = true;
  -	return this;
  -    }
  -
       public void setRestartable(boolean isRestartable) {
   	_isRestartable = isRestartable;
   	_source.setRestartable(isRestartable);
  @@ -139,9 +134,8 @@
   	final int currentNode = _currentNode;
   
   	for (int index = _current; index < last; ) {
  -	    final int node = _nodes.at(index++); // note increment
  -	    final int position = docOrder ? index : last - index + 1;
  -	    if (_filter.test(node, position, last, currentNode, _translet, this)) {
  +	    final int node = _nodes.at(index++); 	// note increment
  +	    if (_filter.test(node, index, last, currentNode, _translet, this)) {
   		_current = index;
   		return returnNode(node);
   	    }
  @@ -156,9 +150,8 @@
           final int currNode = _currentNode;
   
   	for (int index = _current; index < last; ) {
  -            int nodeIndex = _nodes.at(index++); // note increment
  -            final int pos = docOrder ? index : last - index + 1;
  -            if (_filter.test(nodeIndex, pos, last, currNode, _translet, this)) {
  +            int nodeIndex = _nodes.at(index++); 	// note increment
  +            if (_filter.test(nodeIndex, index, last, currNode, _translet, this)) {
                   lastPosition++;
               }
           }
  @@ -185,7 +178,7 @@
       }
   	
       public int getLast() {
  -	return ( _last == -1 ) ? computePositionOfLast() : _last;
  +	return (_last == -1) ? computePositionOfLast() : _last;
       }
   
       public void setMark() {
  
  
  

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