Class XSLParam

All Implemented Interfaces:
Serializable, Source, SourceLocator, LocationProvider, SaxonLocator, PullEvent, Container, VariableDeclaration, FingerprintedNode, Item<NodeInfo>, MutableNodeInfo, NamespaceResolver, NodeInfo, ValueRepresentation<NodeInfo>, StylesheetProcedure, InstructionInfo, SiblingCountingNode, Locator

public class XSLParam extends XSLVariableDeclaration
An xsl:param element in the stylesheet.
The xsl:param element has mandatory attribute name and optional attributes select, required, as, ...
See Also:
  • Field Details

  • Constructor Details

    • XSLParam

      public XSLParam()
  • Method Details

    • allowsValue

      protected boolean allowsValue()
      Overrides:
      allowsValue in class XSLGeneralVariable
    • allowsRequired

      protected boolean allowsRequired()
      Overrides:
      allowsRequired in class XSLGeneralVariable
    • allowsTunnelAttribute

      protected boolean allowsTunnelAttribute()
      Overrides:
      allowsTunnelAttribute in class XSLGeneralVariable
    • validate

      public void validate(Declaration decl) throws XPathException
      Description copied from class: XSLVariableDeclaration
      Check that the variable is not already declared, and allocate a slot number
      Overrides:
      validate in class XSLVariableDeclaration
      Parameters:
      decl -
      Throws:
      XPathException - if any error is found during validation
    • compileDeclaration

      public void compileDeclaration(Executable exec, Declaration decl) throws XPathException
      Compile a global xsl:param element: this ensures space is available for local variables declared within this global variable
      Overrides:
      compileDeclaration in class StyleElement
      Parameters:
      exec - the Executable
      decl - the containing top-level declaration, for example xsl:function or xsl:template
      Throws:
      XPathException - if compilation fails
    • compile

      public Expression compile(Executable exec, Declaration decl) throws XPathException
      Description copied from class: StyleElement
      Compile the instruction on the stylesheet tree into an executable instruction for use at run-time.
      Overrides:
      compile in class StyleElement
      Parameters:
      exec - the Executable
      decl - the containing top-level declaration, for example xsl:function or xsl:template
      Returns:
      either a ComputedExpression, or null. The value null is returned when compiling an instruction that returns a no-op, or when compiling a top-level object such as an xsl:template that compiles into something other than an instruction.
      Throws:
      XPathException - if validation fails
    • getRequiredType

      public SequenceType getRequiredType()
      Get the static type of the parameter. This is the declared type, because we cannot know the actual value in advance.
      Specified by:
      getRequiredType in class XSLVariableDeclaration
      Returns:
      the static type declared for the variable