亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

XML Schema simpleType 元素

定義和用法

simpleType 元素定義一個(gè)簡單類型,規(guī)定與具有純文本內(nèi)容的元素或?qū)傩缘闹涤嘘P(guān)的信息以及對它們的約束。

元素信息

出現(xiàn)次數(shù) 無限制
父元素 attribute、element、list、restriction (simpleType)、schema、union
內(nèi)容 annotation、list、restriction (simpleType)、union

語法

<simpleType
id=ID
name=NCName
any attributes
>

(annotation?,(restriction|list|union))

</simpleType>

(? 符號(hào)聲明元素可在 simpleType 元素中出現(xiàn)零次或一次。)

屬性 描述
id 可選。規(guī)定該元素的唯一的 ID。
name

類型名稱。 該名稱必須是在 XML 命名空間規(guī)范中定義的無冒號(hào)名稱 (NCName)。

如果指定,該名稱在所有 simpleType 和 complexType 元素之間必須是唯一的。

如果 simpleType 元素是 schema 元素的子元素,則為必選項(xiàng),在其他時(shí)候則是不允許的。

any attributes 可選。規(guī)定帶有 non-schema 命名空間的任何其他屬性。

實(shí)例

例子 1

本例聲明 "age" 元素是一個(gè)帶有約束的簡單類型。age 的值不能小于 0 或大于 100:

<xs:element name="age">
  <xs:simpleType>
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="100"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>