【问题标题】:Orbeon XForms round-when-formatting="true"Orbeon XForms round-when-formatting="true"
【发布时间】:2017-11-02 10:38:07
【问题描述】:

我想问一下,Orbeon XForms 中是否有round-when-formatting="true" 参数与digits-after-decimal="0" 参数结合使用传统舍入的选项。 (23.6->24)(22.8->23)(23.2->23)

documentation section 中,我看到它使用了四舍五入的方法。

round-when-formatting="true" 非常适合仅在视图部分使用舍入,因为我只希望在视图中进行舍入,绑定中的计算值必须是未舍入的。

【问题讨论】:

    标签: orbeon xforms rounding


    【解决方案1】:

    目前没有这样的选择。我同意使用round-to-even() 可能不是正确的选择。可能是因为 XPath 2 中的这个函数允许指定精度,而 round() 函数不允许指定精度。但是,这已通过 XPath 3 修复。无论哪种方式,我都输入了 issue #3226

    【讨论】:

    • 不,请参阅 #3226 中的讨论。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-22
    相关资源
    最近更新 更多