*/
private int processAttributes(final StringBuffer html, final ExpressionQueryRequest expressionQueryRequest,
final HashMap<String, EvaluableExpression> attributesDefintion, final AttributeCallback attributeCallback) {
int changes = 0;
for (String attributeName : attributesDefintion.keySet()) {
EvaluableExpression expression = attributesDefintion.get(attributeName);
try {
String result = (String) expression.evaluate(
expressionQueryRequest,
ExpressionEvaluator.OBJECTTYPE_STRING);
if (result != null && !result.equals("")) {
attributeCallback.invokeCallback(html, attributeName.toLowerCase(), result);
changes++;
}
} catch (ExpressionParserException e) {
logger.error("Cannot evaluate expression (" + expression.getExpressionString() + ")as String.", e);
}
}
return changes;
}