五月综合缴情婷婷六月,色94色欧美sute亚洲线路二,日韩制服国产精品一区,色噜噜一区二区三区,香港三级午夜理伦三级三

您現(xiàn)在的位置: 365建站網(wǎng) > 建站教程 > Schema 教程 > XML Schema simpleType 元素

XML Schema simpleType 元素

此節(jié)有 141 人學(xué)習(xí)過     參與評論

定義和用法

simpleType 元素定義一個簡單類型,規(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>

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

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

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

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

如果 simpleType 元素是 schema 元素的子元素,則為必選項,在其他時候則是不允許的。

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

實例

例子 1

本例聲明 "age" 元素是一個帶有約束的簡單類型。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>

如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答??! 點擊進(jìn)入論壇

發(fā)表評論 (141人查看0條評論)
請自覺遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴(yán)禁發(fā)布色情、暴力、反動的言論。
昵稱:
最新評論
------分隔線----------------------------
Schema 教程目錄

其它欄目

· 建站教程
· 365學(xué)習(xí)

業(yè)務(wù)咨詢

· 技術(shù)支持
· 服務(wù)時間:9:00-18:00
365建站網(wǎng)二維碼

Powered by 365建站網(wǎng) RSS地圖 HTML地圖

copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號