如何基于 xs:ID 在您的 XSD 文件中创建派生的 simpleType。该限制应使用一个模式,其值以“_”开头,后跟两个字符,它们是 1 - 8 范围内的数字。
来自xml的元素
<piece identifier="p" postion="_44"></piece>
XSD
<xs:attribute name="postion">
<xs:simpleType>
<xs:restriction base="xs:ID">
<xs:pattern value="??">
</xs:restriction>
</xs:simpleType>