resourceConfig.setResourceType(DomUtils.getAttributeValue(resourceElement, "type"));
}
// And add the condition, if defined...
if(conditionElement != null) {
ExpressionEvaluator evaluator = digestCondition(conditionElement);
resourceConfig.setConditionEvaluator(evaluator);
} else if(defaultConditionRef != null) {
ExpressionEvaluator evaluator = getConditionEvaluator(defaultConditionRef);
resourceConfig.setConditionEvaluator(evaluator);
}
} catch (IllegalArgumentException e) {
throw new SAXException("Invalid unit definition.", e);
}