Class XSLVariableDeclaration

All Implemented Interfaces:
Source, SourceLocator, LocationProvider, SaxonLocator, Container, VariableDeclaration, FingerprintedNode, Item, NodeInfo, ValueRepresentation, StylesheetProcedure, InstructionInfo, Locator
Direct Known Subclasses:
XSLParam, XSLVariable

public abstract class XSLVariableDeclaration extends XSLGeneralVariable implements VariableDeclaration, StylesheetProcedure
Generic class for xsl:variable and xsl:param elements.
  • Field Details

    • references

      protected List references
  • Constructor Details

    • XSLVariableDeclaration

      public XSLVariableDeclaration()
  • Method Details

    • 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.
      Specified by:
      getSlotManager in interface StylesheetProcedure
      Returns:
      the associated SlotManager object
    • getSlotNumber

      public int getSlotNumber()
    • setSlotNumber

      public void setSlotNumber(int slot)
    • getRequiredType

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

      public void registerReference(BindingReference ref)
      Method called by VariableReference to register the variable reference for subsequent fixup
      Specified by:
      registerReference in interface VariableDeclaration
    • getReferences

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

      public boolean isInstruction()
      Determine whether this node is an instruction.
      Overrides:
      isInstruction in class StyleElement
      Returns:
      true - it is an instruction (well, it can be, anyway)
    • getReferenceList

      public List getReferenceList()
      Get the list of references
    • fixupReferences

      public void fixupReferences() throws XPathException
      Notify all references to this variable of the data type
      Overrides:
      fixupReferences in class StyleElement
      Throws:
      XPathException
    • validate

      public void validate() throws XPathException
      Check that the variable is not already declared, and allocate a slot number
      Overrides:
      validate in class XSLGeneralVariable
      Throws:
      XPathException
    • fixupBinding

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

      protected void setReferenceCount(GeneralVariable var)
      Set the number of references to this variable. This code is invoked only for a global variable, and only if there is at least one reference.
      Overrides:
      setReferenceCount in class XSLGeneralVariable
      Parameters:
      var -