net.sf.saxon.instruct
public abstract class GeneralVariable extends Instruction implements Binding
Field Summary | |
---|---|
protected int | nameCode |
protected int | referenceCount |
SequenceType | requiredType |
Expression | select |
Constructor Summary | |
---|---|
GeneralVariable() |
Method Summary | |
---|---|
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure. |
Item | evaluateItem(XPathContext context)
Evaluate an expression as a single item. |
int | getCardinality()
Get the cardinality of the result of this instruction. |
int | getInstructionNameCode() |
ItemType | getItemType(TypeHierarchy th)
Get the type of the result of this instruction. |
int | getLocalSlotNumber()
If this is a local variable held on the local stack frame, return the corresponding slot number.
|
int | getNameCode() |
SequenceType | getRequiredType() |
Expression | getSelectExpression() |
ValueRepresentation | getSelectValue(XPathContext context)
Evaluate the variable. |
int | getSlotNumber() |
int | getVariableFingerprint()
Get the name of the variable (as a NamePool fingerprint) |
String | getVariableName() |
void | init(Expression select, int nameCode) |
boolean | isAssignable()
Test whether it is permitted to assign to the variable using the saxon:assign
extension element. |
boolean | isGlobal() |
boolean | isRequiredParam() |
boolean | isTunnelParam() |
SequenceIterator | iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
Iterator | iterateSubExpressions()
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction) |
Expression | optimize(Optimizer opt, StaticContext env, ItemType contextItemType) |
protected void | promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites. |
void | setAssignable(boolean assignable) |
void | setNameCode(int nameCode) |
void | setReferenceCount(int refCount) |
void | setRequiredParam(boolean requiredParam) |
void | setRequiredType(SequenceType required) |
void | setSelectExpression(Expression select) |
void | setSlotNumber(int s) |
void | setTunnel(boolean tunnel) |
void | setVariableName(String s) |
Expression | simplify(StaticContext env) |
Expression | typeCheck(StaticContext env, ItemType contextItemType) |
Parameters: level indentation level for this expression out
Parameters: context The context in which the expression is to be evaluated
Returns: the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
Throws: XPathException if any dynamic error occurs evaluating the expression
Returns: the empty cardinality.
Parameters: th
Returns: the empty type.
Returns: the NamePool fingerprint of the variable's expanded name.
Parameters: context supplies the context for evaluation
Returns: a SequenceIterator that can be used to iterate over the result of the expression
Throws: XPathException if any dynamic error occurs evaluating the expression
Parameters: offer The type of rewrite being offered
Throws: XPathException