xml schema 中如何定义类似Map的结构
例如:定义所有Item里的Key为唯一,
<xs:complexType>
<xs:sequence minOccurs ="0" maxOccurs="unbounded ">
<xs:element name ="Item" type="IdentifiersWithSourceItemType">
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name ="KeyUnique">
<xs:selector xpath =".//Key"/>
<xs:field xpath =".//NamespaceID"/>
</xs:unique>
<xs:unique name ="KeyUnique2">
<xs:selector xpath =".//Key"/>
<xs:field xpath =".//UniversalIDType"/>
<xs:field xpath =".//Universal/UniversalID"/>
</xs:unique>
https://muzizongheng.blog.csdn.net/