|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.instruct.GeneralVariable net.sf.saxon.expr.instruct.LocalParam
public final class LocalParam
The compiled form of an xsl:param element within a template in an XSLT stylesheet.
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
.
The LocalParam class is also used to represent parameters with the saxon:iterate instruction
Field Summary |
---|
Fields inherited from class net.sf.saxon.expr.instruct.GeneralVariable |
---|
evaluationMode, referenceCount, slotNumber, variableQName |
Constructor Summary | |
---|---|
LocalParam()
|
Method Summary | |
---|---|
ValueRepresentation |
evaluateVariable(XPathContext c)
Evaluate the variable |
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
Expression |
getConversion()
Get the conversion expression |
int |
getConversionEvaluationMode()
|
int |
getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes |
IntegerValue[] |
getIntegerBoundsForVariable()
If the variable is bound to an integer, get the minimum and maximum possible values. |
int |
getParameterId()
Get the parameter id, which is essentially an alias for the parameter name, unique within a stylesheet |
Iterator<Expression> |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalParam()
Method Detail |
---|
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. The argument can be null to indicate
that no conversion is required.public Expression getConversion()
public int getConversionEvaluationMode()
public int getInstructionNameCode()
getInstructionNameCode
in class GeneralVariable
public Iterator<Expression> iterateSubExpressions()
iterateSubExpressions
in class GeneralVariable
public boolean replaceSubExpression(Expression original, Expression replacement)
replaceSubExpression
in class GeneralVariable
original
- the original subexpressionreplacement
- the replacement subexpression
public TailCall processLeavingTail(XPathContext context) throws XPathException
context
- the dynamic context
XPathException
- if a dynamic error occurs in the evaluationpublic IntegerValue[] getIntegerBoundsForVariable()
getIntegerBoundsForVariable
in interface Binding
getIntegerBoundsForVariable
in class GeneralVariable
public ValueRepresentation evaluateVariable(XPathContext c)
c
- the XPath dynamic evaluation context
public void explain(ExpressionPresenter out)
explain
in class GeneralVariable
out
- the object used to present the output
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |