xml - 这真的不是有效的 xs :decimal?

标签 xml schema xmllint

这是 xmllint 告诉我的内容:

  '1024663.719008264462809917' is not a valid value of the atomic type 'xs:decimal'

是否有一些默认的有效位置数?不应该根据this .

更新:使用 xmllint 进行实验,小数点后 17 位有效,但小数点 18 位无效。

最佳答案

The official spec指出

All ·minimally conforming· processors ·must· support decimal numbers with a minimum of 18 decimal digits (i.e., with a ·totalDigits· of 18). However, ·minimally conforming· processors ·may· set an application-defined limit on the maximum number of decimal digits they are prepared to support, in which case that application-defined maximum number ·must· be clearly documented.

因此,虽然理论上数据类型允许任意精度的十进制数,但特定处理器可以限制其准备支持的值的范围。

关于xml - 这真的不是有效的 xs :decimal?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26301369/

相关文章:

database - 实体/属性替代方案 - 动态创建表

xmllint:删除 <?xml 版本 ="1.0"?>

python - 使用 python 运行控制台命令

xml - 是否可以通过迭代的方式逼近语法?

mysql - Rails Web API 中的单模式 Multi-Tenancy

c# - 安装 Open XML 2.0

mysql - 单行汇总表应该有主键吗?

linux - xpath html 合并列

java - 服务调用没有任何反应

java - 如何让Textview只显示最后4位数字