2
* Licensed to the Apache Software Foundation (ASF) under one
3
* or more contributor license agreements. See the NOTICE file
4
* distributed with this work for additional information
5
* regarding copyright ownership. The ASF licenses this file
6
* to you under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
10
* http://www.apache.org/licenses/LICENSE-2.0
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
19
* $Id: ClonedNodeListIterator.java,v 1.2 2009/12/10 03:18:34 matthewoliver Exp $
22
package org.apache.xalan.xsltc.dom;
24
import org.apache.xml.dtm.DTMAxisIterator;
25
import org.apache.xml.dtm.ref.DTMAxisIteratorBase;
28
* A ClonedNodeListIterator is returned by the cloneIterator() method
29
* of a CachedNodeListIterator. Its next() method retrieves the nodes from
30
* the cache of the CachedNodeListIterator.
32
public final class ClonedNodeListIterator extends DTMAxisIteratorBase {
35
* Source for this iterator.
37
private CachedNodeListIterator _source;
38
private int _index = 0;
40
public ClonedNodeListIterator(CachedNodeListIterator source) {
44
public void setRestartable(boolean isRestartable) {
45
//_isRestartable = isRestartable;
46
//_source.setRestartable(isRestartable);
49
public DTMAxisIterator setStartNode(int node) {
54
return _source.getNode(_index++);
57
public int getPosition() {
58
return _index == 0 ? 1 : _index;
61
public int getNodeByPosition(int pos) {
62
return _source.getNode(pos);
65
public DTMAxisIterator cloneIterator() {
66
return _source.cloneIterator();
69
public DTMAxisIterator reset() {
74
public void setMark() {
78
public void gotoMark() {