net.sf.saxon.style

Class XSLVariableDeclaration

public abstract class XSLVariableDeclaration extends XSLGeneralVariable implements VariableDeclaration, StylesheetProcedure

Generic class for xsl:variable and xsl:param elements.
Field Summary
protected Listreferences
Method Summary
protected voidfixupBinding(Binding binding)
Notify all variable references of the Binding instruction
voidfixupReferences()
Notify all references to this variable of the data type
ListgetReferenceList()
Get the list of references
ListgetReferences()
Get the list of references to this variable or parameter.
abstract SequenceTypegetRequiredType()
Get the static type of the variable.
SlotManagergetSlotManager()
Get the SlotManager associated with this stylesheet construct.
intgetSlotNumber()
booleanisInstruction()
Determine whether this node is an instruction.
voidregisterReference(BindingReference ref)
Method called by VariableReference to register the variable reference for subsequent fixup
protected voidsetReferenceCount(GeneralVariable var)
voidsetSlotNumber(int slot)
voidvalidate()
Check that the variable is not already declared, and allocate a slot number

Field Detail

references

protected List references

Method Detail

fixupBinding

protected void fixupBinding(Binding binding)
Notify all variable references of the Binding instruction

fixupReferences

public void fixupReferences()
Notify all references to this variable of the data type

getReferenceList

public List getReferenceList()
Get the list of references

getReferences

public List getReferences()
Get the list of references to this variable or parameter. The items in the list are of class BindingReference.

getRequiredType

public abstract SequenceType getRequiredType()
Get the static type of the variable.

getSlotManager

public SlotManager getSlotManager()
Get the SlotManager associated with this stylesheet construct. The SlotManager contains the information needed to manage the local stack frames used by run-time instances of the code.

Returns: the associated SlotManager object

getSlotNumber

public int getSlotNumber()

isInstruction

public boolean isInstruction()
Determine whether this node is an instruction.

Returns: true - it is an instruction (well, it can be, anyway)

registerReference

public void registerReference(BindingReference ref)
Method called by VariableReference to register the variable reference for subsequent fixup

setReferenceCount

protected void setReferenceCount(GeneralVariable var)

setSlotNumber

public void setSlotNumber(int slot)

validate

public void validate()
Check that the variable is not already declared, and allocate a slot number