1 package net.sf.saxon.tree; 2 import net.sf.saxon.om.SequenceIterator; 3 import net.sf.saxon.pattern.NodeTest; 4 5 final class DescendantEnumeration extends TreeEnumeration { 6 7 private NodeImpl root; 8 private boolean includeSelf; 9 10 public DescendantEnumeration(NodeImpl node, NodeTest nodeTest, boolean includeSelf) { 11 super(node, nodeTest); 12 root = node; 13 this.includeSelf = includeSelf; 14 if (!includeSelf || !conforms(node)) { 15 advance(); 16 } 17 } 18 19 protected void step() { 20 next = next.getNextInDocument(root); 21 } 22 23 26 27 public SequenceIterator getAnother() { 28 return new DescendantEnumeration(start, nodeTest, includeSelf); 29 } 30 } 31 32 | Popular Tags |