net.sf.saxon.instruct
Class LocalParam
java.lang.Object
|
+--net.sf.saxon.expr.ComputedExpression
|
+--net.sf.saxon.instruct.Instruction
|
+--net.sf.saxon.instruct.GeneralVariable
|
+--net.sf.saxon.instruct.LocalParam
- All Implemented Interfaces:
- Binding, Container, Expression, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.SourceLocator
- public final class LocalParam
- extends GeneralVariable
The compiled form of an xsl:param element in the stylesheet or an
external variable in 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
Methods inherited from class net.sf.saxon.instruct.GeneralVariable |
analyze, display, evaluateItem, getCardinality, getItemType, getNameCode, getRequiredType, getSelectExpression, getSelectValue, getSlotNumber, getVariableFingerprint, getVariableName, init, isAssignable, isGlobal, isRequiredParam, isTunnelParam, iterate, promoteInst, setAssignable, setNameCode, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableName, simplify |
Methods inherited from class net.sf.saxon.instruct.Instruction |
appendItem, assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, getImplementationMethod, getInstructionInfo, getSourceLocator, process, promote |
Methods inherited from class net.sf.saxon.expr.ComputedExpression |
adoptChildExpression, computeDependencies, computeStaticProperties, dynamicError, dynamicError, getColumnNumber, getConstructType, getDependencies, getExecutable, getIntrinsicDependencies, getLineNumber, getLocationId, getParentExpression, getPublicId, getSpecialProperties, getSystemId, markTailFunctionCalls, resetStaticProperties, setLocationId, setParentExpression, 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 |
LocalParam
public LocalParam()
setConversion
public void setConversion(Expression convertor)
- Define a conversion that is to be applied to the supplied parameter value.
- Parameters:
convertor
-
getInstructionNameCode
public int getInstructionNameCode()
- Get the name of this instruction for diagnostic and tracing purposes
- Overrides:
getInstructionNameCode
in class GeneralVariable
iterateSubExpressions
public 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)
- Specified by:
iterateSubExpressions
in interface Expression
- Overrides:
iterateSubExpressions
in class GeneralVariable
- Returns:
- an iterator containing the sub-expressions of this expression
processLeavingTail
public TailCall processLeavingTail(XPathContext context)
throws XPathException
- Process the local parameter 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.
XPathException
evaluateVariable
public Value evaluateVariable(XPathContext c)
throws XPathException
- Evaluate the variable
XPathException