gnu.kawa.xml

Class TreeScanner

public abstract class TreeScanner extends MethodProc implements Externalizable, CanInline

Abstract class that scans part of a node tree. Takes a node argument, and writes matching "relative" nodes out to a PositionConsumer as a sequence of position pairs. This is uses to implement "path expressions" as in XPath/XSLT/XQuery. For example, the ChildAxis sub-class writes out all child nodes of the argument that match the 'type' NodePredicate.
Field Summary
NodePredicatetype
Method Summary
voidapply(CallContext ctx)
StringgetDesc()
NodePredicategetNodePredicate()
Expressioninline(ApplyExp exp, ExpWalker walker)
intnumArgs()
voidreadExternal(ObjectInput in)
abstract voidscan(AbstractSequence seq, int ipos, PositionConsumer out)
StringtoString()
voidwriteExternal(ObjectOutput out)

Field Detail

type

public NodePredicate type

Method Detail

apply

public void apply(CallContext ctx)

getDesc

public String getDesc()

getNodePredicate

public NodePredicate getNodePredicate()

inline

public Expression inline(ApplyExp exp, ExpWalker walker)

numArgs

public int numArgs()

readExternal

public void readExternal(ObjectInput in)

scan

public abstract void scan(AbstractSequence seq, int ipos, PositionConsumer out)

toString

public String toString()

writeExternal

public void writeExternal(ObjectOutput out)