Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.instruct
Class GlobalVariable

    java.lang.Object
      net.sf.saxon.expr.ComputedExpression
          net.sf.saxon.instruct.Instruction
              net.sf.saxon.instruct.GeneralVariable
                  net.sf.saxon.instruct.GlobalVariable

All Implemented Interfaces:
  Binding, Container, Expression, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.SourceLocator

Direct Known Subclasses:
  GlobalParam

public class GlobalVariable
extends GeneralVariable
implements Container

Handler for global variables in a stylesheet or query.

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.instruct.GeneralVariable
`nameCode`

Fields inherited from class net.sf.saxon.expr.ComputedExpression
`locationId, staticProperties`

Fields inherited from interface net.sf.saxon.expr.Expression
`EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD`

Constructor Summary
`GlobalVariable()`

Method Summary
`ValueRepresentation` | `evaluateVariable(XPathContext context)` Evaluate the variable
`Executable` | `getExecutable()` Get the Executable (representing a complete stylesheet or query) of which this Container forms part
`InstructionInfo` | `getInstructionInfo()` Get InstructionInfo for this expression
`ValueRepresentation` | `getSelectValue(XPathContext context)` Evaluate the variable.
`boolean` | `isGlobal()` Indicate whether the binding is local or global.
`TailCall` | `processLeavingTail(XPathContext context)` Process the variable declaration
`void` | `setContainsLocals(SlotManager map)`
`void` | `setExecutable(Executable executable)`

Methods inherited from class net.sf.saxon.instruct.GeneralVariable
`analyze, display, evaluateItem, getCardinality, getInstructionNameCode, getItemType, getNameCode, getRequiredType, getSelectExpression, getSlotNumber, getVariableFingerprint, getVariableName, init, isAssignable, isRequiredParam, isTunnelParam, iterate, iterateSubExpressions, promoteInst, setAssignable, setNameCode, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableName, simplify`

Methods inherited from class net.sf.saxon.instruct.Instruction
`appendItem, assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, createsNewNodes, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, getImplementationMethod, getSourceLocator, isXSLT, process, promote`

Methods inherited from class net.sf.saxon.expr.ComputedExpression
`adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, dynamicError, getColumnNumber, getConstructType, getDependencies, getIntrinsicDependencies, getLineNumber, getLocationId, getParentExpression, getPublicId, getSpecialProperties, getSystemId, markTailFunctionCalls, resetStaticProperties, setLocationId, setParentExpression, typeError, typeError`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.xml.transform.SourceLocator
`getColumnNumber, getLineNumber, getPublicId, getSystemId`

Constructor Detail

### GlobalVariable

    public GlobalVariable()

Method Detail

### getExecutable

    public Executable getExecutable()

  Description copied from interface: `Container`
  Get the Executable (representing a complete stylesheet or query) of which this Container forms part

  Specified by:
    `getExecutable` in interface `Container`
  Overrides:
    `getExecutable` in class `ComputedExpression`

### setExecutable

    public void setExecutable(Executable executable)

### setContainsLocals

    public void setContainsLocals(SlotManager map)

### isGlobal

    public boolean isGlobal()

  Description copied from interface: `Binding`
  Indicate whether the binding is local or global. A global binding is one that has a fixed value for the life of a query or transformation; any other binding is local.

  Specified by:
    `isGlobal` in interface `Binding`
  Overrides:
    `isGlobal` in class `GeneralVariable`

### processLeavingTail

    public TailCall processLeavingTail(XPathContext context)
                                throws XPathException

  Process the variable declaration

  Specified by:
    `processLeavingTail` in class `Instruction`
  Parameters:
    `context` - The dynamic context of the transformation, giving access to the current node, the current variables, etc.
  Returns:
    null if the instruction has completed execution; or a TailCall indicating a function call or template call that is delegated to the caller, to be made after the stack has been unwound so as to save stack space.
  Throws:
    `XPathException`

### getSelectValue

    public ValueRepresentation getSelectValue(XPathContext context)
                                       throws XPathException

  Evaluate the variable. That is, get the value of the select expression if present or the content of the element otherwise, either as a tree or as a sequence

  Overrides:
    `getSelectValue` in class `GeneralVariable`
  Throws:
    `XPathException`

### evaluateVariable

    public ValueRepresentation evaluateVariable(XPathContext context)
                                         throws XPathException

  Evaluate the variable

  Specified by:
    `evaluateVariable` in interface `Binding`
  Throws:
    `XPathException`

### getInstructionInfo

    public InstructionInfo getInstructionInfo()

  Get InstructionInfo for this expression

  Specified by:
    `getInstructionInfo` in interface `InstructionInfoProvider`
  Overrides:
    `getInstructionInfo` in class `Instruction`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD