public override object Invoke(XsltContext xsltContext, object[] args, XPathNavigator docContext) {
DecimalFormat formatInfo = ((XsltCompileContext)xsltContext).ResolveFormatName(args.Length == 3 ? ToString(args[2]) : null);
return DecimalFormatter.Format(ToNumber(args[0]), ToString(args[1]), formatInfo);
}
}