Class XSLVariableDeclaration

    • Field Detail

      • references

        protected java.util.List references
    • Constructor Detail

      • XSLVariableDeclaration

        public XSLVariableDeclaration()
    • Method Detail

      • isDeclaration

        public boolean isDeclaration()
        Ask whether this node is a declaration, that is, a permitted child of xsl:stylesheet (including xsl:include and xsl:import).
        Overrides:
        isDeclaration in class StyleElement
        Returns:
        true for this element
      • 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()
        Get the slot number allocated to this variable (its position in the stackframe)
        Returns:
        the allocated slot number
      • setSlotNumber

        public void setSlotNumber​(int slot)
        Allocate a slot number to this variable
        Parameters:
        slot - the position of the variable on the local stack frame
      • getRequiredType

        public abstract SequenceType getRequiredType()
        Get the static type of the variable.
        Returns:
        the static type declared for 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
        Parameters:
        ref - the variable reference
      • 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)
      • fixupBinding

        protected void fixupBinding​(Binding binding)
        Notify all variable references of the Binding instruction
        Parameters:
        binding - the Binding that represents this variable declaration in the executable code tree
      • 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 - the variable
      • index

        protected void index​(Declaration decl,
                             PrincipalStylesheetModule top)
                      throws XPathException
        Description copied from class: StyleElement
        Method supplied by declaration elements to add themselves to a stylesheet-level index
        Overrides:
        index in class StyleElement
        Parameters:
        decl - the Declaration being indexed. (This corresponds to the StyleElement object except in cases where one module is imported several times with different precedence.)
        top - the outermost XSLStylesheet element
        Throws:
        XPathException - if any error is encountered
      • getCompiledVariable

        public GeneralVariable getCompiledVariable()
        Get the compiled variable
        Returns:
        the compiled variable if it has been compiled, or null otherwise