try {
expression =
SynapseXPathFactory.getSynapseXPath(elem, ATT_EXPRN);
} catch (JaxenException e) {
throw new MediatorException("Couldn't build the xpath from the expression : "
+ expressionAttr.getAttributeValue());
}
} else {
throw new MediatorException("Route without an expression attribute has been found, " +
"but it is required to have an expression for all routes");
}
if (matchAttr != null && matchAttr.getAttributeValue() != null) {
match = Pattern.compile(matchAttr.getAttributeValue());