| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.instruct.Instruction net.sf.saxon.instruct.GeneralVariable
All known Subclasses: net.sf.saxon.instruct.GlobalVariable, net.sf.saxon.instruct.LocalParam, net.sf.saxon.instruct.Assign, net.sf.saxon.instruct.WithParam, net.sf.saxon.instruct.LocalVariable,
GeneralVariable | abstract public class GeneralVariable extends Instruction implements Binding(Code) | | This class defines common behaviour across xsl:variable, xsl:param, and xsl:with-param;
also saxon:assign
|
nameCode | protected int nameCode(Code) | | |
referenceCount | protected int referenceCount(Code) | | |
GeneralVariable | public GeneralVariable()(Code) | | |
display | public void display(int level, NamePool pool, PrintStream out)(Code) | | Diagnostic print of expression structure. The expression is written to the System.err
output stream
Parameters: level - indentation level for this expression Parameters: out - |
evaluateItem | public Item evaluateItem(XPathContext context) throws XPathException(Code) | | Evaluate an expression as a single item. This always returns either a single Item or
null (denoting the empty sequence). No conversion is done. This method should not be
used unless the static type of the expression is a subtype of "item" or "item?": that is,
it should not be called if the expression may return a sequence. There is no guarantee that
this condition will be detected.
Parameters: context - The context in which the expression is to be evaluated exception: XPathException - if any dynamic error occurs evaluating theexpression the node or atomic value that results from evaluating theexpression; or null to indicate that the result is an emptysequence |
getCardinality | public int getCardinality()(Code) | | Get the cardinality of the result of this instruction. An xsl:variable instruction returns nothing, so the
type is empty.
the empty cardinality. |
getInstructionNameCode | public int getInstructionNameCode()(Code) | | |
getItemType | public ItemType getItemType(TypeHierarchy th)(Code) | | Get the type of the result of this instruction. An xsl:variable instruction returns nothing, so the
type is empty.
the empty type. Parameters: th - |
getLocalSlotNumber | public int getLocalSlotNumber()(Code) | | If this is a local variable held on the local stack frame, return the corresponding slot number.
In other cases, return -1.
|
getNameCode | public int getNameCode()(Code) | | |
getSelectValue | public ValueRepresentation getSelectValue(XPathContext context) throws XPathException(Code) | | Evaluate the variable. That is,
get the value of the select expression if present or the content
of the element otherwise, either as a tree or as a sequence
|
getSlotNumber | public int getSlotNumber()(Code) | | |
getVariableFingerprint | public int getVariableFingerprint()(Code) | | Get the name of the variable (as a NamePool fingerprint)
the NamePool fingerprint of the variable's expanded name. |
isAssignable | final public boolean isAssignable()(Code) | | Test whether it is permitted to assign to the variable using the saxon:assign
extension element. This will only be true if the extra attribute saxon:assignable="yes"
is present.
|
isGlobal | public boolean isGlobal()(Code) | | |
isRequiredParam | final public boolean isRequiredParam()(Code) | | |
isTunnelParam | final public boolean isTunnelParam()(Code) | | |
iterate | public SequenceIterator iterate(XPathContext context) throws XPathException(Code) | | Return an Iterator to iterate over the values of a sequence. The value of every
expression can be regarded as a sequence, so this method is supported for all
expressions. This default implementation relies on the process() method: it
"pushes" the results of the instruction to a sequence in memory, and then
iterates over this in-memory sequence.
In principle instructions should implement a pipelined iterate() method that
avoids the overhead of intermediate storage.
exception: XPathException - if any dynamic error occurs evaluating theexpression Parameters: context - supplies the context for evaluation a SequenceIterator that can be used to iterate over the resultof the expression |
iterateSubExpressions | public Iterator iterateSubExpressions()(Code) | | 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)
|
setAssignable | public void setAssignable(boolean assignable)(Code) | | |
setNameCode | public void setNameCode(int nameCode)(Code) | | |
setReferenceCount | public void setReferenceCount(int refCount)(Code) | | |
setRequiredParam | public void setRequiredParam(boolean requiredParam)(Code) | | |
setSlotNumber | public void setSlotNumber(int s)(Code) | | |
setTunnel | public void setTunnel(boolean tunnel)(Code) | | |
|
|