xsd

2018-10-08

<xsd:annotation>
    <xsd:documentation>
         <![CDATA[
             说明文档
         ]]>
    </xsd:documentation>
</xsd:annotation>

<xsd:complexType    类型定义,类似于class定义,区别于<xsd:element的元素定义(元素定义就是有<xxx></xxx>)

<xsd:sequence></xsd:sequence>    要求组中的元素以指定的顺序出现在包含元素中。

<xsd:choice></xsd:choice>    仅允许包含在 <choice> 声明中的元素之一出现在包含元素中。

<xsd:simpleType>
    <xsd:restriction base="xsd:NMTOKEN">
        <xsd:enumeration value="default"/>
        <xsd:enumeration value="no"/>
        <xsd:enumeration value="byName"/>
        <xsd:enumeration value="byType"/>
        <xsd:enumeration value="constructor"/>
    </xsd:restriction>
</xsd:simpleType>

字符串枚举。

<xsd:complexContent    空的复合元素不能包含内容,只能含有属性。

原文地址:https://www.cnblogs.com/angelshelter/p/9752445.html