com.icl.saxon.tinytree

Class PrecedingEnumeration

final class PrecedingEnumeration extends Object implements AxisEnumeration

Enumerate all the nodes on the preceding axis from a given start node. The calling code ensures that the start node is not a root, attribute, or namespace node. As well as the standard XPath preceding axis, this class also implements a Saxon-specific "preceding-or-ancestor" axis which returns ancestor nodes as well as preceding nodes. This is used when performing xsl:number level="any".
Field Summary
TinyDocumentImpldocument
booleanincludeAncestors
intlast
intnextAncestorDepth
intnextNodeNr
TinyNodeImplstartNode
NodeTesttest
Constructor Summary
PrecedingEnumeration(TinyDocumentImpl doc, TinyNodeImpl node, NodeTest nodeTest, boolean includeAncestors)
Method Summary
intgetLastPosition()
Get the last position, that is the number of nodes in the enumeration
booleanhasMoreElements()
booleanisPeer()
booleanisReverseSorted()
booleanisSorted()
NodeInfonextElement()

Field Detail

document

TinyDocumentImpl document

includeAncestors

boolean includeAncestors

last

int last

nextAncestorDepth

int nextAncestorDepth

nextNodeNr

int nextNodeNr

startNode

TinyNodeImpl startNode

test

NodeTest test

Constructor Detail

PrecedingEnumeration

public PrecedingEnumeration(TinyDocumentImpl doc, TinyNodeImpl node, NodeTest nodeTest, boolean includeAncestors)

Method Detail

getLastPosition

public int getLastPosition()
Get the last position, that is the number of nodes in the enumeration

hasMoreElements

public boolean hasMoreElements()

isPeer

public boolean isPeer()

isReverseSorted

public boolean isReverseSorted()

isSorted

public boolean isSorted()

nextElement

public NodeInfo nextElement()