* @see AtomicValue#castAs(AtomicType, DynamicContext)
*/
public AtomicValue createInstance(String literal, AtomicType srcType, DynamicContext dynEnv)
throws XQueryException {
try {
return new XFloat(literal);
} catch (NumberFormatException e) {
throw new DynamicError("err:FORG0001", e);
}
}