|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.expr.instruct.GeneralVariable
net.sf.saxon.expr.instruct.WithParam
public class WithParam
An object derived from a xsl:with-param element in the stylesheet.
| Field Summary | |
|---|---|
static WithParam[] |
EMPTY_ARRAY
|
| Fields inherited from class net.sf.saxon.expr.instruct.GeneralVariable |
|---|
evaluationMode, referenceCount, slotNumber, variableQName |
| Constructor Summary | |
|---|---|
WithParam()
|
|
| Method Summary | |
|---|---|
static WithParam[] |
copy(WithParam[] params)
Static method to copy a set of parameters |
ValueRepresentation |
evaluateVariable(XPathContext context)
Evaluate the variable (method exists only to satisfy the interface) |
static void |
explainParameters(WithParam[] params,
ExpressionPresenter out)
Static method to explain a set of parameters |
static void |
gatherXPathExpressions(WithParam[] params,
List<Expression> list)
Static method to gather the XPath expressions used in an array of WithParam parameters (add them to the supplied list) |
int |
getInstructionNameCode()
Get the name of this instruction (that is xsl:variable, xsl:param etc) for diagnostics |
int |
getParameterId()
Get the parameter id, which is essentially an alias for the parameter name, unique within a stylesheet |
boolean |
isTypeChecked()
Ask whether static type checking has been done |
static void |
optimize(ExpressionVisitor visitor,
WithParam[] params,
ExpressionVisitor.ContextItemType contextItemType)
Static method to optimize a set of with-param elements |
static void |
promoteParams(Expression parent,
WithParam[] params,
PromotionOffer offer)
Static method to do expression promotion on a set of with-param elements |
static boolean |
replaceXPathExpression(WithParam[] params,
Expression original,
Expression replacement)
Static method to replace a subexpression within any parameter within which it is found |
void |
setParameterId(int id)
Allocate a number which is essentially an alias for the parameter name, unique within a stylesheet |
void |
setTypeChecked(boolean checked)
Say whether this parameter will have been typechecked by the caller to ensure it satisfies the required type, in which case the callee need not do a dynamic type check |
static void |
simplify(WithParam[] params,
ExpressionVisitor visitor)
Static method to simplify a set of with-param elements |
static void |
typeCheck(WithParam[] params,
ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Static method to typecheck a set of with-param elements |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static WithParam[] EMPTY_ARRAY
| Constructor Detail |
|---|
public WithParam()
| Method Detail |
|---|
public void setParameterId(int id)
id - the parameter idpublic void setTypeChecked(boolean checked)
checked - true if the caller has done static type checking against the required typepublic int getParameterId()
public int getInstructionNameCode()
GeneralVariable
getInstructionNameCode in class GeneralVariable
public static void simplify(WithParam[] params,
ExpressionVisitor visitor)
throws XPathException
params - the set of parameters to be simplifiedvisitor - the expression visitor
XPathException - if a static error is found
public static void typeCheck(WithParam[] params,
ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
throws XPathException
params - the set of parameters to be checkedvisitor - the expression visitorcontextItemType - static information about the context item type and existence
XPathException - if a static error is found
public static void optimize(ExpressionVisitor visitor,
WithParam[] params,
ExpressionVisitor.ContextItemType contextItemType)
throws XPathException
params - the set of parameters to be optimizedvisitor - the expression visitorcontextItemType - static information about the context item type and existence
XPathException - if a static error is found
public static void promoteParams(Expression parent,
WithParam[] params,
PromotionOffer offer)
throws XPathException
parent - the parent instruction (for example apply-templates or call-template)params - the set of parameters to be be investigated for promotionoffer - the promotion offer to be passed to subexpressions
XPathException - if a static error is foundpublic static WithParam[] copy(WithParam[] params)
params - the parameters to be copied
public static void gatherXPathExpressions(WithParam[] params,
List<Expression> list)
params - the set of with-param elements to be searchedlist - the list to which the subexpressions will be added
public static void explainParameters(WithParam[] params,
ExpressionPresenter out)
params - the set of parameters to be explainedout - the destination for the explanation
public static boolean replaceXPathExpression(WithParam[] params,
Expression original,
Expression replacement)
params - the set of parameters to be examinedoriginal - the subexpression to be replacedreplacement - the replacement expression
public ValueRepresentation evaluateVariable(XPathContext context)
throws XPathException
context - the XPath dynamic evaluation context
XPathException - if an error occurs while evaluating
the variablepublic boolean isTypeChecked()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||