code: protected WalkingIterator createIteratorFromSteps(final WalkingIterator wi, int numSteps)
    {
    	WalkingIterator newIter = new WalkingIterator(wi.getPrefixResolver());
    	try
    	{
    		AxesWalker walker = (AxesWalker)wi.getFirstWalker().clone();
    		newIter.setFirstWalker(walker);
    		walker.setLocPathIterator(newIter);
    		for(int i = 1; i < numSteps; i++)
    		{
    			AxesWalker next = (AxesWalker)walker.getNextWalker().clone();
    			walker.setNextWalker(next);
    			next.setLocPathIterator(newIter);
    			walker = next;
    		}
    		walker.setNextWalker(null);
    	}
    	catch(CloneNotSupportedException cnse)
    	{
    		throw new WrappedRuntimeException(cnse);
    	}
    	return newIter;
    }
docs: Create a new WalkingIterator from the steps in another WalkingIterator.
  
  @param wi The iterator from where the steps will be taken.
  @param numSteps The number of steps from the first to copy into the new
  iterator.
  @return The new iterator.