net.sf.saxon.expr.instruct

## Class GlobalParam

- java.lang.Object
- - net.sf.saxon.expr.instruct.GeneralVariable
  - - net.sf.saxon.expr.instruct.GlobalVariable
    - - net.sf.saxon.expr.instruct.GlobalParam

- All Implemented Interfaces:
    Serializable, SourceLocator, LocationProvider, SaxonLocator, Binding, Container, Declaration, InstructionInfo, Locator

      public final class GlobalParam
      extends GlobalVariable

  The compiled form of a global xsl:param element in an XSLT stylesheet or an external variable declared in the prolog of a Query.
  The xsl:param element in XSLT has mandatory attribute name and optional attribute select. It can also be specified as required="yes" or required="no". In standard XQuery 1.0 external variables are always required, and no default value can be specified; but Saxon provides an extension pragma that allows a query to specify a default. XQuery 1.1 adds standard syntax for defining a default value.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.instruct.GlobalVariable

      `references`

    - ### Fields inherited from class net.sf.saxon.expr.instruct.GeneralVariable

      `evaluationMode, referenceCount, slotNumber, variableQName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GlobalParam()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Sequence` | `evaluateVariable(XPathContext context)` Evaluate the variable
    `int` | `getInstructionNameCode()` Get the name of this instruction for diagnostic and tracing purposes

    - ### Methods inherited from class net.sf.saxon.expr.instruct.GlobalVariable

      `actuallyEvaluate, compile, getColumnNumber, getConstructType, getContainer, getContainerGranularity, getExecutable, getHostLanguage, getLineNumber, getLineNumber, getObjectName, getOriginalVariable, getProperties, getProperty, getSelectValue, getSystemId, getUltimateOriginalVariable, isAssignable, isGlobal, isIndexedVariable, isPrivate, iterateReferences, lookForCycles, registerReference, setAssignable, setContainsLocals, setDependencies, setExecutable, setIndexedVariable, setLineNumber, setOriginalVariable, setPrivate, setSystemId, typeCheck`

    - ### Methods inherited from class net.sf.saxon.expr.instruct.GeneralVariable

      `addReference, checkAgainstRequiredType, computeEvaluationMode, copy, explain, getCardinality, getColumnNumber, getEvaluationMode, getIntegerBoundsForVariable, getLocalSlotNumber, getLocationId, getLocationProvider, getPublicId, getRequiredType, getSelectExpression, getSlotNumber, getSystemId, getVariableQName, init, isImplicitlyRequiredParam, isRequiredParam, isTunnelParam, iterateSubExpressions, optimize, replaceSubExpression, setContainer, setImplicitlyRequiredParam, setLocationId, setReferenceCount, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableQName, simplify, typeCheck`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.expr.Container

      `getLocationProvider`

    - ### Methods inherited from interface org.xml.sax.Locator

      `getColumnNumber, getPublicId`

    - ### Methods inherited from interface javax.xml.transform.SourceLocator

      `getColumnNumber, getPublicId`

    - ### Methods inherited from interface net.sf.saxon.event.LocationProvider

      `getSystemId`

- - ### Constructor Detail

    - #### GlobalParam

          public GlobalParam()

  - ### Method Detail

    - #### getInstructionNameCode

          public int getInstructionNameCode()

      Get the name of this instruction for diagnostic and tracing purposes
      Overrides:
        `getInstructionNameCode` in class `GeneralVariable`
      Returns:
        the name of this instruction, as a name pool name code

    - #### evaluateVariable

          public Sequence evaluateVariable(XPathContext context)
                                    throws XPathException

      Evaluate the variable
      Specified by:
        `evaluateVariable` in interface `Binding`
      Overrides:
        `evaluateVariable` in class `GlobalVariable`
      Parameters:
        `context` - the XPath dynamic evaluation context
      Returns:
        the result of evaluating the variable
      Throws:
        `XPathException` - if an error occurs while evaluating the variable

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.