The variable is not initialised and any attempt to get its value before it is explicitly set will result in an exception being thrown.
96979899100101102103104105106
PositionScope pc = expressionContext.getPositionScope(); // Declare an unitialized variable. InternalExpressionScope scope = (InternalExpressionScope) expressionContext.getCurrentScope(); Variable variable = scope.declareVariable(variableName); // Iterate over the sequence. int length = sequence.getLength(); for (int i = 1; i <= length; i += 1) {