}
}
try {
sum = (ComputableValue) sum.promote(value);
//Aggregate next values
sum = sum.plus((ComputableValue) value);
} catch(final XPathException e) {
throw new XPathException(this, ErrorCodes.FORG0006, e.getMessage());
}
}
result = sum.div(new IntegerValue(inner.getItemCount()));