zoukankan      html  css  js  c++  java
  • xml schema 中如何定义类似Map的结构

    利用xs:unique关键字。在xs:element里添加unique节点,任意命名,然后用xs:selector来选择需要唯一的域, xs:field 里指定特定的字段。


    例如:定义所有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>
  • 相关阅读:
    [UE4]九宫格图片拉伸
    [UE4]IsValid方法妙用
    [UE4]蓝图函数库
    [UE4]创建KillInfoPanel
    [UE4]条件语句Select
    [UE4]控件模板参数
    [UE4]控件模板
    [UE4]不推荐的UI更新方式
    [UE4]事件驱动的UI更新:事件调度器
    [UE4]更新UI的三种方式
  • 原文地址:https://www.cnblogs.com/muzizongheng/p/3170920.html
Copyright © 2011-2022 走看看