Class XSLGlobalParam

All Implemented Interfaces:
Source, SourceLocator, ActiveSource, GroundedValue, Item, MutableNodeInfo, NamespaceResolver, NodeInfo, Sequence, Location, StylesheetComponent, SteppingNode, SiblingCountingNode, Locator

public class XSLGlobalParam extends XSLGlobalVariable
An xsl:param element representing a global parameter (stylesheet parameter) in the stylesheet.
The xsl:param element has mandatory attribute name and optional attributes select, required, as, ...
  • Constructor Details

    • XSLGlobalParam

      public XSLGlobalParam()
  • Method Details

    • getPermittedAttributes

      protected EnumSet<SourceBinding.BindingProperty> getPermittedAttributes()
      Overrides:
      getPermittedAttributes in class XSLGlobalVariable
    • getVisibility

      public Visibility getVisibility()
      Default visibility for xsl:param is public
      Overrides:
      getVisibility in class StyleElement
      Returns:
      the declared visibility, or "public" if not declared
    • validate

      public void validate(ComponentDeclaration decl) throws XPathException
      Description copied from class: StyleElement
      Check that the stylesheet element is valid. This is called once for each element, after the entire tree has been built. As well as validation, it can perform first-time initialisation. The default implementation does nothing; it is normally overriden in subclasses.
      Overrides:
      validate in class XSLGlobalVariable
      Parameters:
      decl - the declaration to be validated
      Throws:
      XPathException - if any error is found during validation
    • compileDeclaration

      public void compileDeclaration(Compilation compilation, ComponentDeclaration 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 XSLGlobalVariable
      Parameters:
      compilation - the compilation episode
      decl - the containing top-level declaration, for example xsl:function or xsl:template
      Throws:
      XPathException - if compilation 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.
      Overrides:
      getRequiredType in class XSLGlobalVariable
      Returns:
      the declared or inferred static type of the variable