public class WithParam extends GeneralVariable
Modifier and Type | Field and Description |
---|---|
static WithParam[] |
EMPTY_ARRAY |
evaluationMode, referenceCount, slotNumber, variableQName
Constructor and Description |
---|
WithParam() |
Modifier and Type | Method and Description |
---|---|
static WithParam[] |
copy(WithParam[] params)
Static method to copy a set of parameters
|
Sequence |
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
|
addReference, checkAgainstRequiredType, computeEvaluationMode, copy, explain, getCardinality, getColumnNumber, getContainer, getEvaluationMode, getExecutable, getIntegerBoundsForVariable, getLineNumber, getLocalSlotNumber, getLocationId, getLocationProvider, getPublicId, getRequiredType, getSelectExpression, getSelectValue, getSlotNumber, getSystemId, getSystemId, getVariableQName, init, isAssignable, isGlobal, isImplicitlyRequiredParam, isRequiredParam, isTunnelParam, iterateSubExpressions, optimize, replaceSubExpression, setContainer, setImplicitlyRequiredParam, setLocationId, setReferenceCount, setRequiredParam, setRequiredType, setSelectExpression, setSlotNumber, setTunnel, setVariableQName, simplify, typeCheck
public static WithParam[] EMPTY_ARRAY
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 visitorXPathException
- if a static error is foundpublic 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 existenceXPathException
- if a static error is foundpublic 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 existenceXPathException
- if a static error is foundpublic 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 subexpressionsXPathException
- if a static error is foundpublic static WithParam[] copy(WithParam[] params)
params
- the parameters to be copiedpublic 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 addedpublic static void explainParameters(WithParam[] params, ExpressionPresenter out)
params
- the set of parameters to be explainedout
- the destination for the explanationpublic static boolean replaceXPathExpression(WithParam[] params, Expression original, Expression replacement)
params
- the set of parameters to be examinedoriginal
- the subexpression to be replacedreplacement
- the replacement expressionpublic Sequence evaluateVariable(XPathContext context) throws XPathException
context
- the XPath dynamic evaluation contextXPathException
- if an error occurs while evaluating
the variablepublic boolean isTypeChecked()
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.