net.sf.saxon.instruct
Class GeneralVariable
java.lang.Object
|
+--net.sf.saxon.instruct.Instruction
|
+--net.sf.saxon.instruct.GeneralVariable
- All Implemented Interfaces:
- java.io.Serializable, javax.xml.transform.SourceLocator
- Direct Known Subclasses:
- Assign, DefiningVariable, SQLColumn.ColumnInstruction, WithParam
- public abstract class GeneralVariable
- extends Instruction
This class defines common behaviour across xsl:variable, xsl:param, and xsl:with-param;
also saxon:assign
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.instruct.Instruction |
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getSystemId, getSystemId, process, processChildren, processChildrenLeavingTail, processLeavingTail, recoverableError, setChildren, setSourceLocation, styleError, styleError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
variableFingerprint
protected int variableFingerprint
GeneralVariable
public GeneralVariable()
init
public void init(Expression select,
SequenceType requiredType,
int variableFingerprint)
setSelect
public void setSelect(Expression select)
getSelectExpression
public Expression getSelectExpression()
setRequiredType
public void setRequiredType(SequenceType requiredType)
setVariableFingerprint
public void setVariableFingerprint(int variableFingerprint)
setGlobal
public void setGlobal(boolean global)
setAssignable
public void setAssignable(boolean assignable)
setRequiredParam
public void setRequiredParam(boolean requiredParam)
setContainsLocals
public void setContainsLocals(boolean containsLocals)
setTunnel
public void setTunnel(boolean tunnel)
isAssignable
public final boolean isAssignable()
- 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.
getVariableFingerprint
public int getVariableFingerprint()
getRequiredType
public SequenceType getRequiredType()
getResultType
public SequenceType getResultType()
- Get the result type of the instruction. This is not the type of the variable,
but the type of the value added to the result sequence when the instruction
is executed: This result is always an empty sequence.
- Overrides:
getResultType
in class Instruction
- Returns:
- A SequenceType denoting the type EMPTY
isGlobal
public final boolean isGlobal()
containsLocals
public final boolean containsLocals()
isRequiredParam
public final boolean isRequiredParam()
isTunnelParam
public final boolean isTunnelParam()
setInstructionDetails
public void setInstructionDetails(Controller controller,
NamePool namePool,
InstructionDetails details)
- Description copied from class:
Instruction
- Get the name of the instruction for use in diagnostics
- Specified by:
setInstructionDetails
in class Instruction
getSelectValue
public Value getSelectValue(XPathContext context)
throws javax.xml.transform.TransformerException
- 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
javax.xml.transform.TransformerException