我可以在任何地方找到内置数据类型的xsd定义,还是未使用xsd定义?内置数据类型定义
例如,我猜想,XS:布尔数据类型将是这样定义的:
<xs:simpleType name="boolean">
<xs:restriction>
<xs:pattern value="true|false|0|1"/>
</xs:restriction>
</xs:simpleType>
(由于根据规格,http://www.w3.org/TR/xmlschema-2/#boolean,布尔型可以具有值“真”的一个, '假','0'或'1')。
但我不能找到内置数据类型的模式规范。
同样,在http://www.w3.org/TR/xmlschema-2有“数据类型定义的架构”,但对我来说这个scema doesen没有真正定义多少。同样,布尔类型在该模式中被如此定义:
<xs:simpleType name="boolean" id="boolean">
<xs:annotation>
<xs:appinfo>
<hfp:hasFacet name="pattern"/>
<hfp:hasFacet name="whiteSpace"/>
<hfp:hasProperty name="ordered" value="false"/>
<hfp:hasProperty name="bounded" value="false"/>
<hfp:hasProperty name="cardinality" value="finite"/>
<hfp:hasProperty name="numeric" value="false"/>
</xs:appinfo>
<xs:documentation source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
</xs:annotation>
<xs:restriction base="xs:anySimpleType">
<xs:whiteSpace fixed="true" value="collapse" id="boolean.whiteSpace"/>
</xs:restriction>
</xs:simpleType>
但是这只给出了whiteSpace限制。 这同样适用于所有其他数据类型,所以我不明白这个模式如何正确定义数据类型。
那么,如果有一个模式定义了内置数据类型,我可以在哪里找到它? ......还是我在这里误解了一些东西?
希望我的问题是不够清楚:)
在此先感谢您的帮助!