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, InstructionInfo, Locator
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.
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:
-
Field Summary
Fields inherited from class GeneralVariable
evaluationMode, referenceCount, requiredType, select, slotNumber, variableQName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluateVariable(XPathContext context) Evaluate the variableintGet the name of this instruction for diagnostic and tracing purposesMethods inherited from class GlobalVariable
actuallyEvaluate, getColumnNumber, getConstructType, getContainer, getContainerGranularity, getExecutable, getHostLanguage, getLineNumber, getObjectName, getProperties, getProperty, getSelectValue, isGlobal, isIndexedVariable, lookForCycles, setContainsLocals, setDependencies, setExecutable, setIndexedVariableMethods inherited from class GeneralVariable
addReference, checkAgainstRequiredType, computeEvaluationMode, copy, explain, getCardinality, getColumnNumber, getEvaluationMode, getIntegerBoundsForVariable, getLineNumber, getLocalSlotNumber, getLocationId, getLocationProvider, getPublicId, getRequiredType, getSelectExpression, getSlotNumber, getSystemId, getSystemId, getVariableQName, init, isAssignable, isImplicitlyRequiredParam, isRequiredParam, isTunnelParam, iterateSubExpressions, optimize, replaceSubExpression, setAssignable, setContainer, setImplicitlyRequiredParam, setLocationId, setReferenceCount, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableQName, simplify, typeCheckMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Container
getLocationProviderMethods inherited from interface InstructionInfo
getLineNumber, getSystemIdMethods inherited from interface LocationProvider
getSystemIdMethods inherited from interface Locator
getColumnNumber, getPublicIdMethods inherited from interface SourceLocator
getColumnNumber, getLineNumber, getPublicId, getSystemId
-
Constructor Details
-
GlobalParam
public GlobalParam()
-
-
Method Details
-
getInstructionNameCode
public int getInstructionNameCode()Get the name of this instruction for diagnostic and tracing purposes- Overrides:
getInstructionNameCodein classGeneralVariable- Returns:
- the name of this instruction, as a name pool name code
-
evaluateVariable
Evaluate the variable- Specified by:
evaluateVariablein interfaceBinding- Overrides:
evaluateVariablein classGlobalVariable- Parameters:
context- the XPath dynamic evaluation context- Returns:
- the result of evaluating the variable
- Throws:
XPathException- if an error occurs while evaluating the variable
-