net.sf.saxon.functions

Class Trace

public class Trace extends SystemFunction

This class supports the XPath 2.0 function trace(). The value is traced to the System.err stream, unless a TraceListener is in use, in which case the information is sent to the TraceListener
Nested Class Summary
classTrace.TracingIterator
Tracing Iterator class
Field Summary
NamespaceResolverresolver
Method Summary
intcomputeCardinality()
Get the static cardinality
intcomputeSpecialProperties()
Get the static properties of this expression (other than its type).
ItemevaluateItem(XPathContext context)
Evaluate the function
SequenceIteratoriterate(XPathContext context)
Iterate over the results of the function
ExpressionpreEvaluate(StaticContext env)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
Expressionsimplify(StaticContext env)
Simplify the function call.

Field Detail

resolver

NamespaceResolver resolver

Method Detail

computeCardinality

public int computeCardinality()
Get the static cardinality

computeSpecialProperties

public int computeSpecialProperties()
Get the static properties of this expression (other than its type). The result is bit-significant. These properties are used for optimizations. In general, if property bit is set, it is true, but if it is unset, the value is unknown.

evaluateItem

public Item evaluateItem(XPathContext context)
Evaluate the function

iterate

public SequenceIterator iterate(XPathContext context)
Iterate over the results of the function

preEvaluate

public Expression preEvaluate(StaticContext env)
preEvaluate: this method suppresses compile-time evaluation by doing nothing

simplify

public Expression simplify(StaticContext env)
Simplify the function call. This implementation saves the static namespace context, in case it is needed by the TraceListener.