欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

XML Schema complexContent 元素

定義和用法

complexContent 元素定義對復雜類型(包含混合內(nèi)容或僅包含元素)的擴展或限制。

元素信息

出現(xiàn)次數(shù) 一次
父元素 complexType
內(nèi)容

可選項。annotation

必選項。 有并且只有一個下列元素: restriction (complexContent) 或 extension (complexContent)。

語法

<complexContent
id=ID
mixed=true|false
any attributes
>

(annotation?,(restriction|extension))

</complexContent>

(? 符號聲明元素可在 complexContent 元素內(nèi)出現(xiàn)零次或一次。)

屬性 描述
id 可選。規(guī)定該元素的唯一的 ID。
mixed 可選。規(guī)定是否允許字符數(shù)據(jù)出現(xiàn)在該 complexType 元素的子元素之間。 默認值為 false。
any attributes 可選。規(guī)定帶有 non-schema 命名空間的任何其他屬性。

實例

下面的例子中有一個復雜類型 "fullpersoninfo",這個復雜類型是通過用三個補充的元素擴展繼承的類型,從另一個復雜類型 "personinfo" 衍生而來的:

<xs:element name="employee" type="fullpersoninfo"/>

<xs:complexType name="personinfo">
  <xs:sequence>
    <xs:element name="firstname" type="xs:string"/>
    <xs:element name="lastname" type="xs:string"/>
  </xs:sequence>
</xs:complexType>

<xs:complexType name="fullpersoninfo">
  <xs:complexContent>
    <xs:extension base="personinfo">
      <xs:sequence>
        <xs:element name="address" type="xs:string"/>
        <xs:element name="city" type="xs:string"/>
        <xs:element name="country" type="xs:string"/>
      </xs:sequence>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>

在上例中,"employee" 元素必須按順序包含下面的元素:"firstname"、"lastname"、"address"、"city" 以及 "country"。