加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

XML Schema XSD TotalDigits与MaxInclusive

发布时间:2020-12-16 23:48:24 所属栏目:百科 来源:网络整理
导读:我使用以下定义运行 XML Schema: xs:simpleType name="ClassRankType" xs:restriction base="xs:integer" xs:totalDigits value="4"/ xs:minInclusive value="1"/ xs:maxInclusive value="9999"/ /xs:restriction/xs:simpleType 但是,在我看来,totalDigits
我使用以下定义运行 XML Schema:
<xs:simpleType name="ClassRankType">
    <xs:restriction base="xs:integer">
        <xs:totalDigits value="4"/>
        <xs:minInclusive value="1"/>
        <xs:maxInclusive value="9999"/>
    </xs:restriction>
</xs:simpleType>

但是,在我看来,totalDigits是多余的.我对XML Schema有些新意,并希望确保我没有错过任何东西.

totalDigits与maxInclusive的实际行为是什么?

totalDigits总是可以用minInclusive和MaxInclusive的组合来表示吗?

totalDigits如何影响负数?

can totalDigits always be represented with a combination of minInclusive and MaxInclusive?

在这种情况下,是的.当您处理整数时,该值必须是整数,因此您在minInclusive和maxInclusive之间有一组有限的值.如果您有十进制值,则totalDigits会告诉您该值可能有多少个数字.

How does totalDigits affect negative numbers?

它是数字中允许的总位数,不受小数点,减号等的影响.从auxy.com开始:

The number specified by the value attribute of the <xsd:totalDigits> facet will restrict the total number of digits that are allowed in the number,on both sides of the decimal point.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读