net.sf.saxon.functions

Class Id

public class Id extends SystemFunction

The XPath id() function XPath 2.0 version: accepts any sequence as the first parameter; each item in the sequence is taken as an IDREFS value, that is, a space-separated list of ID values. Also accepts an optional second argument to identify the target document, this defaults to the context node.
Method Summary
voidcheckArguments(StaticContext env)
Static analysis: prevent sorting of the argument
intcomputeSpecialProperties()
Get the static properties of this expression (other than its type).
SequenceIteratoriterate(XPathContext context)
Evaluate the function to return an iteration of selected nodes.
ExpressionpreEvaluate(StaticContext env)
preEvaluate: this method suppresses compile-time evaluation by doing nothing
Expressionsimplify(StaticContext env)
Simplify: add a second implicit argument, the context document

Method Detail

checkArguments

public void checkArguments(StaticContext env)
Static analysis: prevent sorting of the argument

computeSpecialProperties

public int computeSpecialProperties()
Get the static properties of this expression (other than its type). The result is bit-signficant. 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.

iterate

public SequenceIterator iterate(XPathContext context)
Evaluate the function to return an iteration of selected nodes.

preEvaluate

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

simplify

public Expression simplify(StaticContext env)
Simplify: add a second implicit argument, the context document