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 registered output stream (defaulting to System.err), unless a TraceListener is in use, in which case the information is sent to the TraceListener
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(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
Expressionsimplify(ExpressionVisitor visitor)
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(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing

Parameters: visitor an expression visitor

simplify

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

Parameters: visitor an expression visitor