net.sf.saxon.instruct
public final class LocalParam extends GeneralVariable
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".
This is used only for parameters to XSLT templates. For function calls, the caller of the function
places supplied arguments onto the callee's stackframe and the callee does not need to do anything.
Global parameters (XQuery external variables) are handled using GlobalParam
.
evaluationMode, referenceCount, slotNumber, variableQName
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties
Constructor and Description |
---|
LocalParam() |
Modifier and Type | Method and Description |
---|---|
ValueRepresentation |
evaluateVariable(XPathContext c)
Evaluate the variable
|
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure.
|
int |
getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes
|
int |
getParameterId()
Get the parameter id, which is essentially an alias for the parameter name,
unique within a stylesheet
|
java.util.Iterator |
iterateSubExpressions()
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction)
|
TailCall |
processLeavingTail(XPathContext context)
Process the local parameter declaration
|
boolean |
replaceSubExpression(Expression original,
Expression replacement)
Replace one subexpression by a replacement subexpression
|
void |
setConversion(Expression convertor)
Define a conversion that is to be applied to the supplied parameter value.
|
void |
setParameterId(int id)
Allocate a number which is essentially an alias for the parameter name,
unique within a stylesheet
|
copy, evaluateItem, getCardinality, getEvaluationMode, getItemType, getLocalSlotNumber, getRequiredType, getSelectExpression, getSelectValue, getSlotNumber, getVariableQName, init, isAssignable, isGlobal, isImplicitlyRequiredParam, isRequiredParam, isTunnelParam, iterate, optimize, promoteInst, setAssignable, setImplicitlyRequiredParam, setReferenceCount, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableQName, simplify, typeCheck
assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, createsNewNodes, dynamicError, evaluateAsString, getConstructType, getImplementationMethod, getSourceLocator, isXSLT, process, promote
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, findParentOf, getColumnNumber, getColumnNumber, getContainer, getDependencies, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, toString, typeError
public void setParameterId(int id)
id
- the parameter idpublic int getParameterId()
public void setConversion(Expression convertor)
convertor
- The expression to be applied. This performs type checking,
and the basic conversions implied by function calling rules, for example
numeric promotion, atomization, and conversion of untyped atomic values to
a required type. The conversion uses the actual parameter value as input,
referencing it using a VariableReference.public int getInstructionNameCode()
getInstructionNameCode
in class GeneralVariable
public java.util.Iterator iterateSubExpressions()
iterateSubExpressions
in class GeneralVariable
public boolean replaceSubExpression(Expression original, Expression replacement)
replaceSubExpression
in class GeneralVariable
original
- the original subexpressionreplacement
- the replacement subexpressionpublic TailCall processLeavingTail(XPathContext context) throws XPathException
processLeavingTail
in interface TailCallReturner
processLeavingTail
in class Instruction
context
- The dynamic context of the transformation, giving access to the current node,
the current variables, etc.XPathException
public ValueRepresentation evaluateVariable(XPathContext c)
c
- the XPath dynamic evaluation contextpublic void explain(ExpressionPresenter out)
explain
in class GeneralVariable
out
- the expression presenter used to display the structure