acceptNode
public short acceptNode(int n)
Test whether a specified node is visible in the logical view of a
TreeWalker or NodeIterator. This function will be called by the
implementation of TreeWalker and NodeIterator; it is not intended to
be called directly from user code.
n
- The node to check to see if it passes the filter or not.
- a constant to determine whether the node is accepted,
rejected, or skipped, as defined above .
callPredicateVisitors
public void callPredicateVisitors(XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for
each member. If the called visitor method returns
false, the subtree should not be called.
visitor
- The visitor whose appropriate method will be called.
canTraverseOutsideSubtree
public boolean canTraverseOutsideSubtree()
Tell if this expression or it's subexpressions can traverse outside
the current subtree.
- canTraverseOutsideSubtree in interface Expression
- true if traversal outside the context node's subtree can occur.
clone
public Object clone()
throws CloneNotSupportedException
Get a cloned PrdicatedNodeTest.
- A new PredicatedNodeTest that can be used without mutating this one.
fixupVariables
public void fixupVariables(Vector vars,
int globalsSize)
This function is used to fixup variables from QNames to stack frame
indexes at stylesheet build time.
- fixupVariables in interface NodeTest
vars
- List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector will be its position
in the stack frame (but variables above the globalsTop value will need
to be offset to the current stack frame).
getLastPos
public abstract int getLastPos(XPathContext xctxt)
Get the index of the last node that can be itterated to.
- getLastPos in interface SubContextList
xctxt
- XPath runtime context.
- the index of the last node that can be itterated to.
getLocPathIterator
public LocPathIterator getLocPathIterator()
Get the owning location path iterator.
- the owning location path iterator, which should not be null.
getPredicate
public Expression getPredicate(int index)
Get a predicate expression at the given index.
index
- Index of the predicate.
getPredicateCount
public int getPredicateCount()
Get the number of predicates that this walker has.
- the number of predicates that this walker has.
getPredicateIndex
public int getPredicateIndex()
Get which predicate is executing.
- The current predicate index, or -1 if no predicate is executing.
getProximityPosition
public int getProximityPosition()
Get the current sub-context position.
- The node position of this walker in the sub-context node list.
getProximityPosition
public int getProximityPosition(XPathContext xctxt)
Get the current sub-context position.
- getProximityPosition in interface SubContextList
xctxt
- The XPath runtime context.
- The node position of this walker in the sub-context node list.
initProximityPosition
public void initProximityPosition(int i)
throws TransformerException
Init the proximity position to zero for a forward axes.
i
- The index into the m_proximityPositions array.
isReverseAxes
public boolean isReverseAxes()
Tells if this is a reverse axes.
- false, unless a derived class overrides.
resetProximityPositions
public void resetProximityPositions()
Reset the proximity positions counts.
setLocPathIterator
public void setLocPathIterator(LocPathIterator li)
Set the location path iterator owner for this walker. Besides
initialization, this function is called during cloning operations.
li
- non-null reference to the owning location path iterator.
setPredicateCount
public void setPredicateCount(int count)
Set the number of predicates that this walker has. This does more
that one would think, as it creates a new predicate array of the
size of the count argument, and copies count predicates into the new
one from the old, and then reassigns the predicates value. All this
to keep from having to have a predicate count value.
count
- The number of predicates, which must be equal or less
than the existing count.