// with the same name.
expressionContext.pushBlockScope();
// Push a new position scope to track the iteration position
expressionContext.pushPositionScope();
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) {
// Increment to the next position in the sequence
pc.increment();
// Get the item.
try {
variable.setValue(sequence.getItem(i));
} catch (SequenceIndexOutOfBoundsException e) {