net.sf.saxon.instruct
Class DefiningVariable

java.lang.Object
  extended bynet.sf.saxon.instruct.Instruction
      extended bynet.sf.saxon.instruct.GeneralVariable
          extended bynet.sf.saxon.instruct.DefiningVariable
All Implemented Interfaces:
Binding, java.io.Serializable, javax.xml.transform.SourceLocator
Direct Known Subclasses:
Param, Variable

public abstract class DefiningVariable
extends GeneralVariable
implements Binding

This class defines common behaviour across the compiled instructions for xsl:variable and xsl:param. In particular, this class contains the method used to evaluate the variable.

See Also:
Serialized Form

Field Summary
protected  boolean anyTypeAllowed
           
 
Fields inherited from class net.sf.saxon.instruct.GeneralVariable
variableFingerprint
 
Fields inherited from class net.sf.saxon.instruct.Instruction
children
 
Constructor Summary
DefiningVariable()
           
 
Method Summary
 Value evaluateVariable(XPathContext c)
          Evaluate the variable
 SequenceType getRequiredType()
          Get the static type of the variable binding
 int getSlotNumber()
           
 java.lang.String getVariableName()
          Get the display name of the variable (for diagnostics only)
 void setRequiredType(SequenceType t)
           
 void setSlotNumber(int s)
           
 void setVariableName(java.lang.String s)
           
 
Methods inherited from class net.sf.saxon.instruct.GeneralVariable
containsLocals, getResultType, getSelectExpression, getSelectValue, getVariableFingerprint, init, isAssignable, isGlobal, isRequiredParam, isTunnelParam, setAssignable, setContainsLocals, setGlobal, setInstructionDetails, setRequiredParam, setSelect, setTunnel, setVariableFingerprint
 
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
 

Field Detail

anyTypeAllowed

protected boolean anyTypeAllowed
Constructor Detail

DefiningVariable

public DefiningVariable()
Method Detail

getSlotNumber

public int getSlotNumber()

setSlotNumber

public void setSlotNumber(int s)

getRequiredType

public SequenceType getRequiredType()
Description copied from interface: Binding
Get the static type of the variable binding

Specified by:
getRequiredType in interface Binding
Overrides:
getRequiredType in class GeneralVariable

setRequiredType

public void setRequiredType(SequenceType t)
Overrides:
setRequiredType in class GeneralVariable

setVariableName

public void setVariableName(java.lang.String s)

getVariableName

public java.lang.String getVariableName()
Description copied from interface: Binding
Get the display name of the variable (for diagnostics only)

Specified by:
getVariableName in interface Binding

evaluateVariable

public Value evaluateVariable(XPathContext c)
                       throws XPathException
Evaluate the variable

Specified by:
evaluateVariable in interface Binding
Throws:
XPathException