| java.lang.Object net.sf.saxon.expr.RangeVariableDeclaration
RangeVariableDeclaration | public class RangeVariableDeclaration implements VariableDeclaration(Code) | | Represents the defining occurrence of a variable declared for local use
within an expression, for example the $x in "for $x in ...". This object is used
only at compile-time. In XQuery (but not in XSLT) this class is also used to represent
the formal arguments of a function.
|
Field Summary | |
final public static int | FILTERED |
FILTERED | final public static int FILTERED(Code) | | |
fixupReferences | public void fixupReferences(Binding binding)(Code) | | |
getNameCode | public int getNameCode()(Code) | | Get the name of the variable, as a namepool name code
the nameCode |
getReferenceCount | public int getReferenceCount(Binding binding, StaticContext env)(Code) | | Determine how often the range variable is referenced. This is the number of times
it is referenced at run-time: so a reference in a loop counts as "many".
Parameters: binding - the variable binding Parameters: env - the number of references. The only interesting values are 0, 1, and "many" (representedby any value >1). |
getReferenceCount | public static int getReferenceCount(List references, Binding binding, StaticContext env, boolean removeUnbound)(Code) | | Determine how often a variable is referenced. This is the number of times
it is referenced at run-time: so a reference in a loop counts as "many". This code
currently handles local variables (Let expressions) and function parameters. It is
not currently used for XSLT template parameters. It's not the end of the world if
the answer is wrong (unless it's wrongly given as zero), but if wrongly returned as
1 then the variable will be repeatedly evaluated.
Parameters: references - a list of references to a variable binding: each item in this listmust be a VariableReference object Parameters: binding - the variable binding Parameters: removeUnbound - the number of references. The interesting values are 0, 1, "many" (representedby any value >1), and the special value FILTERED, which indicates that there aremultiple references and one or more of them is of the form $x[....] indicating that anindex might be useful. |
getReferenceList | public List getReferenceList()(Code) | | |
getRequiredType | public SequenceType getRequiredType()(Code) | | Get the required type (declared type) of the variable
the required type |
setNameCode | public void setNameCode(int nameCode)(Code) | | Set the name of the variable, as a namepool name code
Parameters: nameCode - |
setReferenceList | public void setReferenceList(List references)(Code) | | |
setRequiredType | public void setRequiredType(SequenceType requiredType)(Code) | | Set the required type (declared type) of the variable
Parameters: requiredType - the required type |
setVariableName | public void setVariableName(String variableName)(Code) | | |
|
|