function.setFormula(formula);
this.expression = function;
}
else
{
FormulaExpression expression = new FormulaExpression();
expression.setFormula(formula);
this.expression = expression;
}
}
else
{
className = getDefaultClassName();
if (className == null)
{
throw new ParseException("Required attribute 'class' is missing.",
getRootHandler().getDocumentLocator());
}
}
}
if (expression == null)
{
expression = (Expression) ObjectUtilities.loadAndInstantiate
(className, AbstractExpressionReadHandler.class, Expression.class);
if (expression == null)
{
throw new ParseException("Expression '" + className +
"' is not valid. The specified class is not an expression or function.",
getRootHandler().getDocumentLocator());
}
}
expression.setName(name);
expression.setDeepTraversing("true".equals(attrs.getValue(getUri(), "deep-traversing")));
expression.setPrecompute("true".equals(attrs.getValue(getUri(), "precompute")));
expression.setPreserve("true".equals(attrs.getValue(getUri(), "preserve")));
try
{
expressionBeanUtility = new BeanUtility(expression);
}