try {
// try to get an instance of the given function
return factory.createFunction(functionName);
} catch (UnknownIdentifierException uie) {
throw new ParsingException("Unknown FunctionId", uie);
} catch (FunctionTypeException fte) {
// try creating as an abstract function
try {
FunctionFactory ff = FunctionFactory.getGeneralInstance();
return ff.createAbstractFunction(functionName, root, metaData.getXPathIdentifier());
} catch (Exception e) {
// any exception at this point is a failure
throw new ParsingException("failed to create abstract function" + " "
+ functionName, e);
}
}
}