net.sf.saxon.instruct
Class GlobalParam

java.lang.Object
  extended by net.sf.saxon.expr.Expression
      extended by net.sf.saxon.instruct.Instruction
          extended by net.sf.saxon.instruct.GeneralVariable
              extended by net.sf.saxon.instruct.GlobalVariable
                  extended by net.sf.saxon.instruct.GlobalParam
All Implemented Interfaces:
Serializable, SourceLocator, Binding, Container, EvaluableItem, SequenceIterable, TailCallReturner, InstructionInfoProvider

public final class GlobalParam
extends GlobalVariable

The compiled form of a global xsl:param element in the 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 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.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
 
Constructor Summary
GlobalParam()
           
 
Method Summary
 ValueRepresentation 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.instruct.GlobalVariable
getExecutable, getHostLanguage, getInstructionInfo, getSelectValue, isGlobal, lookForCycles, processLeavingTail, setContainsLocals, setExecutable, setHostLanguage
 
Methods inherited from class net.sf.saxon.instruct.GeneralVariable
copy, evaluateItem, explain, getCardinality, getEvaluationMode, getItemType, getLocalSlotNumber, getRequiredType, getSelectExpression, getSlotNumber, getVariableQName, init, isAssignable, isImplicitlyRequiredParam, isRequiredParam, isTunnelParam, iterate, iterateSubExpressions, optimize, replaceSubExpression, setAssignable, setImplicitlyRequiredParam, setReferenceCount, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableQName, simplify, typeCheck
 
Methods inherited from class net.sf.saxon.instruct.Instruction
computeCardinality, computeSpecialProperties, createsNewNodes, evaluateAsString, getImplementationMethod, getSourceLocator, isXSLT, process, promote
 
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, effectiveBooleanValue, explain, findParentOf, getColumnNumber, getContainer, getDependencies, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, iterateEvents, markTailFunctionCalls, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.saxon.expr.Container
getLocationProvider, replaceSubExpression
 
Methods inherited from interface javax.xml.transform.SourceLocator
getColumnNumber, getLineNumber, getPublicId, 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 ValueRepresentation 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


Copyright (C) Michael H. Kay. All rights reserved.